Files
odoo_source/addons/loyalty/tests
Mahdi Cheikh Rouhou (macr) 9358a7f550 [FIX] loyalty : unarchive archived rules and rewards
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#121710

X-original-commit: 1d9fbda1c5ec69ba83968668ddecec6a7e1421bb
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-05-19 13:33:16 +02:00
..