[FIX] web, mrp: remove old decoration classes occurrences

Custom text decoration classes have been dropped with d9a0877096
in favor bootstrap default ones.

This commit will adapt the list-view generation code ans some mrp
translations that were mistakenly omitted.

task-2579123
This commit is contained in:
stefanorigano (SRI)
2021-07-23 06:54:18 +00:00
committed by Aaron Bohy
parent f7efa256fb
commit 6ef27067f4
2 changed files with 9 additions and 2 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ msgstr ""
#. module: mrp
#: model_terms:ir.ui.view,arch_db:mrp.mrp_production_form_view
msgid "<span class=\"text-bf\">To Produce</span>"
msgid "<span class=\"font-weight-bold\">To Produce</span>"
msgstr ""
#. module: mrp
@@ -209,7 +209,14 @@ var ListRenderer = BasicRenderer.extend({
const decorations = {};
for (const [key, expr] of Object.entries(node.attrs)) {
if (DECORATIONS.includes(key)) {
const cssClass = key.replace('decoration', 'text');
let cssClass;
if (key === 'decoration-bf') {
cssClass = 'font-weight-bold';
} else if (key === 'decoration-it') {
cssClass = 'font-italic';
} else {
cssClass = key.replace('decoration', 'text');
}
decorations[cssClass] = py.parse(py.tokenize(expr));
}
}