Files
odoo_source/addons/analytic/tests/__init__.py
T
william-andre 0ff125b957 [FIX] analytic: prevent errors when a plan or an account is deleted
Deleting an account or a plan shouldn't raise errors or provoke errors
elsewhere.
Since the `analytic_distribution` doesn't have a proper foreign key, an
account might be deleted while still being referenced. Because of this
the code needs to be defensive everywhere: we can't trust the content of
the JSON field.

Also, add tests to ensure that we can't delete a plan while the field is
still referenced in views.

closes odoo/odoo#152494

Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
2024-02-05 23:51:14 +00:00

5 lines
96 B
Python

# -*- coding: utf-8 -*-
from . import test_analytic_account
from . import test_plan_operations