summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2017-06-20 10:02:03 +0200
committerNicolas Lempereur <nle@odoo.com>2017-06-21 11:15:03 +0200
commitde403dc1ab440b9b08ea7fce189cd157745dfe74 (patch)
tree22b7294e89435fc197a680e3c1622ec1aee8e412 /addons/web_editor/static/src
parentd938ba87ae524ab10a1da43471962f10ed53b9ca (diff)
[FIX] mass_mailing: no multi language edit
Creating and editing mass mailing in multiple language is managed with the change 05daa15. But currently the language the mass mailing is sent in, is the language of the "Process Mass Mailing Queue" (root user if not changed) so all the recipients will receive the mail in the root user language has at the time the given batch of mails is sended. So this is different from what someone could expect by it being translatable. In any case the recipients list could be based on a lead, a partner a mass mailing contact or other and a language could not be determinable in stable (a mass mailing contact does not have a language for example). If the system worked, there is also a usability downside in the meaning that someone could duplicate a mail and not check all translation and not be aware that the mail he see is maybe not the mail that will be received (if translations have not all been completed). In stable to have the same behavior in any case and lessen the usability burden of users thinking erroneously the mass mailing may be sent in several languages depending on a not-existing heuristic, this changeset remove the translatability of mass mailing content. This has the following effect: no translation editing appear, the mass mailing is edited and sent in one and the same language, If someone want to send a mass mailing in several language, currently in Odoo it would then require to: duplicate the mass mailing, change the domains of recipients base on choosen heuristic, edit the duplicated mass mailing in the choosen language opw-746445 opw-746776 closes #17718
Diffstat (limited to 'addons/web_editor/static/src')
-rw-r--r--addons/web_editor/static/src/js/backend.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/backend.js b/addons/web_editor/static/src/js/backend.js
index e35ebcd6204..94c6e8057c0 100644
--- a/addons/web_editor/static/src/js/backend.js
+++ b/addons/web_editor/static/src/js/backend.js
@@ -183,6 +183,11 @@ var FieldTextHtml = widget.extend({
template: 'web_editor.FieldTextHtml',
willStart: function () {
var self = this;
+
+ if (this.field.translate === false) {
+ this.languages = [];
+ return $.when();
+ }
return new Model('res.lang').call("search_read", [[['code', '!=', 'en_US']], ["name", "code"]]).then(function (res) {
self.languages = res;
});