[IMP] stock: Hide 'Inventory Adjustement' and 'Procurement Request' button if

the product is not stockable
This commit is contained in:
Yannick Tivisse
2015-09-11 16:46:18 +02:00
parent 174ce92e29
commit cb89b2928e
+8 -6
View File
@@ -182,8 +182,8 @@
<field name="arch" type="xml">
<sheet position="before">
<header>
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action"/>
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action"/>
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action" attrs="{'invisible': [('type', '!=', 'consu')]}"/>
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action" attrs="{'invisible': [('type', '!=', 'consu')]}"/>
</header>
</sheet>
</field>
@@ -198,10 +198,12 @@
<header position="inside">
<button string="Update Qty On Hand"
type="action"
name="%(action_view_change_product_quantity)d"/>
name="%(action_view_change_product_quantity)d"
attrs="{'invisible': [('type', '!=', 'consu')]}"/>
<button string="Procurement Request"
type="action"
name="%(stock.act_make_procurement)d"/>
name="%(stock.act_make_procurement)d"
attrs="{'invisible': [('type', '!=', 'consu')]}"/>
</header>
<div name="button_box" position="inside">
<button class="oe_stat_button"
@@ -261,8 +263,8 @@
<field name="arch" type="xml">
<data>
<header position="inside" >
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action"/>
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action"/>
<button name="%(action_view_change_product_quantity)d" string="Update Qty On Hand" type="action" attrs="{'invisible': [('type', '!=', 'consu')]}"/>
<button string="Procurement Request" name="%(stock.act_make_procurement)d" type="action" attrs="{'invisible': [('type', '!=', 'consu')]}"/>
</header>
<div name="button_box" position="inside">
<button type="object"