[FIX] (purchase_)mrp(_account): fix order stats button MO

Task: 2241471
This commit is contained in:
Rémy Voet (ryv)
2020-06-15 16:59:41 +02:00
committed by Simon Lejeune
parent 5311f01e65
commit 38c375783f
4 changed files with 16 additions and 14 deletions
+12 -12
View File
@@ -88,18 +88,8 @@
<field name="reserve_visible" invisible="1"/>
<field name="consumption" invisible="1"/>
<field name="is_planned" invisible="1"/>
<field name="workorder_ids" invisible="1"/>
<div class="oe_button_box" name="button_box">
<button name="%(stock.action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action" states="done" groups="stock.group_production_lot"/>
<button name="%(action_mrp_production_moves)d" type="action" string="Product Moves" class="oe_stat_button" icon="fa-exchange" attrs="{'invisible': [('state', 'not in', ('progress', 'done'))]}"/>
<button type="object" name="action_view_mo_delivery" class="oe_stat_button" icon="fa-truck" groups="base.group_user" attrs="{'invisible': [('delivery_count', '=', 0)]}">
<field name="delivery_count" widget="statinfo" string="Transfers"/>
</button>
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="scrap_count"/></span>
<span class="o_stat_text">Scraps</span>
</div>
</button>
<button class="oe_stat_button" name="action_view_mrp_production_childs" type="object" icon="fa-wrench" attrs="{'invisible': [('mrp_production_child_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="mrp_production_child_count"/></span>
@@ -118,7 +108,17 @@
<span class="o_stat_text">Backorder MO's</span>
</div>
</button>
<field name="workorder_ids" invisible="1"/>
<button class="oe_stat_button" name="action_see_move_scrap" type="object" icon="fa-arrows-v" attrs="{'invisible': [('scrap_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="scrap_count"/></span>
<span class="o_stat_text">Scraps</span>
</div>
</button>
<button type="object" name="action_view_mo_delivery" class="oe_stat_button" icon="fa-truck" groups="base.group_user" attrs="{'invisible': [('delivery_count', '=', 0)]}">
<field name="delivery_count" widget="statinfo" string="Transfers"/>
</button>
<button name="%(stock.action_stock_report)d" icon="fa-arrow-up" class="oe_stat_button" string="Traceability" type="action" states="done" groups="stock.group_production_lot"/>
<button name="%(action_mrp_production_moves)d" type="action" string="Product Moves" class="oe_stat_button" icon="fa-exchange" attrs="{'invisible': [('state', 'not in', ('progress', 'done'))]}"/>
</div>
<div class="oe_title">
<h1><field name="name" placeholder="Manufacturing Reference" nolabel="1"/></h1>
@@ -8,7 +8,7 @@
<xpath expr="//field[@name='product_id']" position="before">
<field name="show_valuation" invisible="1"/>
</xpath>
<xpath expr="//button[@name='action_view_mrp_production_sources']" position="after">
<xpath expr="//div[@name='button_box']" position="inside">
<button string="Valuation" type="object"
name="action_view_stock_valuation_layers"
class="oe_stat_button" icon="fa-dollar" groups="base.group_no_one"
@@ -3,9 +3,10 @@
<record id="mrp_production_form_view_purchase" model="ir.ui.view">
<field name="name">mrp.production.inherited.form.purchase</field>
<field name="model">mrp.production</field>
<field name="priority">32</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='button_box']" position="inside">
<xpath expr="//button[@name='action_view_mrp_production_childs']" position="before">
<button class="oe_stat_button" name="action_view_purchase_orders" type="object" icon="fa-credit-card" groups="purchase.group_purchase_user" attrs="{'invisible': [('purchase_order_count', '=', 0)]}">
<div class="o_field_widget o_stat_info">
<span class="o_stat_value"><field name="purchase_order_count"/></span>
@@ -3,6 +3,7 @@
<record id="mrp_production_form_view_sale" model="ir.ui.view">
<field name="name">mrp.production.inherited.form.sale</field>
<field name="model">mrp.production</field>
<field name="priority">64</field>
<field name="inherit_id" ref="mrp.mrp_production_form_view"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_view_mrp_production_childs']" position="before">