diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-08-30 10:38:53 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-08-30 12:29:47 +0200 |
| commit | f1082f15525ccf42b1fb95fb7da0211eaf64fcb9 (patch) | |
| tree | 452c0aca5662fe2602fb3a873175c218e95cfcee /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 96b1db4cd44ab70c5a7014ee36a8b475e1c5e38a (diff) | |
[FIX] web: don't send virtual id on save
The problem occurred on form views with an x2many field with a
default value containing CREATE commands, i.e. when opening such
a form view in create mode, the x2many field is pre-filled with
some (non-existing yet) subrecords.
If the user then edited those subrecords, and then clicked on
'Save' to create the main record, an 'UPDATE' command was sent
alongside the 'CREATE' one for the x2many, and the id of the
'UPDATE' command was a virtual id (as the subrecord didn't exist
yet), and it crashed.
This could happen in MRP:
- Enable lots in Iventory
- Choose a product which is a component of another (through mrp bom)
- Set this product as tracked by lot
- Set this product inventory quantity to 0
- Create a new manufacturing order for the product for which it is a
component
- Click on "Check Availability"
- click on Produce: the many2many already contains a subrecord
- edit the lot field of that subrecord
- click on 'Record Production'
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions
