|
|
<?xml version="1.0" encoding="utf-8"?> <openerp> <data>
<template id="open_invoice_specific" inherit_id="report.assets_common"> <xpath expr="." position="inside"> <link href="/account_financial_report_qweb/static/src/css/report.css" rel="stylesheet"/> </xpath> </template>
<template id="open_invoice_report_qweb">
<div class="header"> <div class="row"> <div class="col-xs-4 text-left"> <h6><span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></h6> </div> <div class="col-xs-4 text-center"> <img t-if="res_company.logo" t-att-src="'data:image/png;base64,%s' % res_company.logo" style="max-height: 40px;"/> </div> <div class="col-xs-4 text-right"> <npage> <ul class="list-inline"> <li><span class="page"/></li> <li>/</li> <li><span class="topage"/></li> </ul> </npage> </div> </div> </div> <t t-call="report.html_container"> <t t-call="report.internal_layout"> <div class="page">
<!-- Generic information --> <div class="act_as_table data_table"> <div class="act_as_thead"> <div class="act_as_row labels"> <div class="act_as_cell first_column">Company</div> <div class="act_as_cell">At Date</div> <div class="act_as_cell">Accounts Filter</div> <div class="act_as_cell">Target Moves</div> </div> </div> <div class="act_as_tbody"> <div class="act_as_row"> <div class="act_as_cell first_column"><span t-esc="header['company']"/></div> <div class="act_as_cell"><span t-esc="header['at_date']"/></div> <div class="act_as_cell"><span t-esc="header['account_filters']"/></div> <div class="act_as_cell"><span t-esc="header['target_moves']"/></div> </div> </div> </div>
<!-- Group by account --> <t t-foreach="docs.read_group([('id', 'in', docs.ids)],['account_id'],['account_id'])" t-as="acc"> <t t-set="account" t-value="account_obj.browse(acc['account_id'][0])"/> <t t-set="account_debit" t-value="0.0" /> <t t-set="account_credit" t-value="0.0" /> <t t-set="account_balance" t-value="0.0" /> <div class="act_as_caption account_title"> <span t-esc="account.code"/> - <span t-esc="account.name"/> </div> <!-- Group by partner --> <t t-foreach="docs.read_group([('id', 'in', docs.ids), ('account_id', '=', account.id)],['partner_id'],['partner_id'])" t-as="part"> <t t-set="partner" t-value="partner_obj.browse(part['partner_id'][0])"/> <t t-set="partner_debit" t-value="0.0" /> <t t-set="partner_credit" t-value="0.0" /> <t t-set="partner_balance" t-value="0.0" /> <div class="act_as_caption account_title"> <span t-esc="partner.name"/> </div> <!-- Group by currency --> <t t-foreach="docs.read_group([('id', 'in', docs.ids), ('account_id', '=', account.id), ('partner_id', '=', partner.id)],['currency_id'],['currency_id'])" t-as="curr"> <t t-set="currency_id" t-value="False" /> <t t-if="curr['currency_id']"> <t t-set="currency" t-value="currency_obj.browse(curr['currency_id'][0])"/> <t t-set="currency_id" t-value="currency.id"/> </t> <t t-set="currency_debit" t-value="0.0" /> <t t-set="currency_credit" t-value="0.0" /> <t t-set="currency_balance" t-value="0.0" /> <t t-set="currency_amount_balance" t-value="0.0"/> <t t-if="currency_id"> <div class="act_as_caption account_title"> <span t-esc="currency.name"/> </div> </t> <div class="act_as_table data_table"> <div class="act_as_thead"> <div class="act_as_row labels"> <div class="act_as_cell first_column">Date</div> <div class="act_as_cell">Entry</div> <div class="act_as_cell">Journal</div> <div class="act_as_cell">Partner</div> <div class="act_as_cell">Reference</div> <div class="act_as_cell">Label</div> <div class="act_as_cell">Due Date</div> <div class="act_as_cell">Debit</div> <div class="act_as_cell">Credit</div> <div class="act_as_cell">Cum. Balance</div> <t t-if="curr['currency_id']"> <div class="act_as_cell">Curr. amount</div> <div class="act_as_cell">Cum. Curr. Bal.</div> </t> </div> </div> <div class="act_as_tbody"> <t t-set="moves" t-value="docs.search( [('id', 'in', docs.ids), ('account_id', '=', account.id), ('partner_id', '=', partner.id), ('currency_id', '=', currency_id)])"/> <t t-foreach="moves" t-as="move"> <div class="act_as_row"> <div class="act_as_cell first_column"><span t-esc="move.date"/></div> <div class="act_as_cell"><span t-esc="move.move_id.name"/></div> <div class="act_as_cell"><span t-esc="move.journal_id.code"/></div> <div class="act_as_cell"><span t-esc="partner.name"/></div> <div class="act_as_cell"><span t-esc="move.ref"/></div> <div class="act_as_cell"><span t-esc="move.name"/> <t t-if="move.invoice_id"> - <span t-esc="move.invoice_id.number"/></t> </div> <div class="act_as_cell"><span t-esc="move.date_maturity"/></div> <t t-set="account_debit" t-value="account_debit + move.debit" /> <t t-set="account_credit" t-value="account_credit + move.credit" /> <t t-set="account_balance" t-value="account_balance - move.credit + move.debit" /> <t t-set="partner_debit" t-value="partner_debit + move.debit" /> <t t-set="partner_credit" t-value="partner_credit + move.credit" /> <t t-set="partner_balance" t-value="partner_balance - move.credit + move.debit" /> <t t-set="currency_balance" t-value="currency_balance + move.amount_currency" /> <div class="act_as_cell amount"><span t-esc="move.debit"/></div> <div class="act_as_cell amount"><span t-esc="move.credit"/></div> <div class="act_as_cell amount"><span t-esc="partner_balance"/></div> <t t-if="currency_id"> <div class="act_as_cell amount"><span t-esc="move.amount_currency"/></div> <div class="act_as_cell amount"><span t-esc="currency_balance"/></div> </t> </div> </t> </div> </div> <t t-if="currency_id"> <div class="act_as_table totals_table"> <div class="act_as_row"> <div class="act_as_cell first_column"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell account_title"><span t-esc="currency.name"/> Total</div> <div class="act_as_cell amount"><strong><span t-esc="currency_balance" /></strong></div> </div> </div> </t> </t> <div class="act_as_table totals_table"> <div class="act_as_row"> <div class="act_as_cell first_column"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell account_title"><span t-esc="partner.name"/> Total</div> <div class="act_as_cell amount"><strong><span t-esc="partner_debit" /></strong></div> <div class="act_as_cell amount"><strong><span t-esc="partner_credit" /></strong></div> <div class="act_as_cell amount"><strong><span t-esc="partner_balance" /></strong></div> </div> </div> </t> <div class="act_as_table totals_table"> <div class="act_as_row"> <div class="act_as_cell first_column"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell"/> <div class="act_as_cell account_title"><span t-esc="account.name"/> Total</div> <div class="act_as_cell amount"><span t-esc="account_debit" /></div> <div class="act_as_cell amount"><span t-esc="account_credit" /></div> <div class="act_as_cell amount"><span t-esc="account_balance" /></div> </div> </div> </t> </div> </t> </t>
</template>
</data> </openerp>
|