Monday, January 10, 2022
1 change · master
Resolved issues and error corrections
This change prevents mail-related records from being deleted automatically in cases where a required link is simply changed to another record. It fixes a bug that could cause unintended data loss or broken behavior in mail features, making the system more reliable for users.
Original PR description
Previously, relational required fields had their auto-generated inverses defined with `isCausal: true`, which seemed logical: if a record is deleted, all the records that depend on it must be deleted too. In practice, it turned out to be a bad idea since there are some cases where you don't want the dependent records to be deleted. For example, there is no point in deleting the current record when a required field is replaced by another one. Furthermore, this actually led to the introduction of new bugs, as the one described in task-2730667. Fixes bug described in task-2730667. Reverts some of these changes: https://github.com/odoo/odoo/pull/81679