修复返工bug

This commit is contained in:
jinling.yang
2024-07-18 16:17:19 +08:00
parent 7163e025d2
commit 33bf88968c
5 changed files with 75 additions and 41 deletions

View File

@@ -75,20 +75,21 @@
</xpath>
<xpath expr="//sheet//group//group[2]//label" position="before">
<!-- <field name="process_state"/> -->
<field name="state"/>
<field name="state" readonly="0"/>
<!-- <field name="process_state"/> -->
</xpath>
<xpath expr="//sheet//group//group//div[3]" position="after">
<field name="manual_quotation" readonly="1"/>
<field name="programming_no" readonly="1"/>
<field name="programming_state" readonly="1"
<field name="programming_state" readonly="0"
decoration-success="programming_state == '已编程'"
decoration-warning="programming_state =='编程中'"
decoration-danger="programming_state =='已编程未下发'"/>
<field name="work_state" invisible="1"/>
<field name="schedule_state" invisible='1'/>
<field name="is_scrap" invisible='1'/>
<field name="is_rework" invisible='1'/>
</xpath>
<xpath expr="//field[@name='user_id']" position="before">
<field name="plan_start_processing_time" readonly="1"/>
@@ -123,7 +124,7 @@
confirm="是否确认更新程序"
attrs="{'invisible': ['|',('state', '!=', 'rework'),('programming_state', '!=', '已编程未下发')]}"/>
<button name="button_rework" string="返工" type="object" groups="sf_base.group_sf_mrp_user"
attrs="{'invisible': ['|',('state', '!=', 'rework'),('programming_state', '!=', '已编程')]}"/>
attrs="{'invisible': ['|',('state', '!=', 'rework') ,'&amp;',('programming_state', '!=', '已编程'),('is_rework', '=', True)]}"/>
<button name="%(sf_manufacturing.action_sf_production_wizard)d" string="报废" type="action"
groups="sf_base.group_sf_mrp_user"
attrs="{'invisible': [('is_scrap', '=', False)]}"/>
@@ -281,7 +282,7 @@
<xpath expr="//sheet//notebook//page[@name='operations']" position="after">
<page string="检测结果" attrs="{'invisible': [('detection_result_ids', '=', [])]}">
<field name="detection_result_ids" string="" readonly="0">
<field name="detection_result_ids" string="" readonly="1">
<tree sample="1">
<field name="production_id" invisible="1"/>
<field name="processing_panel"/>

View File

@@ -112,6 +112,10 @@
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
<field name="arch" type="xml">
<xpath expr="//header/field[@name='state']" position="replace">
<field name="state" widget="statusbar"
statusbar_visible="pending,waiting,ready,progress,to be detected,done,rework"/>
</xpath>
<xpath expr="//div[@name='button_box']" position="inside">
<button type="object" name="action_view_surface_technics_picking" class="oe_stat_button" icon="fa-truck"
groups="base.group_user,sf_base.group_sf_order_user"
@@ -481,7 +485,8 @@
<field name="results" invisible="1"/>
<page string="后置三元检测" attrs='{"invisible": [("routing_type","!=","CNC加工")]}'>
<group>
<field name="test_results" attrs='{"invisible":[("results","!=",False)]}'/>
<field name="test_results"
attrs='{"readonly":[("state","!=","to be detected")],"invisible":[("results","!=",False)]}'/>
<!-- <field name="is_remanufacture" attrs='{"invisible":[("test_results","!=","报废")]}'/>-->
<!-- <field name="is_fetchcnc"-->
<!-- attrs='{"invisible":["|",("test_results","=","合格"),("is_remanufacture","=",False)]}'/>-->