From 2c6ee8908094e062077e8a65329f1b022954ad59 Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Fri, 22 Aug 2014 10:31:04 +0200 Subject: [PATCH] [FIX] osv/fields.py: enable argument 'obj' in property fields Fixes #1719 --- openerp/osv/fields.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openerp/osv/fields.py b/openerp/osv/fields.py index 61c18498baf..76aaadfc2db 100644 --- a/openerp/osv/fields.py +++ b/openerp/osv/fields.py @@ -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 )