sf优化绑定托盘,工单form显示开始按钮 加工时间

This commit is contained in:
gqh
2023-02-01 17:53:32 +08:00
parent 5495f2436a
commit d032f89272
6 changed files with 5891 additions and 9 deletions

View File

@@ -61,7 +61,7 @@
<field name="domain">[('state', 'not in', ['done', 'cancel'])]</field>
<field name="context">{'search_default_workcenter_id': active_id}</field>
<field name="help" type="html">
<p class="o_view_nocontent_workorder">
<p class="o_view_nocontent_workorder">
没有工单要做!
</p>
<p>
@@ -92,7 +92,8 @@
<field name="model">mrp.workorder</field>
<field name="inherit_id" ref="mrp.mrp_production_workorder_form_view_inherit"/>
<field name="arch" type="xml">
<sheet position="before">
<xpath expr="//field[@name='state']" position="before">
<field name='user_permissions' invisible="1"/>
<button name="button_start" type="object" string="开始" class="btn-success"
attrs="{'invisible': ['|', '|', '|','|', ('production_state','in', ('draft', 'done',
@@ -108,9 +109,15 @@
<button name="button_unblock" type="object" string="Unblock"
context="{'default_workcenter_id': workcenter_id}" class="btn-danger"
attrs="{'invisible': ['|', ('production_state', 'in', ('draft', 'done', 'cancel')), ('working_state', '!=', 'blocked')]}"/>
</sheet>
</xpath>
<field name="production_id" position="after">
<group>
<field name="duration" widget="mrp_timer"
attrs="{'invisible': [('production_state','=', 'draft')], 'readonly': [('is_user_working', '=', True)]}"
sum="real duration"/>
</group>
<field name="processing_panel" readonly="1" attrs="{'invisible': [('routing_type', 'in', ('获取CNC加工程序','装夹','解除装夹',
'前置三元定位检测','后置三元质量检测','解除装夹'))]}"/>
</field>