[FIX] fields: add property auto_join on many2many fields

This makes this property available on all relational fields, although the
feature is currently not implemented on many2many fields.
This commit is contained in:
Raphael Collet
2016-05-11 11:40:24 +02:00
parent 2e9644d10f
commit de54107fec
2 changed files with 3 additions and 0 deletions
+2
View File
@@ -1972,6 +1972,7 @@ class Many2many(_RelationalMulti):
'relation': None, # name of table
'column1': None, # column of table referring to model
'column2': None, # column of table referring to comodel
'auto_join': False, # whether joins are generated upon search
'limit': None, # optional limit to use upon read
}
@@ -2014,6 +2015,7 @@ class Many2many(_RelationalMulti):
_column_rel = property(attrgetter('relation'))
_column_id1 = property(attrgetter('column1'))
_column_id2 = property(attrgetter('column2'))
_column_auto_join = property(attrgetter('auto_join'))
_column_limit = property(attrgetter('limit'))
+1
View File
@@ -947,6 +947,7 @@ class many2many(_column):
args['relation'] = self._rel
args['column1'] = self._id1
args['column2'] = self._id2
args['auto_join'] = self._auto_join
args['limit'] = self._limit
return args