projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
80c09a8
)
[FIX] osv/fields.py: enable argument 'obj' in property fields
author
Raphael Collet
<rco@openerp.com>
Fri, 22 Aug 2014 08:31:04 +0000
(10:31 +0200)
committer
Raphael Collet
<rco@openerp.com>
Fri, 22 Aug 2014 10:10:46 +0000
(12:10 +0200)
Fixes #1719
openerp/osv/fields.py
patch
|
blob
|
history
diff --git
a/openerp/osv/fields.py
b/openerp/osv/fields.py
index
61c1849
..
76aaadf
100644
(file)
--- 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
)