mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[MIG] web_widget_url_advanced: Migration to 12.0
This commit is contained in:
committed by
Jasmin Solanki
parent
f86d320df4
commit
d3771fb4b0
@@ -14,13 +14,12 @@ odoo.define('web_widget_url_advanced', function (require) {
|
||||
this._super.apply(this, arguments);
|
||||
// retrieve customized `<a />` text from a field
|
||||
// via `text_field` attribute or `options.text_field`
|
||||
// NOTE: `<field text_field="foo"..` is not supported in tree views.
|
||||
var text_field = this.attrs.text_field || this.attrs.options.text_field;
|
||||
var field_value = this.recordData[text_field];
|
||||
if (_.isObject(field_value) && _.has(field_value.data)) {
|
||||
field_value = field_value.data.display_name;
|
||||
}
|
||||
if (field_value) {
|
||||
if (text_field) {
|
||||
var field_value = this.recordData[text_field];
|
||||
if (_.isObject(field_value) && _.has(field_value.data)) {
|
||||
field_value = field_value.data.display_name;
|
||||
}
|
||||
this.attrs.text = field_value;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user