[FIX] stock: improve speed of product's stock quantity/value calculation
[odoo/odoo.git] / addons / stock / product_view.xml
index 60fab00..24da97c 100644 (file)
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <field name="standard_price" position="replace">
-                    <group col="4" colspan="2">
-                        <field name="standard_price" readonly="1"/>
-                        <button name="%(action_view_change_standard_price)d" string="Change Price" type="action" icon="gtk-execute" attrs="{'readonly':[('cost_method','=','average')]}"/>
+                    <label string="Cost Price:" align="1.0"/>
+                    <group col="2" colspan="1">
+                        <field name="standard_price" attrs="{'readonly':[('cost_method','=','average')]}" nolabel="1"/>
+                        <button name="%(action_view_change_standard_price)d" string="Update"
+                            type="action" icon="gtk-execute" attrs="{'invisible':[('cost_method','&lt;&gt;','average')]}"/>
                     </group>
                 </field>
             </field>
             <field name="inherit_id" ref="product.product_normal_form_view"/>
             <field name="arch" type="xml">
                 <group name="status" position="after">
-                    <group colspan="2" col="2">
+                    <group colspan="2" col="3">
                         <separator string="Stocks" colspan="4"/>
                         <field name="qty_available"/>
+                        <button name="%(action_view_change_product_quantity)d" string="Update" attrs="{'invisible': [('type', '=', 'service')]}"
+                            type="action" icon="gtk-execute" groups = "stock.group_stock_manager,stock.group_stock_user"/>
+                        <newline/>
                         <field name="virtual_available"/>
                     </group>
                     <group colspan="2" col="2" name="lot" groups="base.group_extended">