Skip to content

Commit

Permalink
[MERGE] forward port branch saas-14 up to e854f68
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Aug 21, 2019
2 parents c43de33 + e854f68 commit d8524aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions addons/web_editor/static/src/js/summernote.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<nodes.length; i++) {
node = nodes[i];

font = dom.ancestor(node, dom.isFont);
if (!font) {
ancestors = dom.listAncestor(node, dom.isFont);
font = ancestors.slice(-1)[0];
// add font if node is not inside a font or inside an anchor firstly
if (!dom.isFont(font) || ancestors.filter(dom.isAnchor).length) {
if (node.textContent.match(/^[ ]|[ ]$/)) {
node.textContent = node.textContent.replace(/^[ ]|[ ]$/g, '\u00A0');
}
Expand Down
2 changes: 1 addition & 1 deletion odoo/addons/base/ir/ir_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ def check(self, model, mode='read', raise_exception=True):
else:
msg_tail = _("Please contact your system administrator if you think this is an error.") + "\n\n(" + _("Document model") + ": %s)"
msg_params = (model,)
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)
msg = '%s %s' % (msg_heads[mode], msg_tail)
raise AccessError(msg % msg_params)
Expand Down

0 comments on commit d8524aa

Please sign in to comment.