[FIX] loyalty: fix unable to open e-wallet program after archived
condition: install sale_loyalty only """ before commit: right after archived e-wallet program, system will show python pop-up error tuple index out of range after commit: able to open archived e-wallet program closes odoo/odoo#143196 X-original-commit: 58a1c854b63a65e72b99b3466b3ef63a5e691e63 Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit is contained in:
@@ -195,7 +195,7 @@ class LoyaltyProgram(models.Model):
|
||||
def _compute_payment_program_discount_product_id(self):
|
||||
for program in self:
|
||||
if program.is_payment_program:
|
||||
program.payment_program_discount_product_id = program.reward_ids[0].discount_line_product_id
|
||||
program.payment_program_discount_product_id = program.reward_ids[:1].discount_line_product_id
|
||||
else:
|
||||
program.payment_program_discount_product_id = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user