Files
odoo_source/addons/account/views/report_statement.xml
T
Laurent Smet caeb782841 [IMP] account,*: Improve bank statements/payments workflow
- Create journal entries as soon as bank/cash statement lines are created, temporary booked on a suspense account set on the journal.
- Simplify the management of "blue" lines in the reconciliation widget. A "blue" line is now a journal item using a temporary liquidity account (outstanding payment/receipt accounts, set on the journal).
- Adapt and simplify the bank reconciliation report.
- Remove the bank reconciliation threshold date. The reconciliation report will show the not already reconciled journal entries using a liquidity account and the not already reconciled journal entries using a temporary liquidity account. Without accounting, an account.payment will involve directly the liquidity account and then, will be considered as a statement line directly.
- Remove the post_at bank reconciliation feature. The "paid" state will be set on the invoices only if reconciled with a journal entry involving the journal's liquidity account.
    With invoicing, the payment will do that so the "in_payment" state should never be shown up.
    With accounting, only the statement lines have the power to move an invoice to the "paid" state.
- Fix various corner cases about the management of multi-currency in bank statement lines.
- Fix the conversion dates in multi-currency: Since the bank/cash is always used on the statement lines, it will use always the real "bank" date instead of the fictive payment one.
- Ensure the 'reconcile' method will raise an error if the involved moves are not posted.

related enterprise PR odoo/enterprise#7019

closes odoo/odoo#41301

--task: 2092096
Related: odoo/upgrade#1018
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-04-10 09:47:24 +00:00

123 lines
7.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="report_statement">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.internal_layout">
<div class="page">
<div class="border border-top-0 border-right-0 border-left-0 border-info">
<div class="row">
<div class="col-12">
<h4 class="text-right w-100">
<strong>
<span t-if="o.journal_id.type == 'bank'">Bank Statement</span>
<span t-else="">Cash Statement</span>
</strong>
</h4>
</div>
</div>
</div>
<div class="pt-2 pb-2">
<div class="row">
<div class="col-12">
<h5>
<strong>
<span t-field="o.journal_id"/>
<t t-if="o.journal_id.bank_account_id"> -
<span t-field="o.journal_id.bank_account_id"/>
</t>
<t t-if="o.journal_id.code"> -
<span t-field="o.journal_id.code"/>
</t>
</strong>
</h5>
</div>
</div>
<div class="row">
<div class="col-12">
<h5>
<strong>
<t t-if="o.name">
<span t-field="o.name"/>
- </t>
<span t-field="o.date"/>
</strong>
</h5>
</div>
</div>
</div>
<table class="table table-lg m-0 table-borderless border border-right-0 border-left-0 border-info">
<tbody>
<tr>
<td class="pt-2 pb-2 pl-0 pr-0">
<table class="table table-borderless m-0">
<tr>
<td class="p-0 w-25">
<strong>Starting Balance</strong>
</td>
<td class="p-0">
<strong>
<span t-esc="o.line_ids and o.line_ids.sorted(lambda line: line.date)[0].date" t-options='{"widget": "date"}'/>
</strong>
</td>
<td class="text-right p-0">
<strong>
<span t-field="o.balance_start"/>
</strong>
</td>
</tr>
<tr>
<td class="p-0 w-25">
<strong>Ending Balance</strong>
</td>
<td class="p-0">
<strong>
<span t-esc="o.line_ids and o.line_ids.sorted(lambda line: line.date)[-1].date" t-options='{"widget": "date"}'/>
</strong>
</td>
<td class="text-right p-0">
<strong>
<span t-field="o.balance_end_real"/>
</strong>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
<table class="table table-borderless m-0">
<tbody>
<tr t-foreach="o.line_ids" t-as="line" class="pb-2">
<td class="pl-0 pr-0">
<table class="table table-borderless">
<tr>
<td class="p-0 w-25">
<span class="d-block font-weight-bold" t-field="line.date"/>
</td>
<td class="p-0">
<span class="d-block font-weight-bold" t-if="line.partner_id" t-field="line.partner_id"/>
<span class="d-block" t-if="line.partner_bank_id" t-field="line.partner_bank_id"/>
<span class="d-block" t-if="line.payment_ref" t-field="line.payment_ref"/>
<span class="d-block" t-if="line.narration" t-field="line.narration"/>
</td>
<td class="text-right p-0">
<span class="d-block font-weight-bold" t-field="line.amount"/>
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
</data>
</odoo>