修复返工操作时工单状态及制造订单更新程序
This commit is contained in:
@@ -36,7 +36,7 @@ class ReworkWizard(models.TransientModel):
|
||||
'detailed_reason': self.detailed_reason,
|
||||
'processing_panel': self.workorder_id.processing_panel,
|
||||
'routing_type': self.workorder_id.routing_type,
|
||||
'handle_result': '待处理' if self.test_results == '返工' else '',
|
||||
'handle_result': '待处理' if self.workorder_id.test_results == '返工' or self.workorder_id.is_rework is True else '',
|
||||
'test_results': '返工' if not self.routing_type == 'CNC加工' else self.workorder_id.test_results,
|
||||
'test_report': self.workorder_id.detection_report})]})
|
||||
self.workorder_id.button_finish()
|
||||
@@ -75,7 +75,7 @@ class ReworkWizard(models.TransientModel):
|
||||
for item in self:
|
||||
domain = [('id', '=', False)]
|
||||
production_id = item.production_id
|
||||
if product_id:
|
||||
if production_id:
|
||||
if self.env.user.has_group('sf_base.group_sf_order_user'):
|
||||
panel_ids = []
|
||||
for p in production_id.detection_result_ids.filtered(
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
<field name="is_reprogramming"
|
||||
attrs='{"invisible": [("programming_state","=",False)],"readonly": [("programming_state","in",["编程中","已编程未下发时"])]}'/>
|
||||
<field name="rework_reason"
|
||||
attrs='{"invisible": [("routing_type","!=","")],"required": [("routing_type","in",["装夹预调"])]}'/>
|
||||
attrs='{"invisible": [("routing_type","not in",["装夹预调","CNC加工"])],"required": [("routing_type","in",["装夹预调"])]}'/>
|
||||
<field name="detailed_reason"
|
||||
attrs='{"invisible": [("routing_type","!=","")],"required": [("routing_type","in",["装夹预调"])]}'/>
|
||||
attrs='{"invisible": [("routing_type","not in",["装夹预调","CNC加工"])],"required": [("routing_type","in",["装夹预调"])]}'/>
|
||||
</group>
|
||||
<footer>
|
||||
<button string="确认" name="confirm" type="object" class="oe_highlight" confirm="是否确认返工"/>
|
||||
|
||||
Reference in New Issue
Block a user