-
- Downloads
[FIX] pos_loyalty: handle many2one field in reward product domain
Before this commit, if you added a domain to a loyalty reward with
one of many2one fields like [("categ_id", "ilike", "test")], it wasn't
possible to open the PoS.
This commit addresses this limitation by replacing the many2one fields
with their corresponding value. To do this the product's field type is
loaded to ensure that this improvement applies exclusively to many2one
fields.
However, it's important to note that this improvement currently handles
only "one-level" of related many2one fields. Any domain that appears
like ("categ_id.foo", "ilike", "foo-val") won't function as expected.
opw-3473103
closes odoo/odoo#132665
Signed-off-by:
Joseph Caburnay (jcb) <jcb@odoo.com>
Showing
- addons/pos_loyalty/models/pos_session.py 4 additions, 0 deletionsaddons/pos_loyalty/models/pos_session.py
- addons/pos_loyalty/static/src/js/Loyalty.js 10 additions, 0 deletionsaddons/pos_loyalty/static/src/js/Loyalty.js
- addons/pos_loyalty/static/src/tours/PosLoyaltyRewardButtonTour.js 15 additions, 0 deletions...os_loyalty/static/src/tours/PosLoyaltyRewardButtonTour.js
- addons/pos_loyalty/tests/test_frontend.py 58 additions, 1 deletionaddons/pos_loyalty/tests/test_frontend.py
Loading
Please register or sign in to comment