diff options
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/views/form/form_controller.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/form/form_controller.js b/addons/web/static/src/js/views/form/form_controller.js index 4a0561e2eca..7435332ecf4 100644 --- a/addons/web/static/src/js/views/form/form_controller.js +++ b/addons/web/static/src/js/views/form/form_controller.js @@ -454,7 +454,11 @@ var FormController = BasicController.extend({ } else { // save the record but don't switch to readonly mode def = this.saveRecord({stayInEdit: true, reload: false}).then(function () { - return self._callButtonAction(attrs, event.data.record); + // we need to reget the record to make sure we have changes made + // by the basic model, such as the new res_id, if the record is + // new. + var record = self.model.get(event.data.record.id); + return self._callButtonAction(attrs, record); }); } def.then(function () { |
