Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions product_margin_classification/views/view_product_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_product_product_tree_inherit" model="ir.ui.view">
<field name="model">product.product</field>
<field name="inherit_id" ref="product.product_product_tree_view" />
<field name="arch" type="xml">
<field name="lst_price" position="after">
<field
name="theoretical_price"
widget="monetary"
options="{'currency_field': 'currency_id', 'field_digits': True}"
attrs="{'invisible': [('theoretical_difference', '=', 0)]}"
optional="hide"
/>
<field name="margin_state" optional="hide" />
<field
name="theoretical_difference"
widget="monetary"
options="{'currency_field': 'currency_id', 'field_digits': True}"
optional="hide"
/>
<field name="margin_classification_id" optional="hide" />
<field name="currency_id" invisible="1" />
<field name="company_id" invisible="1" />
</field>
</field>
</record>

<record id="view_product_product_tree" model="ir.ui.view">
<field name="model">product.product</field>
<field name="arch" type="xml">
Expand Down
26 changes: 26 additions & 0 deletions product_margin_classification/views/view_product_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,32 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>

<record id="view_product_template_tree" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_tree_view" />
<field name="arch" type="xml">
<field name="list_price" position="after">
<field
name="theoretical_price"
widget="monetary"
options="{'currency_field': 'currency_id', 'field_digits': True}"
attrs="{'invisible': [('theoretical_difference', '=', 0)]}"
optional="hide"
/>
<field name="margin_state" optional="hide" />
<field
name="theoretical_difference"
widget="monetary"
options="{'currency_field': 'currency_id', 'field_digits': True}"
optional="hide"
/>
<field name="margin_classification_id" optional="hide" />
<field name="currency_id" invisible="1" />
<field name="company_id" invisible="1" />
</field>
</field>
</record>

<record id="view_product_template_form" model="ir.ui.view">
<field name="model">product.template</field>
<field name="inherit_id" ref="product.product_template_only_form_view" />
Expand Down
Loading