[FIX] Fix inheritance in point_of_sale views + ean visible on creation + landed costs views
[IMP] Set custom EAN not visible when multiple variants [IMP] Change landed costs views + make ean visible upon creation
This commit is contained in:
parent
899f2066e9
commit
fc65efbb9b
|
@ -546,6 +546,24 @@
|
||||||
<field name="expense_pdt"/>
|
<field name="expense_pdt"/>
|
||||||
</group>
|
</group>
|
||||||
</group>
|
</group>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="product_template_form_view_inherit_ean" model="ir.ui.view">
|
||||||
|
<field name="name">product.template.only.form.inherit.ean</field>
|
||||||
|
<field name="model">product.template</field>
|
||||||
|
<field name="inherit_id" ref="product.product_template_only_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<field name="ean13" position="after">
|
||||||
|
<button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN"
|
||||||
|
attrs="{'invisible': [('product_variant_count', '>', 1)]}" class="oe_link oe_edit_only"/>
|
||||||
|
</field>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
<record id="product_normal_form_view_inherit_ean" model="ir.ui.view">
|
||||||
|
<field name="name">product.form.inherit.ean</field>
|
||||||
|
<field name="model">product.product</field>
|
||||||
|
<field name="inherit_id" ref="product.product_normal_form_view"/>
|
||||||
|
<field name="arch" type="xml">
|
||||||
<field name="ean13" position="after">
|
<field name="ean13" position="after">
|
||||||
<button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
|
<button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
|
||||||
</field>
|
</field>
|
||||||
|
|
|
@ -238,8 +238,8 @@
|
||||||
<attribute name="name">Product Template</attribute>
|
<attribute name="name">Product Template</attribute>
|
||||||
</xpath>
|
</xpath>
|
||||||
<field name="active" position="after">
|
<field name="active" position="after">
|
||||||
<field name="ean13" attrs="{'invisible': [('product_variant_count', '!=', 1)]}"/>
|
<field name="ean13" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||||
<field name="default_code" attrs="{'invisible': [('product_variant_count', '!=', 1)]}"/>
|
<field name="default_code" attrs="{'invisible': [('product_variant_count', '>', 1)]}"/>
|
||||||
</field>
|
</field>
|
||||||
<xpath expr="//page[@string='Sales']" position="after">
|
<xpath expr="//page[@string='Sales']" position="after">
|
||||||
<page name="variants" string="Variants">
|
<page name="variants" string="Variants">
|
||||||
|
|
|
@ -38,7 +38,7 @@
|
||||||
<group>
|
<group>
|
||||||
<group>
|
<group>
|
||||||
<field name="product_id"
|
<field name="product_id"
|
||||||
on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True}"/>
|
on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True, 'form_view_ref':'stock_landed_costs.view_stock_landed_cost_type_form'}"/>
|
||||||
<field name="price_unit"/>
|
<field name="price_unit"/>
|
||||||
</group>
|
</group>
|
||||||
<group>
|
<group>
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
</form>
|
</form>
|
||||||
<tree string="Cost Lines" editable="bottom">
|
<tree string="Cost Lines" editable="bottom">
|
||||||
<field name="product_id" on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True}"/>
|
<field name="product_id" on_change="onchange_product_id(product_id)" domain="[('landed_cost_ok', '=', True)]" context="{'default_landed_cost_ok': True, 'form_view_ref':'stock_landed_costs.view_stock_landed_cost_type_form'}"/>
|
||||||
<field name="name"/>
|
<field name="name"/>
|
||||||
<field name="account_id"/>
|
<field name="account_id"/>
|
||||||
<field name="split_method"/>
|
<field name="split_method"/>
|
||||||
|
@ -161,6 +161,7 @@
|
||||||
<record id="view_stock_landed_cost_type_form" model="ir.ui.view">
|
<record id="view_stock_landed_cost_type_form" model="ir.ui.view">
|
||||||
<field name="name">stock.landed.cost.type.form</field>
|
<field name="name">stock.landed.cost.type.form</field>
|
||||||
<field name="model">product.product</field>
|
<field name="model">product.product</field>
|
||||||
|
<field name="priority">25</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Landed Costs">
|
<form string="Landed Costs">
|
||||||
<sheet>
|
<sheet>
|
||||||
|
@ -173,11 +174,13 @@
|
||||||
<field name="name" class="oe_inline"/>
|
<field name="name" class="oe_inline"/>
|
||||||
</h1>
|
</h1>
|
||||||
<label for="categ_id" class="oe_edit_only"/>
|
<label for="categ_id" class="oe_edit_only"/>
|
||||||
<h2><field name="categ_id"/></h2>
|
<h2>
|
||||||
|
<field name="categ_id"/>
|
||||||
|
</h2>
|
||||||
<div name="options" groups="base.group_user">
|
<div name="options" groups="base.group_user">
|
||||||
<field name="landed_cost_ok" readonly="1"/>
|
<field name="landed_cost_ok" readonly="1"/>
|
||||||
<label for="landed_cost_ok"/>
|
<label for="landed_cost_ok"/>
|
||||||
<field name="active" />
|
<field name="active"/>
|
||||||
<label for="active"/>
|
<label for="active"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue