[MERGE] forward port branch saas-15 up to c03f6db6ea

This commit is contained in:
Christophe Simonis
2019-03-05 16:45:22 +01:00
2 changed files with 22 additions and 1 deletions
+2 -1
View File
@@ -189,5 +189,6 @@ class IrUiView(models.Model):
``bundles=True`` returns also the asset bundles
"""
user_groups = set(self.env.user.groups_id)
views = self.with_context(active_test=False)._views_get(key, bundles=bundles)
View = self.with_context(active_test=False, lang=None)
views = View._views_get(key, bundles=bundles)
return views.filtered(lambda v: not v.groups_id or len(user_groups.intersection(v.groups_id)))
+20
View File
@@ -150,5 +150,25 @@ tour.register('rte_translator', {
}, {
content: "check bis: placeholder translation",
trigger: 'input[placeholder="test french placeholder"]',
}, {
content: "Open customize menu",
trigger: "#customize-menu > .dropdown-toggle",
}, {
content: "Open HTML editor",
trigger: "[data-action='ace']",
}, {
content: "Check that the editor is not showing translated content (1)",
trigger: '.ace_text-layer .ace_line:contains("an HTML")',
run: function (actions) {
var lineEscapedText = $(this.$anchor.text()).text();
if (lineEscapedText !== "<b></b> is an HTML tag & is empty") {
console.error('The HTML editor should display the correct untranslated content');
$('body').addClass('rte_translator_error');
}
},
}, {
content: "Check that the editor is not showing translated content (2)",
trigger: 'body:not(.rte_translator_error)',
run: function () {},
}]);
});