[16.0][FIX] sale_tier_validation: Basic compatibility with sale_loyalty#3381
Conversation
If you install sale_loyalty, this piece of code: https://github.com/odoo/odoo/blob/2a7876538e9ea630563e39ee8402b27147d1e428/addons/sale_loyalty/models/sale_order.py#L740 is always executed when confirming a sales order, so it blocks it, no matter if no coupons are being handled. This little code avoids this blocking without requiring a glue module, although further work would be needed if some coupons are applied. TT51484
This comment was marked as off-topic.
This comment was marked as off-topic.
|
That's very weird... Look how it looks my "Request changes": Maybe it's because you don't have enough permissions. The key is that yours is very easy to be missed. In fact, in this PR is the same like you didn't oppose to it. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Yeah, I see, then that's something I should pay attention from now on. |
alexey-pelykh
left a comment
There was a problem hiding this comment.
Thanks Pedro, nice catch. The approach is solid -- detecting the empty applied_coupon_ids write from sale_loyalty and allowing it through the validation gate is the right trade-off vs. introducing a glue module for this.
LGTM.
|
Merging, as the requested changes was a test from @SirAionTech /ocabot merge patch |
|
On my way to merge this fine PR! |
|
Congratulations, your PR was merged at 9440924. Thanks a lot for contributing to OCA. ❤️ |

If you install
sale_loyalty, this piece of code:https://github.com/odoo/odoo/blob/2a7876538e9ea630563e39ee8402b27147d1e428/addons/sale_loyalty/models/sale_order.py#L740
is always executed when confirming a sales order, so it blocks it, no matter if no coupons are being handled.
This little code avoids this blocking without requiring a glue module, although further work would be needed if some coupons are applied.
@Tecnativa TT51484