Files
stock-logistics-warehouse/packaging_uom/views/product_packaging_views.xml
Laurent Mignon (ACSONE) 41af45de9a [IMP] packaging_uom: declare 'inverse' method on qty
This change is required to make the code working with existing addons without breaking tets. By declaring an invers on qty, we are able to assign/create the required uom to the package based on the expected qty
2019-04-17 13:17:23 +02:00

33 lines
1.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015-2017 ACSONE SA/NV (<http://acsone.eu>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
<odoo>
<record id="product_template_view_form_inherit_packaging_uom" model="ir.ui.view">
<field name="name">product.template.common.form (packaging_uom)</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_form_view"/>
<field name="arch" type="xml">
<page name="general_information" position="after">
<page name="packaging" string="Packaging" attrs="{'invisible':[('type','=','service')]}" groups="product.group_stock_packaging" >
<group name="packaging" string="Packaging">
<field name="packaging_ids" string="Configurations"
context="{'get_uom_categ_from_uom': uom_id, 'tree_view_ref':'product.product_packaging_tree_view_product', 'form_view_ref': 'product.product_packaging_form_view_without_product'}"/>
</group>
</page>
</page>
</field>
</record>
<record id="product_packaging_view_form_inherit_packaging_uom" model="ir.ui.view">
<field name="name">product.packaging.form.view (packaging_uom)</field>
<field name="model">product.packaging</field>
<field name="inherit_id" ref="product.product_packaging_form_view"/>
<field name="arch" type="xml">
<field name="qty" position="before">
<field name="uom_categ_domain_id" invisible="1"/>
<field name="uom_id" domain="[('category_id', '=', uom_categ_domain_id)]" required="True"/>
</field>
</field>
</record>
</odoo>