Fine tuning of the sale_layout_category_product module

This commit is contained in:
Alexis de Lattre
2017-02-01 10:41:35 +01:00
parent c9bfc8bef2
commit ea20effa7e
2 changed files with 4 additions and 5 deletions

View File

@@ -47,7 +47,7 @@ class SaleLayoutCategory(models.Model):
string='Products') string='Products')
product_categ_ids = fields.One2many( product_categ_ids = fields.One2many(
'product.category', 'layout_category_id', 'product.category', 'layout_category_id',
string='Product Categories') string='Product Categories', domain=[('type', '!=', 'view')])
class SaleOrderLine(models.Model): class SaleOrderLine(models.Model):

View File

@@ -26,13 +26,12 @@
<field name="inherit_id" ref="product.product_category_form_view"/> <field name="inherit_id" ref="product.product_category_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="type" position="after"> <field name="type" position="after">
<field name="layout_category_id"/> <field name="layout_category_id" attrs="{'invisible': [('type', '=', 'view')]}"/>
</field> </field>
</field> </field>
</record> </record>
<!-- SALE LAYOUT CATEG --> <!-- SALE LAYOUT CATEG -->
<record id="report_configuration_form_view" model="ir.ui.view"> <record id="report_configuration_form_view" model="ir.ui.view">
<field name="name">sale_layoutcategory_product.form.view</field> <field name="name">sale_layoutcategory_product.form.view</field>
@@ -41,10 +40,10 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/group" position="after"> <xpath expr="/form/group" position="after">
<group name="product_categ" string="Product Categories"> <group name="product_categ" string="Product Categories">
<field name="product_categ_ids" nolabel="1"/> <field name="product_categ_ids" nolabel="1" widget="many2many"/>
</group> </group>
<group name="product" string="Products"> <group name="product" string="Products">
<field name="product_tmpl_ids" nolabel="1"/> <field name="product_tmpl_ids" nolabel="1" widget="many2many"/>
</group> </group>
</xpath> </xpath>
</field> </field>