[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:
parent
d0f259ee02
commit
8b41906bf8
|
@ -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']) {
|
||||
|
|
Loading…
Reference in New Issue