[FIX] account: _query_get() needs to return the table too

This commit is contained in:
pvy
2015-07-16 16:24:55 +02:00
parent aca97c73a9
commit f3eda82d42
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -1122,8 +1122,8 @@ class AccountMoveLine(models.Model):
where_clause_params = []
if domain:
query = self._where_calc(domain)
dummy, where_clause, where_clause_params = query.get_sql()
return where_clause, where_clause_params
tables, where_clause, where_clause_params = query.get_sql()
return tables, where_clause, where_clause_params
class AccountPartialReconcile(models.Model):
+1 -1
View File
@@ -179,7 +179,7 @@ class ResPartner(models.Model):
@api.multi
def _credit_debit_get(self):
where_clause, where_params = self.env['account.move.line']._query_get()
tables, where_clause, where_params = self.env['account.move.line']._query_get()
where_params = [tuple(self.ids)] + where_params
self._cr.execute("""SELECT l.partner_id, act.type, SUM(l.debit-l.credit)
FROM account_move_line l