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