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

[FIX] fields: in `onchange`, do not serialize the inverse field of a one2many

parent 4b635a1d
No related branches found
No related tags found
No related merge requests found
......@@ -1858,6 +1858,12 @@ class One2many(_RelationalMulti):
_column_auto_join = property(attrgetter('auto_join'))
_column_limit = property(attrgetter('limit'))
def convert_to_onchange(self, value, fnames=None):
if fnames:
# do not serialize self's inverse field
fnames = [name for name in fnames if name != self.inverse_name]
return super(One2many, self).convert_to_onchange(value, fnames)
class Many2many(_RelationalMulti):
""" Many2many field; the value of such a field is the recordset.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment