Commit Graph
4 Commits
Author SHA1 Message Date
Joseph Caburnay 4d59d3d1f3 [REF][FIX] coupon,sale_coupon: move mail_template_sale_coupon
mail_template_sale_coupon is specific to sale_coupon so we are moving
it back to sale_coupon module. Additionally, we add a way of selecting
a mail template when generating coupons for customers.
2020-11-03 10:48:04 +00:00
Baptiste Vergote e3be55d3f6 [FIX] sale_coupon: send mail template to partner of SO
... instead of public user

Once sending the template email Coupon: Send by Email.
Odoo was sending to the partner linked to the sale.coupon

However in the case of the program having the parameters:
apply on next order & apply automatically.
The partner_id.id is the public user.

This commit is modifying the value of the template to send
the email to the partner of the SO instead of the partner
of the current coupon.

opw-2255674

closes odoo/odoo#51570

X-original-commit: f7e0c2d1568b222d510d3a10fba1116fabfff604
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-05-19 16:44:39 +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
Joseph Caburnay ef05ca2812 [REF] sale_coupon: rename/move files to prepare coupon module
An initial step to prepare the creation of coupon module. The main goal
is to just move the logic from sale_coupon to coupon. To come up with
less diff as possible, this rename/move step is beneficial for this
purpose.
2020-05-08 14:25:54 +00:00