From caeb782841fc5a7ad71a196e2c9ee67644ef9074 Mon Sep 17 00:00:00 2001 From: Laurent Smet Date: Tue, 29 Oct 2019 12:21:27 +0000 Subject: [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) --- addons/l10n_in/demo/account_payment_demo.xml | 5 ++--- addons/l10n_in/report/account_payment_report.py | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'addons/l10n_in') diff --git a/addons/l10n_in/demo/account_payment_demo.xml b/addons/l10n_in/demo/account_payment_demo.xml index c8ef4088a64..ecc544ef920 100644 --- a/addons/l10n_in/demo/account_payment_demo.xml +++ b/addons/l10n_in/demo/account_payment_demo.xml @@ -3,11 +3,10 @@ - customer 10000 inbound - + - + \ No newline at end of file diff --git a/addons/l10n_in/report/account_payment_report.py b/addons/l10n_in/report/account_payment_report.py index 32d3bdb4fcd..04560f01c6c 100644 --- a/addons/l10n_in/report/account_payment_report.py +++ b/addons/l10n_in/report/account_payment_report.py @@ -65,7 +65,7 @@ class L10nInPaymentReport(models.AbstractModel): tax.amount AS tax_rate, am.partner_id, am.amount_total AS payment_amount, - ap.journal_id, + am.journal_id, aml.currency_id, (CASE WHEN ps.l10n_in_tin IS NOT NULL THEN concat(ps.l10n_in_tin,'-',ps.name) @@ -137,7 +137,7 @@ class AdvancesPaymentReport(models.Model): def _select(self): select_str = super(AdvancesPaymentReport, self)._select() select_str += """, - ap.payment_date as date, + am.date as date, (SELECT sum(amount) FROM account_partial_reconcile AS apr WHERE (apr.credit_move_id = aml.id OR apr.debit_move_id = aml.id) AND (to_char(apr.max_date, 'MM-YYYY') = to_char(aml.date_maturity, 'MM-YYYY')) -- cgit v1.2.3