| 1 | <?xml version="1.0"?> |
| 2 | <odoo> |
| 3 | <record id="product_product_ext_form_view2" model="ir.ui.view"> |
| 4 | <field name="name">product_extended.product.form.view</field> |
| 5 | <field name="model">product.template</field> |
| 6 | <field name="priority">3</field> |
| 7 | <field name="inherit_id" ref="product.product_template_only_form_view" /> |
| 8 | <field name="arch" type="xml"> |
| 9 | <xpath expr="//div[@name='standard_price_uom']" position="inside"> |
| 10 | <t groups="mrp.group_mrp_manager"> |
| 11 | <field name="bom_count" invisible="1"/> |
| 12 | <field name="cost_method" invisible="1"/> |
| 13 | <field name="valuation" invisible="1"/> |
| 14 | <button name="button_bom_cost" |
| 15 | string="Compute Price from BoM" type="object" |
| 16 | invisible="bom_count == 0 or valuation == 'real_time' and cost_method == 'fifo'" |
| 17 | help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only." |
| 18 | class="oe_link pt-0"/> |
| 19 | </t> |
| 20 | </xpath> |
| 21 | </field> |
| 22 | </record> |
| 23 | |
| 24 | <record id="product_product_view_form_normal_inherit_extended" model="ir.ui.view"> |
| 25 | <field name="name">product.product.view.form.normal.inherit.extended</field> |
| 26 | <field name="model">product.product</field> |
| 27 | <field name="priority">4</field> |
| 28 | <field name="inherit_id" ref="product.product_normal_form_view"/> |
| 29 | <field name="arch" type="xml"> |
| 30 | <xpath expr="//div[@name='standard_price_uom']" position="inside"> |
| 31 | <t groups="mrp.group_mrp_manager"> |
| 32 | <field name="bom_count" invisible="1"/> |
| 33 | <field name="cost_method" invisible="1"/> |
| 34 | <field name="valuation" invisible="1"/> |
| 35 | <button name="button_bom_cost" |
| 36 | string="Compute Price from BoM" type="object" |
| 37 | invisible="bom_count == 0 or valuation == 'real_time' and cost_method == 'fifo'" |
| 38 | help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only." |
| 39 | class="oe_link pt-0" |
| 40 | colspan="2"/> |
| 41 | </t> |
| 42 | </xpath> |
| 43 | </field> |
| 44 | </record> |
| 45 | |
| 46 | <record id="product_variant_easy_edit_view_bom_inherit" model="ir.ui.view"> |
| 47 | <field name="name">product.product.product.view.form.easy.bom.inherit</field> |
| 48 | <field name="model">product.product</field> |
| 49 | <field name="inherit_id" ref="product.product_variant_easy_edit_view"/> |
| 50 | <field name="arch" type="xml"> |
| 51 | <data> |
| 52 | <xpath expr="//field[@name='standard_price']" position="after"> |
| 53 | <t groups="mrp.group_mrp_manager"> |
| 54 | <field name="bom_count" invisible="1"/> |
| 55 | <field name="cost_method" invisible="1"/> |
| 56 | <field name="valuation" invisible="1"/> |
| 57 | <button name="button_bom_cost" |
| 58 | string="Compute Price from BoM" |
| 59 | type="object" |
| 60 | invisible="bom_count == 0 or valuation == 'real_time' and cost_method == 'fifo'" |
| 61 | help="Compute the price of the product using products and operations of related bill of materials, for manufactured products only." |
| 62 | class="oe_link pt-0"/> |
| 63 | </t> |
| 64 | </xpath> |
| 65 | </data> |
| 66 | </field> |
| 67 | </record> |
| 68 | |
| 69 | <record id="action_compute_price_bom_template" model="ir.actions.server"> |
| 70 | <field name="name">Compute Price from BoM</field> |
| 71 | <field name="model_id" ref="product.model_product_template"/> |
| 72 | <field name="binding_model_id" ref="product.model_product_template"/> |
| 73 | <field name="binding_view_types">list,kanban</field> |
| 74 | <field name="state">code</field> |
| 75 | <field name="code"> |
| 76 | if records: |
| 77 | records.action_bom_cost() |
| 78 | </field> |
| 79 | </record> |
| 80 | |
| 81 | <record id="action_compute_price_bom_product" model="ir.actions.server"> |
| 82 | <field name="name">Compute Price from BoM</field> |
| 83 | <field name="model_id" ref="product.model_product_product"/> |
| 84 | <field name="binding_model_id" ref="product.model_product_product"/> |
| 85 | <field name="binding_view_types">list,kanban</field> |
| 86 | <field name="state">code</field> |
| 87 | <field name="code"> |
| 88 | if records: |
| 89 | records.action_bom_cost() |
| 90 | </field> |
| 91 | </record> |
| 92 | </odoo> |