Improved for partial reconciliation

bzr revid: fp@tinyerp.com-0d82028691622a4487984f8ea2543f36882df486
This commit is contained in:
Fabien Pinckaers 2008-02-07 19:30:54 +00:00
parent 722e5e489e
commit c346e6a79a
1 changed files with 4 additions and 1 deletions

View File

@ -414,11 +414,14 @@ class account_bank_statement_reconcile(osv.osv):
context=context).company_id.currency_id.id
for o in self.browse(cursor, user, ids, context=context):
td = ''
if o.statement_line:
currency_id = o.statement_line[0].statement_id.currency.id
if abs(o.statement_line[0].amount - (o.total_entry - o.total_new))>0.01:
td = 'P '
else:
currency_id = company_currency_id
res.append((o.id, '[%.2f/%.2f]' % (
res.append((o.id, '%s[%.2f/%.2f]' % (td,
res_currency_obj.compute(cursor, user, company_currency_id,
currency_id, o.total_entry, context=context),
res_currency_obj.compute(cursor, user, company_currency_id,