diff options
| author | Adrian Torres <adt@odoo.com> | 2021-03-04 13:27:37 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2021-03-10 13:12:15 +0000 |
| commit | 2e238f1e0202d65a98177939dac166dd659bb39c (patch) | |
| tree | e918e5a40d5e52c80d4b9d1ca0bb0c8ed57e4480 /odoo/addons/test_new_api/security/ir.model.access.csv | |
| parent | e66ef561d9b75eca307a1702fac4f8e4ada6237f (diff) | |
[FIX] base: do not assign default ondelete policy for base fields
Previously, an ondelete policy would be assigned to any required
Selection fields, the default policy being 'set null'.
Base fields do **not** require an ondelete value, since if they are
deleted there is no "data fix" to apply because the field's column is
dropped, and in fact it's error-prone to do so because during
`_process_ondelete`, the system would attempt to set to null fields that
were required (i.e. NOT NULL).
This issue is hidden by the fact that ir.model.fields are usually
deleted **before** ir.model.fields.selection and thus the ondelete
action won't be applied on the field with the original definition
(because it has probably been deleted by SQL CASCADE)
Diffstat (limited to 'odoo/addons/test_new_api/security/ir.model.access.csv')
0 files changed, 0 insertions, 0 deletions
