[FIX] web: magic commands in search domain
Before this commit, when we used a domain on many to many relational
fields, the `dataContext()` returned the context of the field, which
contained a command tuple.
This causes an error server side, when a domain [('id', 'in', [[6,
False, [3,4]]])] is provided to search available records to fill the x2m
field.
Now, it returns the `currentIds`, which correctly gives the id(s) of the
records.
Approved by SAD
X-original-commit: 5653e23a333262683257575d071575a63981ca33
Part-of: odoo/odoo#101352
Co-authored-by: Valentin Chevalier <vcr@odoo.com>
This commit is contained in:
co-authored by
Valentin Chevalier
parent
80b19b11d6
commit
673b784f86
@@ -446,7 +446,7 @@ export class Record extends DataPoint {
|
||||
evalContext[fieldName] = false;
|
||||
} else if (isX2Many(this.fields[fieldName])) {
|
||||
const list = this._cache[fieldName];
|
||||
evalContext[fieldName] = list.getContext();
|
||||
evalContext[fieldName] = list.currentIds;
|
||||
// ---> implied to initialize (resIds, commands) currentIds before loading static list
|
||||
} else if (value && this.fields[fieldName].type === "date") {
|
||||
evalContext[fieldName] = serializeDate(value);
|
||||
|
||||
Reference in New Issue
Block a user