[FIX] website: resolving traceback Issue when creating Tasks/Tickets
Issue: A traceback error was observed when attempting to create a task or ticket using the website form. Cause: This issue arise as a result of converting RPC to ORM readSearch. The problem lay in the domain being passed to the ORM. Not all fields had a defined domain, causing 'undefined' to be passed to the ORM, leading to the traceback error. Fix: To address this, we have introduced an 'or' condition within the domain. Now, if a field has a domain, it will be passed accordingly; otherwise, an empty array is set as the domain. This modification resolves the traceback issue. Task-3526887 closes odoo/odoo#137359 Signed-off-by: Romain Derie (rde) <rde@odoo.com>
This commit is contained in:
@@ -71,7 +71,7 @@ const FormEditor = options.Class.extend({
|
||||
display_name: el[1],
|
||||
}));
|
||||
} else if (field.relation && field.relation !== 'ir.attachment') {
|
||||
field.records = await this.orm.searchRead(field.relation, field.domain, ["display_name"]);
|
||||
field.records = await this.orm.searchRead(field.relation, field.domain || [], ["display_name"]);
|
||||
}
|
||||
return field.records;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user