-
- Downloads
[FIX] payment: properly uninstall if transaction exists
Before this commit: - Install the `payment` module - Generate a `payment.transaction` - Try to uninstall the `payment` module -> Uninstall process crashes and the DB is rolled back This happens because the field `acquirer_id` of the model `payment.transaction` is a required many2one with ondelete='set null' (the default), this of course makes no sense, and when the ORM tries to set the field of these records to NULL, it crashes. This has been fixed globally in saas-12.2 at ee6dc40a but for stable versions it is best to simply simulate the behavior of an ondelete='cascade' which is what this commit does via an uninstall_hook Fixes #37379 closes odoo/odoo#37422 Signed-off-by:Raphael Collet (rco) <rco@openerp.com>
Loading
Please register or sign in to comment