[IMP] stock_account : hide 'Inventory Valuation' stat button

When we create and edit a new product from a Many2one, we don't want to
see the stat button 'Invotory Valuation', so hide it in the view when
the record has no id.
This commit is contained in:
Tejas Shahu
2017-09-29 17:42:25 +02:00
committed by Pierre Masereel
parent 55188da4f4
commit f38d691be2
+1 -1
View File
@@ -122,7 +122,7 @@
<field name="inherit_id" ref="stock.product_form_view_procurement_button"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_view_stock_move_lines']" position="after">
<button string="Inventory Valuation" type="object" name="action_open_product_moves" class="oe_stat_button" icon="fa-cubes" attrs="{'invisible': [('cost_method', '=', 'standard')]}"/>
<button string="Inventory Valuation" type="object" name="action_open_product_moves" class="oe_stat_button" icon="fa-cubes" attrs="{'invisible': ['|', ('cost_method', '=', 'standard'), ('id', '=', False)]}"/>
</xpath>
</field>
</record>