summaryrefslogtreecommitdiff
path: root/addons/website_form/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-11-16 19:30:20 +0100
committerChristophe Simonis <chs@odoo.com>2018-11-16 19:30:20 +0100
commit6faad524cf5e4db02855cb213277c40aee14c42a (patch)
tree383c984dc1461a03481baa9fbdce8c156ca97e2e /addons/website_form/controllers
parent3657dc77c2ddb4275f07d1271b93e7f25e09913a (diff)
parentbc744a1da46efda6f1eb5c341f2fa5df30c9c7ad (diff)
[MERGE] forward port branch 12.0 up to bc744a1da46
Diffstat (limited to 'addons/website_form/controllers')
-rw-r--r--addons/website_form/controllers/main.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/website_form/controllers/main.py b/addons/website_form/controllers/main.py
index 41a120008b4..f8a75af3130 100644
--- a/addons/website_form/controllers/main.py
+++ b/addons/website_form/controllers/main.py
@@ -221,10 +221,10 @@ class WebsiteForm(http.Controller):
else:
orphan_attachment_ids.append(attachment_id.id)
- # If some attachments didn't match a field on the model,
- # we create a mail.message to link them to the record
- if orphan_attachment_ids:
- if model_name != 'mail.mail':
+ if model_name != 'mail.mail':
+ # If some attachments didn't match a field on the model,
+ # we create a mail.message to link them to the record
+ if orphan_attachment_ids:
values = {
'body': _('<p>Attached files : </p>'),
'model': model_name,