Browse Source

[FIX] onchange_helper: invert condition to avoid [None]

Co-Authored-By: lmignon <laurent.mignon@acsone.eu>
10.0
Arnaud Pineux 6 years ago
committed by Laurent Mignon (ACSONE)
parent
commit
adf6172a65
  1. 5
      onchange_helper/models/models.py

5
onchange_helper/models/models.py

@ -132,7 +132,10 @@ class Base(models.AbstractModel):
if self:
self.ensure_one()
if not isinstance(onchange_fields, list):
if not onchange_fields:
onchange_fields = values.keys()
elif not isinstance(onchange_fields, list):
onchange_fields = [onchange_fields]
if not onchange_fields:

Loading…
Cancel
Save