diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-03-21 13:58:37 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-03-21 13:58:37 +0100 |
| commit | 4eff0af02ef2c182793fce5f32d2d15f53a5fba7 (patch) | |
| tree | 8790e0051f631240562a9408ccd5e2a5cd64782b /odoo/fields.py | |
| parent | 45e3e432a3621cf03a38ce48562eb967f1ff76e0 (diff) | |
| parent | 6878c9f3424f27df9b07a665f9c0f5ef6e254996 (diff) | |
[MERGE] forward port branch saas-12.1 up to 6878c9f3424
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 542e37aee6b..16a13bedbe4 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -2472,7 +2472,7 @@ class One2many(_RelationalMulti): to_relink = {} # lines to relink {line_id: record_id} def unlink(line_ids): - if comodel._fields[inverse].ondelete == 'cascade': + if getattr(comodel._fields[inverse], 'ondelete', False) == 'cascade': to_delete.extend(line_ids) else: to_relink.update(dict.fromkeys(line_ids, False)) |
