[FIX] web: avoid trying to access to deleted record message when change password
The onchange call can be made with empty ids list (which would fail). opw 610810
This commit is contained in:
@@ -504,8 +504,10 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||
// In case of a o2m virtual id, we should pass an empty ids list
|
||||
ids.push(self.datarecord.id);
|
||||
}
|
||||
def = self.alive(new instance.web.Model(self.dataset.model).call(
|
||||
"onchange", [ids, values, trigger_field_name, onchange_specs, context]));
|
||||
if (ids.length) {
|
||||
def = self.alive(new instance.web.Model(self.dataset.model).call(
|
||||
"onchange", [ids, values, trigger_field_name, onchange_specs, context]));
|
||||
}
|
||||
}
|
||||
return def.then(function(response) {
|
||||
if (widget && widget.field['change_default']) {
|
||||
|
||||
Reference in New Issue
Block a user