Skip to content
Snippets Groups Projects
Commit 816ba6f5 authored by Raphael Collet's avatar Raphael Collet
Browse files

[FIX] fields: ondelete being None on many2many field


The issue is simply creating a related stored many2many field, which is
pretty easy to do with Studio.  When creating the field, Odoo crashes
with a traceback caused by ondelete being None on the field.

The source of the bug is the fact that the attribute field.ondelete is
set to a sensible default ('cascade') on non-related fields only.  The
fix consists in setting the default value on the attribute itself, so
that the setup of the field never falls on a case where field.ondelete
is unset.

closes odoo/odoo#86255

X-original-commit: 2bb126c5
Signed-off-by: default avatarRaphael Collet <rco@odoo.com>
parent 40bbca97
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment