diff options
| author | Laurent Smet <las@odoo.com> | 2019-10-29 12:21:27 +0000 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2020-04-10 09:47:24 +0000 |
| commit | caeb782841fc5a7ad71a196e2c9ee67644ef9074 (patch) | |
| tree | 28103bc29ab4f0d98162095f607c4c6ab1433f25 /addons/l10n_generic_coa | |
| parent | b4d1360ed1d71c8fda44ca0c3b1a80d5a112b93f (diff) | |
[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>
Diffstat (limited to 'addons/l10n_generic_coa')
| -rw-r--r-- | addons/l10n_generic_coa/demo/account_bank_statement_demo.xml | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/addons/l10n_generic_coa/demo/account_bank_statement_demo.xml b/addons/l10n_generic_coa/demo/account_bank_statement_demo.xml index 835987779c1..73c061cd846 100644 --- a/addons/l10n_generic_coa/demo/account_bank_statement_demo.xml +++ b/addons/l10n_generic_coa/demo/account_bank_statement_demo.xml @@ -6,8 +6,7 @@ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> <field name="date" eval="time.strftime('%Y')+'-01-01'"/> - <field name="name" eval="'BNK/%s/00001' % time.strftime('%Y')"/> - <field name="balance_end_real">8998.2</field> + <field name="balance_end_real">9944.87</field> <field name="balance_start">5103.0</field> </record> @@ -15,7 +14,7 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">1</field> - <field name="name" eval="'INV/%s/00002 and INV/%s/00003' % (time.strftime('%Y'), time.strftime('%Y'))"/> + <field name="payment_ref" eval="'INV/%s/00002 and INV/%s/00003' % (time.strftime('%Y'), time.strftime('%Y'))"/> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -28,7 +27,7 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">2</field> - <field name="name">Bank fees</field> + <field name="payment_ref">Bank fees</field> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -40,7 +39,7 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">3</field> - <field name="name">Prepayment</field> + <field name="payment_ref">Prepayment</field> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -53,7 +52,7 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">4</field> - <field name="name" eval="'First 2000 $ of invoice %s/00001' % time.strftime('%Y')"/> + <field name="payment_ref" eval="'First 2000 $ of invoice %s/00001' % time.strftime('%Y')"/> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -66,23 +65,19 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">5</field> - <field name="name">Last Year Interests</field> + <field name="payment_ref">Last Year Interests</field> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> <field name="amount">102.78</field> <field name="date" eval="time.strftime('%Y')+'-01-01'"/> - <field name="account_id" model="account.account" search="[ - ('user_type_id', '=', ref('account.data_account_type_revenue')), - ('tag_ids', 'in', [ref('account.account_tag_financing')]), - ('company_id', '=', obj().env.company.id)]"/> </record> <record id="demo_bank_statement_line_6" model="account.bank.statement.line"> <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">1</field> - <field name="name" eval="'INV/'+time.strftime('%Y')+'/00002'"/> + <field name="payment_ref" eval="'INV/'+time.strftime('%Y')+'/00002'"/> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -95,7 +90,7 @@ <field name="ref"></field> <field name="statement_id" ref="l10n_generic_coa.demo_bank_statement_1"/> <field name="sequence">7</field> - <field name="name">R:9772938 10/07 AX 9415116318 T:5 BRT: 100,00€ C/ croip</field> + <field name="payment_ref">R:9772938 10/07 AX 9415116318 T:5 BRT: 100,00€ C/ croip</field> <field name="journal_id" model="account.journal" search="[ ('type', '=', 'bank'), ('company_id', '=', obj().env.company.id)]"/> @@ -104,10 +99,6 @@ <field name="partner_id" ref="base.res_partner_2"/> </record> - <function model="account.bank.statement.line" name="fast_counterpart_creation"> - <value eval="[ref('demo_bank_statement_line_5')]"/> - </function> - <!-- Also create a pdf attachment in chatter --> <record id="ir_attachment_bank_statement_1" model="ir.attachment"> @@ -131,5 +122,8 @@ <field name="attachment_ids" eval="[(6, 0, [ref('ir_attachment_bank_statement_1')])]"/> </record> + <function model="account.bank.statement" name="button_post"> + <value eval="[ref('demo_bank_statement_1')]"/> + </function> </data> </odoo> |
