Saturday, January 31, 2026
3 changes · 19.0
Resolved issues and error corrections
Unused loyalty coupons are now removed when a sales reward is applied or the reward dialog is discarded. This keeps promotion history clearer for users by avoiding misleading coupon records linked to sales orders where no reward was actually used.
Original PR description
### Issue: Due to this issue, `coupon_ids` which are never used are still shown in loyalty coupons history which is confusing for users. #### Steps to reproduce: 1- Create two promotions: - Promo A:…
### Issue: Due to this issue, `coupon_ids` which are never used are still shown in loyalty coupons history which is confusing for users. #### Steps to reproduce: 1- Create two promotions: - Promo A: 10% discount - Promo B: 20% discount 2- Create a SO and add a line. Then confirm the SO. 3- Click on `Reward` button. 4- A dialog should show both promos. Discard the dialog. 5- Navigate to `Discount and Loyalty`. 6- Open Promo A and B and you can see both have lines with `coupon_id.order_id` = `created SO` which is confusing. `Issue 1` 7- Navigate back to SO. Click on `Reward` and select Promo A, apply. 8- Navigate to Promo B. As you see the the `coupon_id` related to the SO is still there. `Issue 2` ### Cause and Fix: This is due to unlinking `coupon_ids` only in SO confirm action, causing this issue on already confirmed SOs: https://github.com/odoo/odoo/blob/604d07ab324caa5f3aa6f3baa9902c2137ea24db/addons/sale_loyalty/models/sale_order.py#L132-L136 We can fix this issue by `unlinking` the `coupons_ids` when a reward is applied or the dialog is discarded. However there are 2 limitations: 1- The view needs to be updated. Otherwise, `coupon_ids` will not be deleted upon clicking on `discard` button. However the fix is still stable. 2- What if the dialog is closed with the cross button or the tab is closed without selecting a reward? In that case the issue will still persist. To fix these issues, we can show only used `coupon_ids` in `loyalty_coupon_id` list view. However that cannot be done in stable as it requires `use_count` to be stored. NB: With some complex filters this also could be fixed on stable but not worth it. opw-5424753 Forward-Port-Of: odoo/odoo#245534
This fix makes account audit trail tests use the latest saved database state before checking restrictions. It helps prevent false test failures and supports more reliable validation of accounting safeguards.
Original PR description
During the testing of the `account` module, I encountered errors in two tests: test_cant_unlink_message and test_cant_unown_message. The cause is that the function def _search_account_audit_log_restricted uses _search, while the tests are still running within a transaction. As a result, when _search is executed, the database has not yet been updated with the latest values computed during the tests. Therefore, I added self.env.cr.flush() to flush the pending changes and update the database with the newest values. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr
The point of sale product configuration popup now shows the correct price when a pricelist sets a fixed price for a product with variants. This helps cashiers see consistent pricing before adding configured products to an order, reducing checkout confusion and pricing mistakes.
Original PR description
Steps to reproduce: - Configure POS → enable Allow Flexible Pricelist and assign the Default pricelist. - Create product A with variants. - Add product A to the Default pricelist. - Set a fixed price…
Steps to reproduce: - Configure POS → enable Allow Flexible Pricelist and assign the Default pricelist. - Create product A with variants. - Add product A to the Default pricelist. - Set a fixed price for product A in that pricelist. - Open POS session. - Select product A in POS. Observation: - In ProductConfiguratorPopup dialog, pricelist price is not considered Cause: - After this [commit](https://github.com/odoo/odoo/commit/5e77c14912324bf967a55a1a40bb01071eca5c8b) the text appears from `get title()` method, which do not consider pricelist Fix: - we now consider pricelist for displaying title. **Before** <table> <tr> <td> <img width="400" height="300" alt="image" src="https://github.com/user-attachments/assets/6faac3e4-a579-41db-a2ad-fdc9c24e422f" /> </td> <td> <img width="400" height="300" alt="image" src="https://github.com/user-attachments/assets/14035707-aa23-4fb3-97d7-d0ce2f6e6b46" /> </td> </tr> </table> **After** <img width="340" height="225" alt="image" src="https://github.com/user-attachments/assets/3beeaf76-fc1a-42a5-9f3c-dabc43389d36" /> opw-5270319 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#237899