From e6a1ac6e6462c973f55d12ef4b5543aad7790179 Mon Sep 17 00:00:00 2001 From: Richard Mathot Date: Tue, 20 Aug 2019 13:16:07 +0000 Subject: [PATCH 1/2] [FIX] models: avoid Unicode error when translating that error message Same cause, error, rationale and fix than 0ec0a4a32e98f2288e419dcb0627cfd972f32034 #OneCharacterPatch, reloaded opw-2056251 closes odoo/odoo#35857 Signed-off-by: Richard Mathot (rim) --- odoo/addons/base/ir/ir_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/addons/base/ir/ir_model.py b/odoo/addons/base/ir/ir_model.py index 3a12f2d7c82..c75e028534c 100644 --- a/odoo/addons/base/ir/ir_model.py +++ b/odoo/addons/base/ir/ir_model.py @@ -958,7 +958,7 @@ class IrModelAccess(models.Model): else: msg_tail = _("Please contact your system administrator if you think this is an error.") + "\n\n(" + _("Document model") + ": %s)" msg_params = (model_name,) - msg_tail += ' - ({} {}, {} {})'.format(_('Operation:'), mode, _('User:'), self._uid) + msg_tail += u' - ({} {}, {} {})'.format(_('Operation:'), mode, _('User:'), self._uid) _logger.info('Access Denied by ACLs for operation: %s, uid: %s, model: %s', mode, self._uid, model_name) msg = '%s %s' % (msg_heads[mode], msg_tail) raise AccessError(msg % msg_params) From b058f7094191364083fbd50b18cafabf5fa82b4a Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 20 Aug 2019 13:39:39 +0000 Subject: [PATCH 2/2] [FIX] web_editor: font>a colorize a change font color If you change the color of a link with the editor without using the link edition menu, this do not work (which might be expected), but if the text outside the font had been colorized, the font will be applied outside of the link only. This is unexpected since if we have: "hello cruel world!", if we select only "cruel" and change color, the change only happen to "hello" and "world!". With this changeset, an anchor in the ancestor prevent to use an ancestor font tag to change color (which prevent the issue). opw-2044551 closes #35862 Signed-off-by: Nicolas Lempereur (nle) --- addons/web_editor/static/src/js/summernote.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index e52ea66614d..0f6c7cddd03 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -2121,13 +2121,15 @@ $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color } // apply font: foreColor, backColor, size (the color can be use a class text-... or bg-...) - var node, font, $font, fonts = [], className; + var node, ancestors, font, $font, fonts = [], className; if (color || bgcolor || size) { for (var i=0; i