[FIX] website_slide: fix improper display of values

Before this commit, some tag would not display correctly in the tag list of eLearning

This commit fixes this behavior

closes odoo/odoo#108286

X-original-commit: df1b22f23511ec82687d28a284ab8696fcd2aef4
Related: odoo/enterprise#35091
Signed-off-by: Vranckx Florian (flvr) <flvr@odoo.com>
This commit is contained in:
Florian Vranckx
2022-12-20 09:25:28 +01:00
parent 45850003f1
commit 590e54593a
2 changed files with 4 additions and 4 deletions
@@ -103,11 +103,11 @@ var TagCourseDialog = Dialog.extend({
formatNoMatches: false,
selection_data: false,
fetch_rpc_fnc: fetchFNC,
formatSelection: function (data) {
formatSelection: function (data, container, fmt) {
if (data.tag) {
data.text = data.tag;
}
return data.text;
return fmt(data.text);
},
createSearchChoice: function (term, data) {
var addedTags = $(this.opts.element).select2('data');
@@ -285,11 +285,11 @@ var SlideUploadDialog = Dialog.extend({
formatNoMatches: false,
selection_data: false,
fetch_rpc_fnc: fetchFNC,
formatSelection: function (data) {
formatSelection: function (data, container, fmt) {
if (data.tag) {
data.text = data.tag;
}
return data.text;
return fmt(data.text);
},
createSearchChoice: function (term, data) {
var addedTags = $(this.opts.element).select2('data');