Merge branch 'feature/修复报废-工单状态' into develop
This commit is contained in:
@@ -966,10 +966,9 @@ class ResMrpWorkOrder(models.Model):
|
|||||||
workorder.state = 'ready'
|
workorder.state = 'ready'
|
||||||
else:
|
else:
|
||||||
workorder.state = 'waiting'
|
workorder.state = 'waiting'
|
||||||
|
elif workorder.production_id.state == 'scrap':
|
||||||
# else:
|
if workorder.routing_type == '解除装夹' and unclamp_workorder.test_results == '报废':
|
||||||
# if workorder.state not in ['cancel', 'rework']:
|
workorder.state = 'waiting'
|
||||||
# workorder.state = 'rework'
|
|
||||||
if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']:
|
if workorder.routing_type == '装夹预调' and workorder.state in ['waiting', 'ready', 'pending']:
|
||||||
workorder_ids = workorder.production_id.workorder_ids
|
workorder_ids = workorder.production_id.workorder_ids
|
||||||
work_bo = True
|
work_bo = True
|
||||||
|
|||||||
@@ -218,7 +218,7 @@
|
|||||||
<xpath expr="//label[1]" position="before">
|
<xpath expr="//label[1]" position="before">
|
||||||
<field name='routing_type' readonly="1"/>
|
<field name='routing_type' readonly="1"/>
|
||||||
<field name='process_state' attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
<field name='process_state' attrs='{"invisible": [("routing_type","!=","装夹预调")]}'/>
|
||||||
<field name="rfid_code" force_save="1" readonly="0" cache="True"
|
<field name="rfid_code" force_save="1" readonly="1" cache="True"
|
||||||
attrs="{'invisible': [('rfid_code_old', '!=', False)]}"/>
|
attrs="{'invisible': [('rfid_code_old', '!=', False)]}"/>
|
||||||
<field name="rfid_code_old" readonly="1" attrs="{'invisible': [('rfid_code_old', '=', False)]}"/>
|
<field name="rfid_code_old" readonly="1" attrs="{'invisible': [('rfid_code_old', '=', False)]}"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
重新生成制造订单
|
重新生成制造订单
|
||||||
<field name="is_remanufacture" force_save="1"/>
|
<field name="is_remanufacture" force_save="1"/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div attrs='{"invisible": [("is_remanufacture","=",False)]}'>
|
||||||
<span style='font-weight:bold;'>申请重新编程
|
<span style='font-weight:bold;'>申请重新编程
|
||||||
<field name="is_reprogramming" force_save="1"
|
<field name="is_reprogramming" force_save="1"
|
||||||
attrs='{"readonly": [("programming_state","not in",["已下发"])]}'/>
|
attrs='{"readonly": [("programming_state","not in",["已下发"])]}'/>
|
||||||
|
|||||||
@@ -16,10 +16,10 @@
|
|||||||
attrs='{"invisible": [("routing_type","=","装夹预调")]}' widget="many2many_tags"/>
|
attrs='{"invisible": [("routing_type","=","装夹预调")]}' widget="many2many_tags"/>
|
||||||
</group>
|
</group>
|
||||||
<div attrs='{"invisible": [("reprogramming_num","=",0)]}'>
|
<div attrs='{"invisible": [("reprogramming_num","=",0)]}'>
|
||||||
注意: 该制造订单的产品已重复编程过<field
|
注意: 该制造订单产品已申请重新编程次数为<field
|
||||||
name="reprogramming_num" string=""
|
name="reprogramming_num" string=""
|
||||||
readonly="1"
|
readonly="1"
|
||||||
style='color:red;'/>次,且当前编程状态为
|
style='color:red;'/>,且当前编程状态为
|
||||||
<field name="programming_state" string=""
|
<field name="programming_state" string=""
|
||||||
decoration-info="programming_state == '待编程'"
|
decoration-info="programming_state == '待编程'"
|
||||||
decoration-success="programming_state == '已下发'"
|
decoration-success="programming_state == '已下发'"
|
||||||
|
|||||||
Reference in New Issue
Block a user