[FIX] web: legacy fields
If the source field widget emitting a field_changed event is a m2o, the field changes of the event will all be considered as changes targeting a m2o and converted accordingly, resulting in server errors because the `onchange` call received a [None, None] value for a standard field (e.g. float). closes odoo/odoo#100007 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
This commit is contained in:
@@ -109,7 +109,7 @@ class FieldAdapter extends ComponentAdapter {
|
||||
const proms = [];
|
||||
for (const fieldName in payload.changes) {
|
||||
let value = payload.changes[fieldName];
|
||||
const fieldType = record.fields[name].type;
|
||||
const fieldType = record.fields[fieldName].type;
|
||||
if (fieldType === "many2one" && value) {
|
||||
value = [value.id, value.display_name];
|
||||
} else if (fieldType === "one2many" || fieldType === "many2many") {
|
||||
|
||||
Reference in New Issue
Block a user