summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2019-01-10 12:28:38 +0000
committerAdrian Torres <adt@odoo.com>2019-01-29 16:17:03 +0000
commitee6dc40a607626147429389d8f4746f697fadaa6 (patch)
tree9a4f66f0b19cbeac08fdda312241323dbefaf34c /addons/web/static/src/js/views/basic/basic_controller.js
parent9ea1eb7aa5e30e3d37131da6acf1b81421de5049 (diff)
[IMP] fields: forbid required m2o ondelete set null
A many2one field that is required means that its column cannot contain null values, however the default ondelete policy for all m2o fields is `set null`, which contradicts `required=True`. This patch will, by default, apply the `restrict` policy to required m2o fields unless the ondelete attribute is explicitly specified. However, if the policy specified is `set null`, a ValueError will be raised whenever the registry registers the field as this makes no sense. The default ondelete policy remains unchanged for non-required m2o fields (set null) closes odoo/odoo#30122
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions