[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"/>
|
||||
</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">
|
||||
<button colspan="2" name="%(action_edit_ean)d" type="action" string="Set a Custom EAN" class="oe_link oe_edit_only"/>
|
||||
</field>
|
||||
|
|
|
@ -238,8 +238,8 @@
|
|||
<attribute name="name">Product Template</attribute>
|
||||
</xpath>
|
||||
<field name="active" position="after">
|
||||
<field name="ean13" attrs="{'invisible': [('product_variant_count', '!=', 1)]}"/>
|
||||
<field name="default_code" 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>
|
||||
<xpath expr="//page[@string='Sales']" position="after">
|
||||
<page name="variants" string="Variants">
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<field name="name" class="oe_inline"/>
|
||||
</h1>
|
||||
</h1>
|
||||
</div>
|
||||
<group>
|
||||
<group>
|
||||
|
@ -38,7 +38,7 @@
|
|||
<group>
|
||||
<group>
|
||||
<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"/>
|
||||
</group>
|
||||
<group>
|
||||
|
@ -50,7 +50,7 @@
|
|||
<field name="name"/>
|
||||
</form>
|
||||
<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="account_id"/>
|
||||
<field name="split_method"/>
|
||||
|
@ -158,12 +158,13 @@
|
|||
<menuitem action="action_stock_landed_cost" name="Landed Costs" parent="menu_stock_landed_cost_main" id="menu_stock_landed_cost" sequence="1"/>
|
||||
|
||||
<!-- Stock Landed Cost Type View -->
|
||||
<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="model">product.product</field>
|
||||
<field name="arch" type="xml">
|
||||
<field name="priority">25</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Landed Costs">
|
||||
<sheet>
|
||||
<sheet>
|
||||
<field name="image_medium" widget="image" class="oe_avatar oe_left"/>
|
||||
<div class="oe_title">
|
||||
<div class="oe_edit_only">
|
||||
|
@ -173,19 +174,21 @@
|
|||
<field name="name" class="oe_inline"/>
|
||||
</h1>
|
||||
<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">
|
||||
<field name="landed_cost_ok" readonly="1"/>
|
||||
<label for="landed_cost_ok"/>
|
||||
<field name="active" />
|
||||
<label for="active"/>
|
||||
<field name="landed_cost_ok" readonly="1"/>
|
||||
<label for="landed_cost_ok"/>
|
||||
<field name="active"/>
|
||||
<label for="active"/>
|
||||
</div>
|
||||
</div>
|
||||
<notebook>
|
||||
<page string="Information">
|
||||
<group>
|
||||
<group>
|
||||
<field name="split_method"/>
|
||||
<field name="split_method"/>
|
||||
<field name="standard_price"/>
|
||||
<field name="property_account_expense"/>
|
||||
</group>
|
||||
|
@ -203,8 +206,8 @@
|
|||
<field name="message_ids" widget="mail_thread"/>
|
||||
</div>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<!-- Stock Landed Cost Type Tree View -->
|
||||
<record id="stock_landed_cost_tree_view" model="ir.ui.view">
|
||||
|
@ -225,7 +228,7 @@
|
|||
<field name="domain">[('landed_cost_ok','=',True)]</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,form</field>
|
||||
<field name="context">{'default_landed_cost_ok': True}</field>
|
||||
<field name="context">{'default_landed_cost_ok': True}</field>
|
||||
<field name="search_view_id" ref="product.product_search_form_view"/>
|
||||
<field name="help" type="html">
|
||||
<p class="oe_view_nocontent_create">
|
||||
|
@ -233,7 +236,7 @@
|
|||
</p>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<record id="stock_landed_cost_type_action1" model="ir.actions.act_window.view">
|
||||
<field eval="1" name="sequence"/>
|
||||
<field name="view_mode">tree</field>
|
||||
|
@ -248,7 +251,7 @@
|
|||
<field name="act_window_id" ref="stock_landed_cost_type_action"/>
|
||||
</record>
|
||||
|
||||
<menuitem action="stock_landed_cost_type_action" name="Landed Cost Type" parent="stock.menu_stock_configuration" id="menu_stock_landed_cost_type" sequence="1"/>
|
||||
<menuitem action="stock_landed_cost_type_action" name="Landed Cost Type" parent="stock.menu_stock_configuration" id="menu_stock_landed_cost_type" sequence="1"/>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue