diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-07-04 14:40:20 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-07-04 14:40:20 +0200 |
| commit | 10cb34bcacc0983cdab722e528d413a996df3a7b (patch) | |
| tree | 749977ed99f5895080eac3d0fd842033eb276b7b /addons/web_editor/models | |
| parent | 81d0bfa4738c5563a26df5cd666ef895cd59d3d0 (diff) | |
| parent | 97258040d80f3435b6d461de35f86a615ee2b106 (diff) | |
[MERGE] forward port branch saas-14 up to 97258040d80
Diffstat (limited to 'addons/web_editor/models')
| -rw-r--r-- | addons/web_editor/models/ir_http.py | 2 | ||||
| -rw-r--r-- | addons/web_editor/models/ir_ui_view.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/addons/web_editor/models/ir_http.py b/addons/web_editor/models/ir_http.py index 04845688ea9..d6e2b2d5ee6 100644 --- a/addons/web_editor/models/ir_http.py +++ b/addons/web_editor/models/ir_http.py @@ -15,7 +15,7 @@ class IrHttp(models.AbstractModel): context['editable'] = True if 'edit_translations' in request.httprequest.args and 'edit_translations' not in context: context['edit_translations'] = True - if context.get('lang') != "en_US" and 'translatable' not in context: + if context.get('edit_translations') and 'translatable' not in context: context['translatable'] = True request.context = context return super(IrHttp, cls)._dispatch() diff --git a/addons/web_editor/models/ir_ui_view.py b/addons/web_editor/models/ir_ui_view.py index dc81b6a44d6..b6c421e0e82 100644 --- a/addons/web_editor/models/ir_ui_view.py +++ b/addons/web_editor/models/ir_ui_view.py @@ -48,7 +48,7 @@ class IrUiView(models.Model): if value is not None: # TODO: batch writes? - if self.get_default_lang_code() and field != 'arch' and not isinstance(Model._fields[field], fields.Html): + if not self.env.context.get('lang') and self.get_default_lang_code(): Model.browse(int(el.get('data-oe-id'))).with_context(lang=self.get_default_lang_code()).write({field: value}) else: Model.browse(int(el.get('data-oe-id'))).write({field: value}) |
