Open dz0 opened 4 months ago
Noticed when migrating from v13.0,
digging bit, I found the new onchange
trying to be smart -- https://github.com/odoo/odoo/pull/119510/files/#diff-1a4d514ed8aaa48bfdaf205130a09ccc3645c905369f35c1bd83b8dc2c2e3bc7R1145
Instead of returning full list, it returns Command.DELTETE for previous items, that should not be shown... and Command.CREATE or Command.LINK for the new ones..
I didn't find the JS code for handling onchange, but using dev-tools request inspection,
noticed, that JS tracks the changed fields in the form, and sends them back to server, so it knows to refresh them or so.
But JS part misses the case for initially loaded items that need to be "refreshed"/removed.
As very dumb workaround I can overwrite onchange
- see commented out part
Impacted versions: 17.0
Steps to reproduce:
0) having computed One2Many child_ids (minimal example src)
1) create a "Parent" record with
number=2
2) open it in form view
3) change
number
to 14) change
number
again (let's say to 3)Current behavior:
Expected behavior:
number