Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0][FIX] sale_promotion_discount_in_field #148

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
4 changes: 2 additions & 2 deletions sale_coupon_reward_fixed_price/views/coupon_program_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
<xpath expr="//label[@for='discount_type']" position="attributes">
<attribute
name="attrs"
>{"invisible": [("reward_type", "in", ("product", "free_shipping", "fixed_price"))]}</attribute>
>{"invisible": [("reward_type", "in", ("product", "free_shipping", "fixed_price", "discount_line"))]}</attribute>
</xpath>
<xpath expr="//field[@name='discount_type']/.." position="attributes">
<attribute
name="attrs"
>{"invisible": [("reward_type", "in", ("product", "free_shipping", "fixed_price"))]}</attribute>
>{"invisible": [("reward_type", "in", ("product", "free_shipping", "fixed_price", "discount_line"))]}</attribute>
</xpath>
<xpath expr="//label[@for='discount_max_amount']" position="attributes">
<attribute
Expand Down
15 changes: 5 additions & 10 deletions sale_promotion_discount_in_field/views/coupon_program_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
<field name="arch" type="xml">
<field name="reward_product_id" position="attributes">
<attribute name="attrs">
{"invisible": [("reward_type", "in", ("discount", "free_shipping",
"discount_line"))], "required": [("reward_type", "=", "product")]}
{"invisible": [("reward_type", "!=", "product")], "required": [("reward_type", "=", "product")]}
</attribute>
</field>
<field name="discount_line_product_id" position="attributes">
Expand All @@ -19,14 +18,12 @@
</field>
<xpath expr="//field[@name='discount_type']/.." position="attributes">
<attribute name="attrs">
{"invisible": [("reward_type", "in", ("product", "free_shipping",
"discount_line"))]}
{"invisible": [("reward_type", "!=", "discount")]}
</attribute>
</xpath>
<xpath expr="//label[@for='discount_type']" position="attributes">
<attribute name="attrs">
{"invisible": [("reward_type", "in", ("product", "free_shipping",
"discount_line"))]}
{"invisible": [("reward_type", "!=", "discount")]}
</attribute>
</xpath>
<xpath expr="//label[@for='discount_type']" position="before">
Expand All @@ -49,15 +46,13 @@
</xpath>
<xpath expr="//label[@for='discount_max_amount']" position="attributes">
<attribute name="attrs">
{'invisible': ['|', ('reward_type', 'in', ('product',
'free_shipping', "discount_line")), ('discount_type', '!=',
{'invisible': ['|', ('reward_type', '!=', 'discount'), ('discount_type', '!=',
'percentage')]}
</attribute>
</xpath>
<xpath expr="//field[@name='discount_max_amount']/.." position="attributes">
<attribute name="attrs">
{'invisible': ['|', ('reward_type', 'in', ('product',
'free_shipping', "discount_line")), ('discount_type', '!=',
{'invisible': ['|', ('reward_type', '!=', 'discount'), ('discount_type', '!=',
'percentage')]}
</attribute>
</xpath>
Expand Down
Loading