summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2018-11-20 14:40:16 +0000
committerYannick Tivisse <yti@odoo.com>2018-11-20 14:40:16 +0000
commit602f7ea0bc3b64bc3c6256aff6fdc294f4c81f85 (patch)
tree369091769c21af66272ebc67f36ad5d6c142ea0b /addons
parent82f7fdd66ba6c6ed1e4fb72e941243c9e6f0b579 (diff)
[FIX] lunch: Fix unreviewed new feature from a2f69ca
Purpose ======= As we try to open a mail.compose.message on a model that doesn't inherit from mail.thread (Mimic a cowboy yellin' "Yihaaa" while shooting into the air with one revolver in each hand). Specification ============= The only way to fix this issue while keeping the feature (Open a mail composer) is to open the mail composer in mass_mail mode and to remove the model on which it should be called. The template won't be rendered in the mail composer but will be rendered when sending the mass_mailing obviously, while avoiding the unavoidable traceback when clicking on the 'Send' button closes odoo/odoo#28849
Diffstat (limited to 'addons')
-rw-r--r--addons/lunch/models/lunch.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/lunch/models/lunch.py b/addons/lunch/models/lunch.py
index facc3d44809..19aad72ef22 100644
--- a/addons/lunch/models/lunch.py
+++ b/addons/lunch/models/lunch.py
@@ -266,8 +266,7 @@ class LunchOrderLine(models.Model):
template = self.env.ref('lunch.lunch_order_mail_supplier', raise_if_not_found=False)
ctx = dict(
- default_composition_mode='comment',
- default_model='lunch.order',
+ default_composition_mode='mass_mail',
default_use_template=bool(template),
default_template_id=template.id,
default_lang=order['supplier'].lang or self.env.user.lang,