summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-10-11 08:55:03 +0200
committerGéry Debongnie <ged@odoo.com>2017-10-12 16:14:47 +0200
commit7d448d57e34511eb668a695e9238a2096c05411e (patch)
tree8ad81a7b984a73a5e163cc26a2609363ca3c3d75 /addons/web/static/src/js/fields/basic_fields.js
parentb44a482c53d7f09aa4d2068c8589cca6fe624e26 (diff)
[FIX] web: fix issue with default_get/onchange and one2many
Before this commit, there was a bug when creating a new record which contains a one2many with an onchange. The commands sent to the onchange did not contain the full information. Here is how you could reproduce the issue: install expense, go to the expense list view, select the 2 lines, then, in the 'action' menu in the control panel, choose 'Expense: submit to manager'. In the new expense sheet, you could see that there were two lines in the one2many expense_line_ids. However, these lines are empty. The reason is that the commands sent in the onchange were 2 commands 0, with {} as data. So, in short, the BasicModel did generate the proper commands, but with empty data, in the specific case when we have a non empty one2many in a default_get, then an onchange. To solve this issue, I had to fix 2 things: the internal data struture was wrongly updated, and the commands should be generated with all the data, and not only the changes.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions