Skip to content

Commit

Permalink
Merge PR #148 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Aug 31, 2023
2 parents 29e03b7 + 48b18b4 commit cf7934e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
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

0 comments on commit cf7934e

Please sign in to comment.