Accept Merge Request #1183: (feature/优化工单_1 -> develop)
Merge Request: 1、解决 功能刀具是无效刀时-制造订单提交返工【申请重新编程】要做成必选 Created By: @禹翔辉 Reviewed By: @马广威 Approved By: @马广威 Accepted By: @禹翔辉 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1183?initial=true
This commit is contained in:
@@ -31,6 +31,8 @@ class ReworkWizard(models.TransientModel):
|
||||
('已下发', '已下发')],
|
||||
string='编程状态')
|
||||
|
||||
tool_state = fields.Selection(string='功能刀具状态', related='production_id.tool_state')
|
||||
|
||||
def confirm(self):
|
||||
if self.routing_type in ['装夹预调', 'CNC加工']:
|
||||
self.workorder_id.is_rework = True
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
<field name="production_id" invisible="True"/>
|
||||
<field name="workorder_id" invisible="True"/>
|
||||
<field name="product_id" invisible="True"/>
|
||||
<field name="tool_state" invisible="True"/>
|
||||
<field name="routing_type" invisible="True"/>
|
||||
<group>
|
||||
<field name="processing_panel_id" options="{'no_create': True}"
|
||||
@@ -25,15 +26,16 @@
|
||||
decoration-warning="programming_state =='编程中'"
|
||||
decoration-danger="programming_state =='已编程'" readonly="1"/>
|
||||
</div>
|
||||
<div attrs='{"invisible": ["|",("routing_type","in",["装夹预调","CNC加工"]),("programming_state","not in",["已下发"])]}'>
|
||||
<div attrs='{"invisible": ["|",("routing_type","in",["装夹预调","CNC加工"]),("programming_state","not in",["已下发"])],"readonly": [("tool_state", "=", "2")]}'>
|
||||
<span style='font-weight:bold;'>申请重新编程
|
||||
<field name="is_reprogramming" force_save="1"/>
|
||||
<field name="is_reprogramming" force_save="1"
|
||||
attrs='{"readonly": [("tool_state", "=", "2")]}'/>
|
||||
</span>
|
||||
</div>
|
||||
<div attrs='{"invisible": ["|",("routing_type","in",["装夹预调","CNC加工"]),("programming_state","in",["已下发"])],"readonly": [("is_reprogramming_readonly","=",False)]}'>
|
||||
<div attrs='{"invisible": ["|",("routing_type","in",["装夹预调","CNC加工"]),("programming_state","in",["已下发"])],"readonly": ["|",("is_reprogramming_readonly","=",False),("tool_state", "=", "2")]}'>
|
||||
<span style='font-weight:bold;'>申请重新编程
|
||||
<field name="is_reprogramming_readonly"
|
||||
attrs='{"readonly": [("is_reprogramming_readonly","=",False)]}'/>
|
||||
attrs='{"readonly": ["|",("is_reprogramming_readonly","=",False),("tool_state", "=", "2")]}'/>
|
||||
</span>
|
||||
</div>
|
||||
<group>
|
||||
|
||||
Reference in New Issue
Block a user