Skip to content
Snippets Groups Projects
user avatar
Mahdi Cheikh Rouhou (macr) authored
When archive a loyalty program which have somes rules and rewards and the unarchinving it will not have the rules and
rewards that it had before.

Steps to reproduce the error :
1- install sales
2- activate Discounts, Loyalty & Gift Card in sales settings
3- go to sales/products/Discount&loaylty
4- select one of the default programs and try to archive it and unarchive it after
5- you will not get the rules that it had before

The problem was in the toggle_active function of the loyalty program we try to unarchive already unarchived items because
we do ```program.rule_ids``` so it will get only active items.

opw-3299295

closes odoo/odoo#120902

Signed-off-by: default avatarMahdi Cheikh Rouhou (macr) <macr@odoo.com>
1d9fbda1
History
Name Last commit Last update