Merge pull request #458 from odoonz/format-fix3
Format Improvements for customer outstanding statementpull/517/head
commit
dcfa7e889e
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
'name': 'Partner Outstanding Statement',
|
'name': 'Partner Outstanding Statement',
|
||||||
'version': '11.0.2.0.0',
|
'version': '11.0.2.1.0',
|
||||||
'category': 'Accounting & Finance',
|
'category': 'Accounting & Finance',
|
||||||
'summary': 'OCA Financial Reports',
|
'summary': 'OCA Financial Reports',
|
||||||
'author': "Eficent, Odoo Community Association (OCA)",
|
'author': "Eficent, Odoo Community Association (OCA)",
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
.table-statement {
|
||||||
|
.amount {
|
||||||
|
text-align: right !important;
|
||||||
|
width: 14% //spread 7 columns evenly
|
||||||
|
}
|
||||||
|
thead {
|
||||||
|
border-bottom: solid; // required for clean layout
|
||||||
|
tr th:first-child {
|
||||||
|
width: auto !important; // required for clean layout
|
||||||
|
}
|
||||||
|
tr th:last-child {
|
||||||
|
width: 16% !important; // required for boxed layout
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.statement-blocked {
|
||||||
|
background-color: @gray-lighter-darker !important;
|
||||||
|
td:last-child {
|
||||||
|
background-color: @gray-lighter-darker !important;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,184 +2,162 @@
|
||||||
<!-- Copyright 2018 Eficent Business and IT Consulting Services S.L.
|
<!-- Copyright 2018 Eficent Business and IT Consulting Services S.L.
|
||||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||||
<odoo>
|
<odoo>
|
||||||
|
<template id="report_assets_common" name="oca_statements report assets" inherit_id="web.report_assets_common">
|
||||||
|
<xpath expr="." position="inside">
|
||||||
|
<link href="/customer_outstanding_statement/static/src/less/layout_statement.less" rel="stylesheet"/>
|
||||||
|
</xpath>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template id="customer_outstanding_statement.statement_document">
|
<template id="customer_outstanding_statement.statement_document">
|
||||||
<t t-call="web.external_layout">
|
<t t-call="web.external_layout">
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-xs-5 col-xs-offset-7">
|
<div name="statement_address" class="col-xs-5 col-xs-offset-7">
|
||||||
<span t-field="o.name"/><br/>
|
<address t-esc="o"
|
||||||
<span t-raw="o.contact_address.replace('\n\n', '\n').replace('\n', '<br>')"/>
|
t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}'/>
|
||||||
|
<div t-if="o.vat" class="mt16"><t t-esc="o.country_id.vat_label or 'TIN'"/>:
|
||||||
<span t-field="o.vat"/>
|
<span t-field="o.vat"/>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<h4 style="padding-left:15em;padding-top:2em">
|
<h4 style="padding-left:15em;padding-top:2em">
|
||||||
Outstanding Statement
|
Outstanding Statement
|
||||||
</h4>
|
</h4>
|
||||||
<p>
|
<p>
|
||||||
Date: <span t-esc="Date[o.id]" /><br/><!--Today-->
|
Date: <span t-esc="Date[o.id]"/><br/><!--Today-->
|
||||||
<t t-if="o.ref">Partner ref: <span t-field="o.ref"/></t>
|
<t t-if="o.ref">Partner ref:<span t-field="o.ref"/></t>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<t t-if="Lines[o.id]">
|
<t t-if="Lines[o.id]">
|
||||||
<br/>
|
<br/>
|
||||||
<t t-foreach="Lines[o.id]" t-as="currency">
|
<t t-foreach="Lines[o.id]" t-as="currency">
|
||||||
<br t-if="not currency_first" />
|
<br t-if="not currency_first"/>
|
||||||
<p t-if="account_type == 'receivable'">
|
<p>
|
||||||
+ Customer Outstanding Statement at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
|
<span t-esc="'Customer' if account_type == 'receivable' else 'Supplier'"/>
|
||||||
+ </p>
|
Outstanding Statement at
|
||||||
<p t-if="account_type == 'payable'">
|
<span t-esc="Date_end[o.id]"/>
|
||||||
+ Supplier Outstanding Statement at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
|
in <span t-esc="Currencies[o.id][currency].name"/>:
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
<table class="table table-condensed" style="border: 1px solid black; border-collapse: collapse;">
|
<table class="table table-condensed table-statement">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="border-right: 1px solid black;">Reference number</th>
|
<th>Reference number</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">Date</th>
|
<th>Date</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">Due Date</th>
|
<th>Due Date</th>
|
||||||
<th style="border-right: 1px solid black;">Description</th>
|
<th>Description</th>
|
||||||
<th class="text-right" style="border-right: 1px solid black;">Original Amount</th>
|
<th class="amount">Original Amount</th>
|
||||||
<th class="text-right" style="border-right: 1px solid black;">Open Amount</th>
|
<th class="amount">Open Amount</th>
|
||||||
<th class="text-right" style="border-right: 1px solid black;">Balance</th>
|
<th class="amount">Balance</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr t-foreach="Lines[o.id][currency]" t-as="line">
|
<tr t-foreach="Lines[o.id][currency]" t-as="line"
|
||||||
<t t-if="not line['blocked']">
|
t-att-class="'statement-blocked' if line['blocked'] else ''">
|
||||||
<td style="border-right: 1px solid black;">
|
|
||||||
|
<td>
|
||||||
<span t-esc="line['move_id']"/>
|
<span t-esc="line['move_id']"/>
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right: 1px solid black;">
|
<td>
|
||||||
<span t-esc="line['date']"/>
|
<span t-esc="line['date']"/>
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right: 1px solid black;">
|
<td>
|
||||||
<span t-esc="line['date_maturity']"/>
|
<span t-esc="line['date_maturity']"/>
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right: 1px solid black;">
|
<td>
|
||||||
<t t-if="line['name'] != '/'">
|
<t t-if="line['name'] != '/'">
|
||||||
<t t-if="not line['ref']"><span t-esc="line['name']"/></t>
|
<t t-if="not line['ref']">
|
||||||
|
<span t-esc="line['name']"/>
|
||||||
|
</t>
|
||||||
<t t-if="line['ref'] and line['name']">
|
<t t-if="line['ref'] and line['name']">
|
||||||
<t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
|
<t t-if="line['name'] not in line['ref']">
|
||||||
<t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
|
<span t-esc="line['name']"/>
|
||||||
|
</t>
|
||||||
|
<t t-if="line['ref'] not in line['name']">
|
||||||
|
<span t-esc="line['ref']"/>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="line['open_amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
</t>
|
</t>
|
||||||
<t t-if="line['blocked']">
|
<t t-if="line['name'] == '/'">
|
||||||
<td style="border-right: 1px solid black; background-color: grey;">
|
<span t-esc="line['ref']"/>
|
||||||
<span t-esc="line['move_id']"/>
|
|
||||||
</td>
|
|
||||||
<td style="border-right: 1px solid black; background-color: grey;">
|
|
||||||
<span t-esc="line['date']"/>
|
|
||||||
</td>
|
|
||||||
<td style="border-right: 1px solid black; background-color: grey;">
|
|
||||||
<span t-esc="line['date_maturity']"/>
|
|
||||||
</td>
|
|
||||||
<td style="border-right: 1px solid black; background-color: grey;">
|
|
||||||
<t t-if="line['name'] != '/'">
|
|
||||||
<t t-if="not line['ref']"><span t-esc="line['name']"/></t>
|
|
||||||
<t t-if="line['ref'] and line['name']">
|
|
||||||
<t t-if="line['name'] not in line['ref']"><span t-esc="line['name']"/></t>
|
|
||||||
<t t-if="line['ref'] not in line['name']"><span t-esc="line['ref']"/></t>
|
|
||||||
</t>
|
</t>
|
||||||
</t>
|
|
||||||
<t t-if="line['name'] == '/'"><span t-esc="line['ref']"/></t>
|
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black; background-color: grey;">
|
<td class="amount">
|
||||||
<span t-esc="line['amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="line['amount']"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black; background-color: grey;">
|
<td class="amount">
|
||||||
<span t-esc="line['open_amount']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="line['open_amount']"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black; background-color: grey;">
|
<td class="amount">
|
||||||
<span t-esc="line['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="line['balance']"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
</t>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="border-right: 1px solid black;"/>
|
<td/>
|
||||||
<td style="border-right: 1px solid black;">
|
<td>
|
||||||
<span t-esc="Date_end[o.id]"/>
|
<span t-esc="Date_end[o.id]"/>
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right: 1px solid black;"/>
|
<td/>
|
||||||
<td style="border-right: 1px solid black;">
|
<td>
|
||||||
Ending Balance
|
Ending Balance
|
||||||
</td>
|
</td>
|
||||||
<td style="border-right: 1px solid black;"/>
|
<td/>
|
||||||
<td style="border-right: 1px solid black;"/>
|
<td/>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Amount_Due[o.id][currency]" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="Amount_Due[o.id][currency]"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
Aging Report at <span t-esc="Date_end[o.id]" /> in <span t-esc="Currencies[o.id][currency].name"/>:
|
Aging Report at <span t-esc="Date_end[o.id]"/> in <span t-esc="Currencies[o.id][currency].name"/>:
|
||||||
</p>
|
</p>
|
||||||
<table class="table table-condensed" t-if="Show_Buckets" style="border: 1px solid black; border-collapse: collapse;">
|
<table class="table table-condensed table-statement" t-if="Show_Buckets">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">Current Due</th>
|
<th class="amount">Current Due</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">1-30 Days Due</th>
|
<th class="amount">1-30 Days</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">30-60 Days Due</th>
|
<th class="amount">30-60 Days</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">60-90 Days Due</th>
|
<th class="amount">60-90 Days</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">90-120 Days Due</th>
|
<th class="amount">90-120 Days</th>
|
||||||
<th class="text-center" style="border-right: 1px solid black;">+120 Days Due</th>
|
<th class="amount">+120 Days</th>
|
||||||
<th class="text-right" style="border-right: 1px solid black;">Balance Due</th>
|
<th class="amount">Balance Due</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr t-if="currency in Buckets[o.id]">
|
<t t-set="buckets" t-value="Buckets[o.id].get(currency, {})"/>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<tbody>
|
||||||
<span t-esc="Buckets[o.id][currency]['current']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<tr>
|
||||||
|
<td class="amount">
|
||||||
|
<span t-esc="buckets.get('current', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['b_1_30']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('b_1_30', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['b_30_60']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('b_30_60', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['b_60_90']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('b_60_90', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['b_90_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('b_90_120', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['b_over_120']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('b_over_120', 0.0)"
|
||||||
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</td>
|
</td>
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
<td class="amount">
|
||||||
<span t-esc="Buckets[o.id][currency]['balance']" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
<span t-esc="buckets.get('balance', 0.0)"
|
||||||
</td>
|
t-options="{'widget': 'monetary', 'display_currency': currency}"/>
|
||||||
</tr>
|
|
||||||
<tr t-if="currency not in Buckets[o.id]">
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
|
||||||
<td class="text-right" style="border-right: 1px solid black;">
|
|
||||||
<span t-esc="0.0" t-esc-options='{"widget": "monetary", "display_currency": "currency"}'/>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
|
@ -205,7 +183,7 @@
|
||||||
model="res.partner"
|
model="res.partner"
|
||||||
report_type="qweb-pdf"
|
report_type="qweb-pdf"
|
||||||
menu="False"
|
menu="False"
|
||||||
string="Statement Action to PDF"
|
string="Outstanding Statement"
|
||||||
name="customer_outstanding_statement.statement"
|
name="customer_outstanding_statement.statement"
|
||||||
file="customer_outstanding_statement.statement"
|
file="customer_outstanding_statement.statement"
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue