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

[FIX] osv/fields.py: enable argument 'obj' in property fields

Fixes #1719
parent 80c09a8d
Branches
Tags
No related merge requests found
......@@ -1584,12 +1584,12 @@ class property(function):
def __init__(self, **args):
if 'view_load' in args:
_logger.warning("view_load attribute is deprecated on ir.fields. Args: %r", args)
obj = 'relation' in args and args['relation'] or ''
args = dict(args)
args['obj'] = args.pop('relation', '') or args.get('obj', '')
super(property, self).__init__(
fnct=self._fnct_read,
fnct_inv=self._fnct_write,
fnct_search=self._fnct_search,
obj=obj,
multi='properties',
**args
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment