Copyright ©
Company name
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js
index edea04e0e48..bd13305df0c 100644
--- a/addons/web/static/src/js/fields/basic_fields.js
+++ b/addons/web/static/src/js/fields/basic_fields.js
@@ -1783,7 +1783,7 @@ var LabelSelection = AbstractField.extend({
_render: function () {
this.classes = this.nodeOptions && this.nodeOptions.classes || {};
var labelClass = this.classes[this.value] || 'primary';
- this.$el.addClass('label label-' + labelClass).text(this._formatValue(this.value));
+ this.$el.addClass('badge badge-' + labelClass).text(this._formatValue(this.value));
},
});
diff --git a/addons/web/static/src/js/fields/upgrade_fields.js b/addons/web/static/src/js/fields/upgrade_fields.js
index 119a64881e3..dd91ca2efc2 100644
--- a/addons/web/static/src/js/fields/upgrade_fields.js
+++ b/addons/web/static/src/js/fields/upgrade_fields.js
@@ -94,7 +94,7 @@ var AbstractFieldUpgrade = {
this._super.apply(this, arguments);
this._insertEnterpriseLabel($("
", {
text: "Enterprise",
- 'class': "label label-primary oe_inline o_enterprise_label"
+ 'class': "badge badge-primary oe_inline o_enterprise_label"
}));
},
/**
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js
index b9b9e083328..443fb194d87 100644
--- a/addons/web/static/tests/fields/basic_fields_tests.js
+++ b/addons/web/static/tests/fields/basic_fields_tests.js
@@ -4004,42 +4004,42 @@ QUnit.module('basic_fields', {
'' +
'' +
' ' +
+ ' options="{\'classes\': {\'normal\': \'secondary\', \'blocked\': \'warning\',\'done\': \'success\'}}"/>' +
' ' +
' ' +
'',
res_id: 1,
});
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').length, 1,
"should have a warning status label since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-default').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-secondary').length, 0,
"should not have a default status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-success').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-success').length, 0,
"should not have a success status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the label should say 'Blocked' since this is the label value for that state");
// // switch to edit mode and check the result
form.$buttons.find('.o_form_button_edit').click();
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').length, 1,
"should have a warning status label since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-default').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-secondary').length, 0,
"should not have a default status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-success').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-success').length, 0,
"should not have a success status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the label should say 'Blocked' since this is the label value for that state");
// save
form.$buttons.find('.o_form_button_save').click();
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').length, 1,
"should have a warning status label since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-default').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-secondary').length, 0,
"should not have a default status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-success').length, 0,
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-success').length, 0,
"should not have a success status since selection is the second, blocked state");
- assert.strictEqual(form.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(form.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the label should say 'Blocked' since this is the label value for that state");
form.destroy();
@@ -4055,57 +4055,57 @@ QUnit.module('basic_fields', {
arch: '' +
' ' +
' ' +
+ ' options="{\'classes\': {\'normal\': \'secondary\', \'blocked\': \'warning\',\'done\': \'success\'}}"/>' +
' ',
});
- assert.strictEqual(list.$('.o_field_widget.label:not(:empty)').length, 3,
+ assert.strictEqual(list.$('.o_field_widget.badge:not(:empty)').length, 3,
"should have three visible status labels");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').length, 1,
"should have one warning status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the warning label should read 'Blocked'");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').length, 1,
"should have one default status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').text(), 'Normal',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').text(), 'Normal',
"the default label should read 'Normal'");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').length, 1,
"should have one success status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').text(), 'Done',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').text(), 'Done',
"the success label should read 'Done'");
// switch to edit mode and check the result
list.$('tbody td:not(.o_list_record_selector)').first().click();
- assert.strictEqual(list.$('.o_field_widget.label:not(:empty)').length, 3,
+ assert.strictEqual(list.$('.o_field_widget.badge:not(:empty)').length, 3,
"should have three visible status labels");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').length, 1,
"should have one warning status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the warning label should read 'Blocked'");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').length, 1,
"should have one default status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').text(), 'Normal',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').text(), 'Normal',
"the default label should read 'Normal'");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').length, 1,
"should have one success status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').text(), 'Done',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').text(), 'Done',
"the success label should read 'Done'");
// save and check the result
list.$buttons.find('.o_list_button_save').click();
- assert.strictEqual(list.$('.o_field_widget.label:not(:empty)').length, 3,
+ assert.strictEqual(list.$('.o_field_widget.badge:not(:empty)').length, 3,
"should have three visible status labels");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').length, 1,
"should have one warning status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-warning').text(), 'Blocked',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-warning').text(), 'Blocked',
"the warning label should read 'Blocked'");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').length, 1,
"should have one default status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-default').text(), 'Normal',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-secondary').text(), 'Normal',
"the default label should read 'Normal'");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').length, 1,
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').length, 1,
"should have one success status label");
- assert.strictEqual(list.$('.o_field_widget.label.label-success').text(), 'Done',
+ assert.strictEqual(list.$('.o_field_widget.badge.badge-success').text(), 'Done',
"the success label should read 'Done'");
list.destroy();
diff --git a/addons/web/static/tests/fields/upgrade_fields_tests.js b/addons/web/static/tests/fields/upgrade_fields_tests.js
index 427ec7b54e3..15c32eeeaf0 100644
--- a/addons/web/static/tests/fields/upgrade_fields_tests.js
+++ b/addons/web/static/tests/fields/upgrade_fields_tests.js
@@ -52,10 +52,10 @@ QUnit.module('upgrade_fields', {
'',
});
- assert.strictEqual(form.$('.o_field .label').length, 0,
- "the upgrade label shouldn't be inside the field section");
- assert.strictEqual(form.$('.o_label .label').length, 1,
- "the upgrade label should be inside the label section");
+ assert.strictEqual(form.$('.o_field .badge').length, 0,
+ "the upgrade badge shouldn't be inside the field section");
+ assert.strictEqual(form.$('.o_label .badge').length, 1,
+ "the upgrade badge should be inside the label section");
assert.strictEqual(form.$('.o_label').text(), "Bar EnterpriseCoucou",
"the upgrade label should be inside the label section");
form.destroy();
diff --git a/addons/website/static/src/js/menu/seo.js b/addons/website/static/src/js/menu/seo.js
index 71d4297cd89..180bd561df1 100644
--- a/addons/website/static/src/js/menu/seo.js
+++ b/addons/website/static/src/js/menu/seo.js
@@ -18,16 +18,16 @@ var WORD_SEPARATORS_REGEX = '([\\u2000-\\u206F\\u2E00-\\u2E7F\'!"#\\$%&\\(\\)\\*
function analyzeKeyword(htmlPage, keyword) {
return htmlPage.isInTitle(keyword) ? {
- title: 'label label-success',
+ title: 'badge badge-success',
description: "This keyword is used in the page title",
} : htmlPage.isInDescription(keyword) ? {
- title: 'label label-primary',
+ title: 'badge badge-primary',
description: "This keyword is used in the page description",
} : htmlPage.isInBody(keyword) ? {
- title: 'label label-info',
+ title: 'badge badge-info',
description: "This keyword is used in the page content."
} : {
- title: 'label label-default',
+ title: 'badge badge-secondary',
description: "This keyword is not used anywhere on the page."
};
}
diff --git a/addons/website/static/src/xml/website.seo.xml b/addons/website/static/src/xml/website.seo.xml
index 90e6f8fa0b3..d9cb1f38f80 100644
--- a/addons/website/static/src/xml/website.seo.xml
+++ b/addons/website/static/src/xml/website.seo.xml
@@ -63,10 +63,10 @@
Legend:
- Not used
- In title
- In description
- In page's content
+ Not used
+ In title
+ In description
+ In page's content
diff --git a/addons/website/views/website_templates.xml b/addons/website/views/website_templates.xml
index 0ab90d44014..0f629788b69 100644
--- a/addons/website/views/website_templates.xml
+++ b/addons/website/views/website_templates.xml
@@ -225,7 +225,7 @@
diff --git a/addons/website_blog/views/website_blog_templates.xml b/addons/website_blog/views/website_blog_templates.xml
index 1bb88263a11..248cd5dec15 100644
--- a/addons/website_blog/views/website_blog_templates.xml
+++ b/addons/website_blog/views/website_blog_templates.xml
@@ -65,7 +65,7 @@
diff --git a/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml b/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
index 1d51eb67f20..3481a9c023f 100644
--- a/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
+++ b/addons/website_crm_partner_assign/views/website_crm_partner_assign_templates.xml
@@ -323,7 +323,7 @@
-
+
@@ -403,7 +403,7 @@
Tags
-
+
diff --git a/addons/website_customer/views/website_customer_templates.xml b/addons/website_customer/views/website_customer_templates.xml
index 7c44b38161d..d970252a638 100644
--- a/addons/website_customer/views/website_customer_templates.xml
+++ b/addons/website_customer/views/website_customer_templates.xml
@@ -44,7 +44,7 @@