[FIX] account: _query_get() needs to return the table too
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user