1、质检单有关后置三元检测的字段和页签添加工单没有后置三元检测时隐藏的条件;2、工单添加质检单跳转按钮
This commit is contained in:
22
sf_quality/views/mrp_workorder.xml
Normal file
22
sf_quality/views/mrp_workorder.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="mrp_workorder_quality_form_view_inherit" model="ir.ui.view">
|
||||
<field name="name">mrp.workorder.view.form.inherit.quality</field>
|
||||
<field name="model">mrp.workorder</field>
|
||||
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
|
||||
<field name="arch" type="xml">
|
||||
<div name="button_box" position="inside">
|
||||
<field name="check_ids_state" invisible="1"/>
|
||||
<button name="action_open_quality_check_work_sf" groups="quality.group_quality_user" attrs="{'invisible': ['|',('check_ids_state', '!=', 'none'), ('check_ids', '=', [])]}" type="object" class="oe_stat_button" icon="fa-check">
|
||||
<span class="o_stat_text">质量检查</span>
|
||||
</button>
|
||||
<button name="action_open_quality_check_work_sf" groups="quality.group_quality_user" attrs="{'invisible': ['|',('check_ids_state', '!=', 'pass'), ('check_ids', '=', [])]}" type="object" class="oe_stat_button text-success" icon="fa-check">
|
||||
<span class="o_stat_text text-success">质量检查</span>
|
||||
</button>
|
||||
<button name="action_open_quality_check_work_sf" groups="quality.group_quality_user" attrs="{'invisible': ['|',('check_ids_state', '!=', 'fail'), ('check_ids', '=', [])]}" type="object" class="oe_stat_button text-danger" icon="fa-check">
|
||||
<span class="o_stat_text text-danger">质量检查</span>
|
||||
</button>
|
||||
</div>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -8,22 +8,23 @@
|
||||
<xpath expr="//field[@name='alert_ids']" position="after">
|
||||
<field name="production_id" invisible="1"/>
|
||||
<field name="work_state" invisible="1"/>
|
||||
<field name="production_line_id" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="equipment_id" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<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="model_file" widget="Viewer3D" string="模型" readonly="1" force_save="1"
|
||||
attrs="{'invisible': ['|', ('model_file', '=', False), ('production_id', '=', False)]}"/>
|
||||
attrs="{'invisible': ['|', '|',('model_file', '=', False), ('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='partner_id']" position="after">
|
||||
<field name="processing_panel" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="processing_panel" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="workorder_id" string="工单号" readonly="1"
|
||||
attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
<field name="is_inspect" attrs="{'invisible': [('production_id', '=', False)]}"/>
|
||||
attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
<field name="is_inspect" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//page[@name='notes']" position="before">
|
||||
<page string="检测报告" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<page string="检测报告" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<field name="detection_report" string="" widget="pdf_viewer"/>
|
||||
</page>
|
||||
<page string="判定结果" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<page string="判定结果" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<group>
|
||||
<group>
|
||||
<field name="test_results" attrs="{'readonly': [('quality_state','in', ['pass', 'fail'])]}"/>
|
||||
@@ -34,14 +35,14 @@
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="2D图纸" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<page string="2D图纸" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<field name="machining_drawings" string="" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
<page string="客户质量标准" attrs="{'invisible': [('production_id', '=', False)]}">
|
||||
<page string="客户质量标准" attrs="{'invisible': ['|',('production_id', '=', False), ('individuation_page_PTD', '=', False)]}">
|
||||
<field name="quality_standard" string="" widget="adaptive_viewer"/>
|
||||
</page>
|
||||
<page string="其他"
|
||||
attrs="{'invisible': ['|', ('quality_state', 'not in', ['pass', 'fail']), ('production_id', '=', False)]}">
|
||||
attrs="{'invisible': ['|','|', ('quality_state', 'not in', ['pass', 'fail']), ('production_id', '=', False),('individuation_page_PTD', '=', False)]}">
|
||||
<group>
|
||||
<field name="write_uid" widget='many2one_avatar_user' string="判定人" readonly="1"/>
|
||||
<field name="write_date" string="判定时间" readonly="1"/>
|
||||
|
||||
Reference in New Issue
Block a user