[FIX] spreadsheet: fix global filter display name
This commit fixes the bug of undefined filter display name. A few weeks ago the property names of record when updating record selector have been modified. Previously it's `name` but now it's `display_name`. This is the root cause of the bug. task 3453374 closes odoo/odoo#130724 Related: odoo/enterprise#45349 Signed-off-by: Rémi Rahir (rar) <rar@odoo.com>
This commit is contained in:
+3
-3
@@ -48,11 +48,11 @@ export class RecordsSelector extends Component {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {{ id: number; name?: string}[]} records
|
||||
* @param {{ id: number; display_name?: string}[]} records
|
||||
*/
|
||||
update(records) {
|
||||
for (const record of records.filter((record) => record.name)) {
|
||||
this.displayNames[record.id] = record.name;
|
||||
for (const record of records.filter((record) => record.display_name)) {
|
||||
this.displayNames[record.id] = record.display_name;
|
||||
}
|
||||
this.notifyChange(this.props.resIds.concat(records.map(({ id }) => id)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user