diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-04-05 22:34:10 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 7e14e819038bb3eccaebb781790c0c58f07f1c64 (patch) | |
| tree | 756604ae76e2222782d17af7826dceaa2d42ecfd /addons/web/static/src/js/fields/relational_fields.js | |
| parent | e8b9515980997884c2099cbed3e71a5a0120b9d0 (diff) | |
[FIX] web: one2many onchanges
When there is an onchange on fields of a one2many, the data given
to the onchange RPC should contain an additional key for the
corresponding many2one, mapping to the current data of the parent
(main) record.
This wasn't working before this rev. for new o2m records created
when the one2many wasn't editable inline (with a list view
editable), because in that particular case, the reference to the
parent record wasn't specified correctly.
Diffstat (limited to 'addons/web/static/src/js/fields/relational_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/relational_fields.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/relational_fields.js b/addons/web/static/src/js/fields/relational_fields.js index 43a7e664dc2..c7ff956fd7b 100644 --- a/addons/web/static/src/js/fields/relational_fields.js +++ b/addons/web/static/src/js/fields/relational_fields.js @@ -810,6 +810,7 @@ var FieldOne2Many = FieldX2Many.extend({ context: this.record.getContext(this.recordParams), field: this.field, fields_view: this.attrs.views && this.attrs.views.form, + parentID: this.value.id, viewInfo: this.view, })); }, |
