Community mailing list archives
One2many fields are broken... and now you could fix them, so please doby
- Sometimes odoo tries to add to a one2many field a record that it previously deleted (yes, not you, it).
- When you add newid records to a one2many, and odoo writes them to database, it does not update cache, so you still have the newid records in the field, while they should have ids and be persistent.
- When your one2many field has a lambda domain, Odoo evaluates it with a different `self` for reading and for writing.
Problems 1 and 2 are fixed in https://github.com/odoo/odoo/pull/13082 (v9, but they should backport the fix).
Problem 3 is fixed in https://github.com/odoo/odoo/issues/13480.
This is a call to Odoo people to please pay some attention to those PRs, at least thinking on the mental health of all the community developers 😁
We all know v10 is coming, so merging those before would ensure v10 gets sensible o2m fields again (if they ever were).
Apart from this, there are other problems, like https://github.com/odoo/odoo/issues/2693 and https://github.com/odoo/odoo/issues/13076, but given those could be somehow intentional, by design, or at least they don't have a pull request opened including tests and green bots like the others do, I understand they stay open.