Browse Source

[IMP][account_financial_report] Sending Unknown Partner at the end of the report

pull/7/merge
Humberto Arocha 11 years ago
parent
commit
85c799b4b4
  1. 12
      account_financial_report/report/parser.py

12
account_financial_report/report/parser.py

@ -267,15 +267,23 @@ class account_balance(report_sxw.rml_parse):
self.cr.execute(query)
res_dict = self.cr.dictfetchall()
unknown = False
for det in res_dict:
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'],
'balanceinit': i,
'debit': d,
'credit': c,
'balance': b,
})
}
if not det['p_idx']:
unknown = data
continue
res.append(data)
unknown and res.append(unknown)
return res
def _get_analytic_ledger(self, account, ctx={}):

Loading…
Cancel
Save