diff options
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}) |
