[[ repeatIn(ids_to_objects(data['form']['partner_ids']),'o') ]] [[ setLang(o.lang) ]] [[ repeatIn(adr_get(o,'invoice'),'a' )]] [[ o.name or '' ]] [[ a['street'] or '']] [[ a['street2'] or removeParentNode('para') ]] [[ a['zip'] or '' ]] [[ a['city'] or '' ]] [[( a['state_id'] and a['state_id'][1]) or removeParentNode('para') ]] [[( a['country_id'] and a['country_id'][1]) or '']] VAT: [[ o.vat or removeParentNode('para') ]] Document : Customer account statement Date : [[ formatLang(data['form']['date'],date=True) ]] Customer Ref : [[ o.ref or '' ]] [[ format(get_text(o,data['form']['followup_id'])) ]]
[[repeatIn(getLines(o), 'cur_lines') ]] Invoice Date Description Ref Maturity Date Due Paid Maturity Li. [[repeatIn(cur_lines['line'], 'line') ]] [[ formatLang(line['date'],date = True) ]] [[ line['name'] ]] [[ line['ref'] ]] [[ line['date_maturity'] and formatLang(line['date_maturity'], date=True) ]] [[ formatLang(line['debit']) ]] [[ line['currency_id'] ]] [[ formatLang(line['credit']) ]] [[ line['currency_id'] ]] [[ (line['date_maturity'] < time.strftime('%Y-%m-%d')) and formatLang(line['debit'] -line['credit']) or formatLang(0.0) ]] [[ line['currency_id'] or '']] [[ line['blocked'] and 'X' or '' ]] Sub-Total: [[formatLang(reduce(lambda x,y: x+y['debit'], cur_lines['line'], 0.00)) ]] [[ line['currency_id'] ]] [[formatLang(reduce(lambda x,y: x+y['credit'], cur_lines['line'], 0.00)) ]] [[ line['currency_id'] ]] [[ formatLang(reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), cur_lines['line']), 0)) ]] [[ line['currency_id'] ]] Balance: [[ formatLang((reduce(lambda x,y: x+(y['debit'] - y['credit']), cur_lines['line'], 0.00))) ]] [[line['currency_id'] ]]