mirror of
https://github.com/OCA/server-backend.git
synced 2025-02-18 09:52:42 +02:00
[16.0][IMP] base_global_discount: Add flag in product to bypass discount
This commit is contained in:
32
base_global_discount/views/product_views.xml
Normal file
32
base_global_discount/views/product_views.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="product_normal_form_view" model="ir.ui.view">
|
||||
<field name="name">sale_order_global_discount.product_normal_form_view</field>
|
||||
<field name="model">product.product</field>
|
||||
<field name="priority" eval="16" />
|
||||
<field name="inherit_id" ref="product.product_normal_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='group_standard_price']" position="inside">
|
||||
<field
|
||||
name="bypass_global_discount"
|
||||
groups="base_global_discount.group_global_discount"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="product_template_only_form_view" model="ir.ui.view">
|
||||
<field name="name">product.template.sale_order_global_discount.form</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="priority" eval="24" />
|
||||
<field name="inherit_id" ref="product.product_template_only_form_view" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//group[@name='group_standard_price']" position="inside">
|
||||
<field
|
||||
name="bypass_global_discount"
|
||||
attrs="{'invisible': [('product_variant_count', '>', 1)]}"
|
||||
groups="base_global_discount.group_global_discount"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user