summaryrefslogtreecommitdiff
path: root/addons/website_form/controllers
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-11-15 20:39:10 +0100
committerChristophe Simonis <chs@odoo.com>2018-11-15 20:39:10 +0100
commit15f686eef60e716869f6a07069dc0d8f9a3c4f08 (patch)
tree13452a9c11e4fd6835619beb52eccfd4360d9af5 /addons/website_form/controllers
parentf1e999d33ebfb249eb0bbfa9e99f903a18842278 (diff)
parent468dab6748ad43865567444380abe52fb4c7a56d (diff)
[MERGE] forward port branch 11.0 up to 468dab6748a
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,