diff options
| author | Goffin Simon <sig@odoo.com> | 2018-03-21 14:02:09 +0100 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2018-03-22 10:56:31 +0100 |
| commit | dcf77ee9f9c816d8daef474bf566e89411b45bdd (patch) | |
| tree | 1c7edc93426c8cc347bd99ef99c52c9c0ab88507 | |
| parent | 88170774a77d64dbb8d990d703e65061bd7d752c (diff) | |
[FIX] web: Modify existing sales order lines
Steps to reproduce:
- Create a sale order and add sale order lines(Not Inline) without saving the sale order.
- Edit any of the existing sale order line and hit on "Save & New" on the sale order line.
- Add another sale order line and hit on "Save & Close"
Bug:
A validation error was raised.
opw:1829723
| -rw-r--r-- | addons/web/static/src/js/views/form_relational_widgets.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/form_relational_widgets.js b/addons/web/static/src/js/views/form_relational_widgets.js index f6e18384c20..2ca483eac2b 100644 --- a/addons/web/static/src/js/views/form_relational_widgets.js +++ b/addons/web/static/src/js/views/form_relational_widgets.js @@ -1118,6 +1118,11 @@ var One2ManyListView = X2ManyListView.extend({ self.x2m.reload_current_view(); }); }, + create_function: function(data, options) { + return self.x2m.data_create(data, options).done(function() { + self.x2m.reload_current_view(); + }); + }, alternative_form_view: self.x2m.field.views ? self.x2m.field.views.form : undefined, parent_view: self.x2m.view, child_name: self.x2m.name, |
