[IMP][account_financial_report] Sending Unknown Partner at the end of the report
parent
2e4056201f
commit
85c799b4b4
|
@ -267,15 +267,23 @@ class account_balance(report_sxw.rml_parse):
|
||||||
|
|
||||||
self.cr.execute(query)
|
self.cr.execute(query)
|
||||||
res_dict = self.cr.dictfetchall()
|
res_dict = self.cr.dictfetchall()
|
||||||
|
unknown = False
|
||||||
for det in res_dict:
|
for det in res_dict:
|
||||||
i,d,c,b = det['balanceinit'], det['debit'], det['credit'], det['balance'],
|
i,d,c,b = det['balanceinit'], det['debit'], det['credit'], det['balance'],
|
||||||
any([bool(i),bool(d),bool(c),bool(b)]) and res.append({
|
if not any([i,d,c,b]):
|
||||||
|
continue
|
||||||
|
data = {
|
||||||
'partner_name': det['partner_name'],
|
'partner_name': det['partner_name'],
|
||||||
'balanceinit': i,
|
'balanceinit': i,
|
||||||
'debit': d,
|
'debit': d,
|
||||||
'credit': c,
|
'credit': c,
|
||||||
'balance': b,
|
'balance': b,
|
||||||
})
|
}
|
||||||
|
if not det['p_idx']:
|
||||||
|
unknown = data
|
||||||
|
continue
|
||||||
|
res.append(data)
|
||||||
|
unknown and res.append(unknown)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _get_analytic_ledger(self, account, ctx={}):
|
def _get_analytic_ledger(self, account, ctx={}):
|
||||||
|
|
Loading…
Reference in New Issue