[FIX] loyalty: (un)archive linked reward product
X-original-commit: b56ead874c10b7b1411eac27891bd935c68e368b Part-of: odoo/odoo#129115
This commit is contained in:
@@ -232,6 +232,11 @@ class LoyaltyReward(models.Model):
|
||||
# Keep the name of our discount product up to date
|
||||
for reward in self:
|
||||
reward.discount_line_product_id.write({'name': reward.description})
|
||||
if 'active' in vals:
|
||||
if vals['active']:
|
||||
self.reward_product_id.action_unarchive()
|
||||
else:
|
||||
self.reward_product_id.action_archive()
|
||||
return res
|
||||
|
||||
def unlink(self):
|
||||
|
||||
Reference in New Issue
Block a user