[FIX] loyalty: Gift Card not usable if less that 1 point left.
If user had less than 1 point, which is equivalent to 1 quantity of set currency, on gift card and eWallet, they could not use it due to not enough point on Gift Card and eWallet for claiming reward. opw-3667934 closes odoo/odoo#159984 X-original-commit: 64711a9152b6bb661392882d3403c194f5990fbc Signed-off-by: anko-odoo <anko@odoo.com>
This commit is contained in:
@@ -115,8 +115,8 @@
|
||||
<field name="portal_point_name" invisible="program_type not in ('gift_card', 'ewallet')" string="Displayed as" groups="base.group_no_one"/>
|
||||
</group>
|
||||
</group>
|
||||
<notebook invisible="program_type in ('gift_card', 'ewallet')">
|
||||
<page string="Rules & Rewards" name="rules_rewards">
|
||||
<notebook>
|
||||
<page string="Rules & Rewards" name="rules_rewards" invisible="program_type in ('gift_card', 'ewallet')">
|
||||
<group>
|
||||
<group>
|
||||
<field name="rule_ids" colspan="2" mode="kanban" nolabel="1" add-label="Add a rule"
|
||||
@@ -128,7 +128,15 @@
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Communications" name="communications" invisible="applies_on == 'current'">
|
||||
<page string="Rewards" name="rewards" groups="base.group_no_one" invisible="program_type not in ('gift_card', 'ewallet')">
|
||||
<group>
|
||||
<group groups="base.group_no_one">
|
||||
<field name="reward_ids" colspan="2" mode="kanban" nolabel="1" add-label="Add a reward"
|
||||
class="o_loyalty_kanban_inline" widget="loyalty_one2many" context="{'currency_symbol': currency_symbol, 'program_type': program_type}"/>
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Communications" name="communications" invisible="applies_on == 'current' or program_type in ('gift_card', 'ewallet')">
|
||||
<field name="communication_plan_ids" mode="tree"/>
|
||||
</page>
|
||||
</notebook>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<field name="all_discount_product_ids" invisible="1"/>
|
||||
<sheet>
|
||||
<group>
|
||||
<group string="Reward" name="reward_type_group">
|
||||
<group string="Reward" name="reward_type_group" invisible="program_type in ('ewallet','gift_card')">
|
||||
<field name="reward_type" widget="selection" force_save="1" readonly="program_type == 'buy_x_get_y'"/>
|
||||
<label for="discount" invisible="reward_type != 'discount'"/>
|
||||
<div class="d-flex flex-row" invisible="reward_type != 'discount'">
|
||||
@@ -31,7 +31,7 @@
|
||||
<field name="reward_product_tag_id" required="reward_type == 'product' and not reward_product_ids"/>
|
||||
</group>
|
||||
|
||||
<group string="Discount" invisible="reward_type != 'discount'">
|
||||
<group string="Discount" invisible="reward_type != 'discount' or program_type in ('gift_card','ewallet')">
|
||||
<field name="discount_max_amount"/>
|
||||
<field name="discount_product_domain" groups="base.group_no_one" widget="domain" options="{'model': 'product.product', 'in_dialog': true}" invisible="discount_applicability != 'specific'"/>
|
||||
<field name="discount_product_ids" widget="many2many_tags" invisible="discount_applicability != 'specific'"/>
|
||||
@@ -47,13 +47,13 @@
|
||||
<field name="point_name" no_label="1"/>
|
||||
<span invisible="not clear_wallet"> (or more)</span>
|
||||
</div>
|
||||
<label for="clear_wallet" string="Clear all promo point(s)" invisible="not user_has_debug and program_type in ('loyalty', 'buy_x_get_y')"/>
|
||||
<div class="o_row" invisible="not user_has_debug and program_type in ('loyalty', 'buy_x_get_y')">
|
||||
<label for="clear_wallet" string="Clear all promo point(s)" invisible="(not user_has_debug and program_type in ('loyalty', 'buy_x_get_y')) or program_type in ('gift_card', 'ewallet')"/>
|
||||
<div class="o_row" invisible="(not user_has_debug and program_type in ('loyalty', 'buy_x_get_y')) or program_type in ('gift_card', 'ewallet')">
|
||||
<field name="clear_wallet"/>
|
||||
</div>
|
||||
</group>
|
||||
</group>
|
||||
<group>
|
||||
<group invisible="program_type in ('gift_card','ewallet')">
|
||||
<field name="description" string="Description on order"/>
|
||||
<field name="discount_line_product_id" string="Discount product" groups="base.group_no_one"/>
|
||||
</group>
|
||||
|
||||
Reference in New Issue
Block a user