[FIX] web: re-add title attribute for many2many tags that got lost
Co-authored-by: Nicolas Martinelli <nim@odoo.com> Closes #25693
This commit is contained in:
committed by
Nicolas Martinelli
co-authored by
Nicolas Martinelli
parent
b37416376b
commit
52fef21d81
@@ -834,7 +834,7 @@
|
||||
<t t-foreach="elements" t-as="el">
|
||||
<t t-set="color" t-value="el[colorField] || 0"/>
|
||||
<span t-attf-class="badge dropdown o_tag_color_#{color}" t-att-data-color="color" t-att-data-index="el_index" t-att-data-id="el.id">
|
||||
<span class="o_badge_text"><t t-esc="el.display_name"/></span>
|
||||
<span class="o_badge_text" t-att-title="el.display_name"><t t-esc="el.display_name"/></span>
|
||||
<span t-if="!readonly" class="fa fa-times o_delete"/>
|
||||
</span>
|
||||
</t>
|
||||
|
||||
@@ -10483,6 +10483,31 @@ QUnit.module('relational_fields', {
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
QUnit.test('widget many2many_tags', function (assert) {
|
||||
assert.expect(1);
|
||||
this.data.turtle.records[0].partner_ids = [2];
|
||||
|
||||
var form = createView({
|
||||
View: FormView,
|
||||
model: 'turtle',
|
||||
data: this.data,
|
||||
arch:'<form string="Turtles">' +
|
||||
'<sheet>' +
|
||||
'<field name="display_name"/>' +
|
||||
'<field name="partner_ids" widget="many2many_tags"/>' +
|
||||
'</sheet>' +
|
||||
'</form>',
|
||||
res_id: 1,
|
||||
});
|
||||
|
||||
assert.deepEqual(
|
||||
form.$('.o_field_many2manytags.o_field_widget .badge .o_badge_text').attr('title'),
|
||||
'second record', 'the title should be filled in'
|
||||
);
|
||||
|
||||
form.destroy();
|
||||
});
|
||||
|
||||
QUnit.module('FieldStatus');
|
||||
|
||||
QUnit.test('static statusbar widget on many2one field', function (assert) {
|
||||
|
||||
Reference in New Issue
Block a user