Commit Graph
6 Commits
Author SHA1 Message Date
Victor Feyens f92f361d68 [FIX] sale_coupon: wrong filtering domain
If only one of the two dates rules fields is specified, it won't be considered
when filtering coupon programs, and the program will always be considered valid...

This commit reorder the conditon to correctly consider both fields: rule_date_from
and rule_date_to, even if only one of the two field is set.

X-original-commit: 871a118d2c72f58185cbf822375282b613e67337
2020-10-19 14:49:12 +00:00
Joseph Caburnay afad149eb8 [REF] *_sale_coupon: create coupon module
This refactoring extracts parts of `sale_coupon` module to create a more
generic module called `coupon`. This new module can be extended in
different sales modules to implement functionalities specific to modules
that extend it.
2020-05-08 14:27:29 +00:00
Yannick Tivisse c1efc7f1c7 [IMP] sale_coupon: Adapt tests to work with/without demo data 2019-11-05 16:18:10 +01:00
Julien Castiaux e7506b88d2 [FIX] *: replace openerp addons import by odoo
Importing addons using the `openerp` anchor is depreciated by #36597
2019-09-20 05:58:41 +00:00
Romain Derie 9f5cdd86f2 [FIX] sale_coupon: upgrade discount when possible
/!\ Cherry-pick of odoo/enterprise@8b85628c65 that was lost between
coupon move from OE to OC and forward-port

It is possible to setup multiple global promotions, i.e. 5% discount
after 5 products and 10% discount after 10 products. Buying 10 products
gives the 10% discount. But if you select 5 products (5% is applied)
then add 5 more products, the 10% discount is not automatically applied,
the custommer must remove the 5% discount in order to get the 10% one.

This commit automatically upgrades the promotion to use the best
applicable discount.

opw-1953224

closes odoo/odoo#32314

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-04-01 15:47:40 +00:00
Jeremy Kersten ac5469646c [MRG] sale_coupon: prepare move to community repo 2019-04-01 10:41:55 +02:00