[FIX] pos_loyalty: Fix missing program's order count when fetching data
before this commit, POS order can add a reward from loyalty programs
which have already reached maximum usage by add the loyalty rule's code
and refresh the browser. It will clear 'total_order_count' in browser
cache.
step to remake:
1. create a promo code loyalty program with maximum usage
2. create orders (pos order or sale order) with this promo code and paid
them until the program reaching the limit usage.
3. create new POS order and add the promo code -> no reward line in POS
order, then refresh browser, it will add new reward line into order
after this commit, 'total_order_count' allways be fetching from database
so it is being clear no longer.
closes odoo/odoo#134077
Signed-off-by:
Joseph Caburnay (jcb) <jcb@odoo.com>
Please register or sign in to comment