1、修改工单检测结果只读条件;2、修改质检单完成时同步完成工单判断条件;3、去除只有配置后置三元检测的工单才能看到质检单对应字段、页签的判断条件
This commit is contained in:
@@ -9,22 +9,24 @@
|
||||
<field name="production_id" invisible="1"/>
|
||||
<field name="work_state" invisible="1"/>
|
||||
<field name="individuation_page_PTD" invisible="1"/>
|
||||
<field name="production_line_id" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="equipment_id" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="production_line_id" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="equipment_id" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="model_file" widget="Viewer3D" string="模型" readonly="1" force_save="1"
|
||||
attrs="{'invisible': ['|', '|',('model_file', '=', False), ('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
attrs="{'invisible': ['|',('model_file', '=', False), ('production_id', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="processing_panel" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="processing_panel" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<!-- <field name="production_id" string="制造订单" readonly="1"-->
|
||||
<!-- attrs="{'invisible': [('production_id', '=', False)]}"/>-->
|
||||
<field name="workorder_id" string="工单号" readonly="1"
|
||||
attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="is_inspect" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="is_inspect" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='notes']" position="before">
|
||||
<page string="检测报告" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<page string="检测报告" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<field name="detection_report" string="" widget="pdf_viewer"/>
|
||||
</page>
|
||||
<page string="判定结果" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<page string="判定结果" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="test_results" attrs="{'readonly': [('quality_state','in', ['pass', 'fail'])]}"/>
|
||||
@@ -35,25 +37,33 @@
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="2D图纸" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<page string="2D图纸" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<field name="machining_drawings" string="" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
<page string="客户质量标准" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<page string="客户质量标准" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<field name="quality_standard" string="" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
<page string="其他"
|
||||
attrs="{'invisible': ['|','|', ('quality_state', 'not in', ['pass', 'fail']), ('production_id', '=', False),('individuation_page_PTD', '=', False)]}">
|
||||
attrs="{'invisible': ['|',('quality_state', 'not in', ['pass', 'fail']), ('production_id', '=', False)]}">
|
||||
<group>
|
||||
<field name="write_uid" widget='many2one_avatar_user' string="判定人" readonly="1"/>
|
||||
<field name="write_date" string="判定时间" readonly="1"/>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
<xpath expr="//header//button[@name='do_pass'][1]" position="attributes">
|
||||
<attribute name="string">合格</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//header//button[@name='do_pass'][2]" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|',('quality_state', '!=', 'fail'),('work_state','in', ('done', 'rework'))]}</attribute>
|
||||
<attribute name="string">合格</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//header//button[@name='do_fail'][1]" position="attributes">
|
||||
<attribute name="string">不合格</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//header//button[@name='do_fail'][2]" position="attributes">
|
||||
<attribute name="attrs">{'invisible': ['|',('quality_state', '!=', 'pass'),('work_state','in', ('done', 'rework'))]}</attribute>
|
||||
<attribute name="string">不合格</attribute>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user