[IMP] report engine: printscreen: total computation now uses digits attribute from field if present
[FIX] report engine: printscreen: fixed wrong indentation bzr revid: olt@tinyerp.com-20101004135530-lj37yioz8kcfk0xd
This commit is contained in:
parent
1711150d96
commit
85bb4e09bc
|
@ -240,16 +240,15 @@ class report_printscreen_list(report_int):
|
|||
else:
|
||||
col.text = '/'
|
||||
|
||||
|
||||
|
||||
node_line = etree.SubElement(lines, 'row')
|
||||
for f in range(0, len(fields_order)):
|
||||
col = etree.SubElement(node_line, 'col', para='group', tree='no')
|
||||
col.set('tree', 'float')
|
||||
if tsum[f] != None:
|
||||
if tsum[f] >= 0.01 :
|
||||
prec = '%.2f'
|
||||
total = prec%(tsum[f])
|
||||
if tsum[f] != 0.0:
|
||||
digits = fields[fields_order[f]].get('digits', (16, 2))
|
||||
prec = '%%.%sf' % (digits[1], )
|
||||
total = prec % (tsum[f], )
|
||||
txt = str(total or '')
|
||||
else:
|
||||
txt = str(tsum[f] or '')
|
||||
|
|
Loading…
Reference in New Issue