[FIX] related are stored
bzr revid: fp@tinyerp.com-20091209095219-kzj9g3eetf5js2tf
This commit is contained in:
parent
920c9dd540
commit
3b12be5d20
|
@ -785,6 +785,9 @@ class related(function):
|
|||
self.arg = arg
|
||||
self._relations = []
|
||||
super(related, self).__init__(self._fnct_read, arg, self._fnct_write, fnct_inv_arg=arg, method=True, fnct_search=self._fnct_search, **args)
|
||||
if self.store is True:
|
||||
# TODO: improve here to change self.store = {...} according to related objects
|
||||
pass
|
||||
|
||||
def _field_get2(self, cr, uid, obj, context={}):
|
||||
if self._relations:
|
||||
|
|
|
@ -3165,7 +3165,9 @@ class orm(orm_template):
|
|||
','.join(tables) +qu1 + limit_str + offset_str, qu2)
|
||||
res = cr.fetchall()
|
||||
return res[0][0]
|
||||
|
||||
# execute the "main" query to fetch the ids we were searching for
|
||||
print 'select %s.id from ' % self._table + ','.join(tables) +qu1+' order by '+order_by+limit_str+offset_str, qu2
|
||||
cr.execute('select %s.id from ' % self._table + ','.join(tables) +qu1+' order by '+order_by+limit_str+offset_str, qu2)
|
||||
res = cr.fetchall()
|
||||
return [x[0] for x in res]
|
||||
|
|
Loading…
Reference in New Issue