库位变更接口优化

This commit is contained in:
mgw
2024-04-24 08:58:15 +08:00
parent ca01b055b8
commit 59c8631c15
6 changed files with 77 additions and 31 deletions

View File

@@ -406,9 +406,10 @@ class ResMrpWorkOrder(models.Model):
work = workorder.production_id.workorder_ids
work.compensation_value_x = eval(self.material_center_point)[0]
work.compensation_value_y = eval(self.material_center_point)[1]
work.process_state = '待加工'
self.sudo().production_id.state = 'pending_processing'
workorder.button_finish()
self.process_state = '待加工'
# self.sudo().production_id.state = 'pending_processing'
except Exception as e:
# 重新抛出捕获到的异常信息
raise UserError(str(e))