summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpvy <pvy@odoo.com>2015-07-16 13:55:16 +0200
committerpvy <pvy@odoo.com>2015-07-16 16:24:55 +0200
commitf3eda82d4259bd0ea22149daa0cdbb95a454f996 (patch)
treec78961ffb0f98c9203ca38737428b03769d8d0a2
parentaca97c73a9fa4dae6cc84c080b53b91c59fbee6c (diff)
[FIX] account: _query_get() needs to return the table too
-rw-r--r--addons/account/models/account_move.py4
-rw-r--r--addons/account/models/partner.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/addons/account/models/account_move.py b/addons/account/models/account_move.py
index 89a2828b0ab..61323b8b62d 100644
--- a/addons/account/models/account_move.py
+++ b/addons/account/models/account_move.py
@@ -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):
diff --git a/addons/account/models/partner.py b/addons/account/models/partner.py
index c87a605292d..5757431941d 100644
--- a/addons/account/models/partner.py
+++ b/addons/account/models/partner.py
@@ -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