You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.3 KiB
59 lines
2.3 KiB
<?xml version="1.0" encoding="UTF-8"?>
|
|
<odoo>
|
|
|
|
<record id="product_template_only_form_view" model="ir.ui.view">
|
|
<field name="name">product.template.form.inherited</field>
|
|
<field name="model">product.template</field>
|
|
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
|
<field name="arch" type="xml">
|
|
<button name="action_open_attribute_values" position="attributes">
|
|
<attribute name="attrs">{'invisible': [
|
|
'|',('parent.fix_variant_prices', '=', True),
|
|
'|', ('parent.attribute_line_ids', '<=', 0), ('parent.is_product_variant', '=', True),
|
|
]}</attribute>
|
|
</button>
|
|
<xpath expr="//page/field[@name='attribute_line_ids']" position="before">
|
|
<group class="o_label_nowrap">
|
|
<field name="fix_variant_prices" />
|
|
</group>
|
|
</xpath>
|
|
<!-- <xpath expr="//field[@name='list_price']" position="attributes">
|
|
<attribute name="attrs">{'invisible': [
|
|
('fix_variant_prices', '=', True),
|
|
('product_variant_count', '>', 1)
|
|
]}</attribute>
|
|
</xpath> -->
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_normal_form_view_default_check" model="ir.ui.view">
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="product.product_normal_form_view" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='uom_id']" position="after">
|
|
<field name="fix_variant_prices" invisible="1" />
|
|
<field
|
|
name="fix_price"
|
|
attrs="{'invisible': ['|',('fix_variant_prices','=',False),('product_variant_count', '=', 1)]}"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<record id="product_variant_easy_edit_price_view" model="ir.ui.view">
|
|
<field name="model">product.product</field>
|
|
<field name="inherit_id" ref="product.product_variant_easy_edit_view" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//label[@for='standard_price']" position="before">
|
|
<field name="fix_variant_prices" invisible="1" />
|
|
<field
|
|
name="fix_price"
|
|
attrs="{'invisible': ['|',('fix_variant_prices','=',False),('product_variant_count', '=', 1)]}"
|
|
widget='monetary'
|
|
options="{'currency_field': 'currency_id', 'field_digits': True}"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|