diff options
| author | wan <wan@odoo.com> | 2019-02-08 10:11:41 +0000 |
|---|---|---|
| committer | wan <wan@odoo.com> | 2019-02-08 10:11:41 +0000 |
| commit | 969705fa2ae8bfd5e2d2cfce0241fcd56bebf01f (patch) | |
| tree | ddfc35a278f022c3c62962a14b587de49bb67f4a /addons/account/views | |
| parent | 723789b6b1997568943bcf2fa879b8471838ec19 (diff) | |
[ADD] account: suspense account management
Task 1930403
Purpose:
A suspense account is an account in the general ledger that temporarily stores any transactions for which there is uncertainty about the account in which they should be recorded. Once the accounting staff investigates and clarifies the purpose of this type of transaction, it shifts the transaction out of the suspense account and into the correct account(s). An entry into a suspense account may be a debit or a credit.
The Chosen Odoo approach (macro) for this case is
1) from bank statement -> reconciliation widget -> reconciliation model
2) create move that have a dedicated checkbox
3) be able to reopen the bank statement line "like if there is no linked account move" and finally reconcile the transaction with the good invoice/bill (we can reprocess account move "to check")
4) when we reprocess, Instead of creating an account move : Check if there is an "to check" existing linked account move and remove all the account move lines then replace them by the good ones --> we want to keep the sequence
closes odoo/odoo#30486
Diffstat (limited to 'addons/account/views')
| -rw-r--r-- | addons/account/views/account_invoice_view.xml | 8 | ||||
| -rw-r--r-- | addons/account/views/account_journal_dashboard_view.xml | 10 | ||||
| -rw-r--r-- | addons/account/views/account_view.xml | 11 |
3 files changed, 22 insertions, 7 deletions
diff --git a/addons/account/views/account_invoice_view.xml b/addons/account/views/account_invoice_view.xml index 4ce645543b0..de71fb46ac2 100644 --- a/addons/account/views/account_invoice_view.xml +++ b/addons/account/views/account_invoice_view.xml @@ -271,7 +271,11 @@ <div groups="account.group_account_invoice" class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}"> You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this supplier. You can allocate them to mark this bill as paid. </div> + <div groups="account.group_account_invoice" class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('edition_mode_available','=',False)]}"> + You have suspense account moves that match this invoice. <bold><button class="alert-link" type="object" name="action_reconcile_to_check" role="button" string="Check them" style="padding: 0;vertical-align: baseline;"/></bold> to mark this invoice as paid. + </div> <field name="has_outstanding" invisible="1"/> + <field name="edition_mode_available" invisible="1"/> <sheet string="Vendor Bill"> <div> <span class="o_form_label" attrs="{'invisible': ['|',('state','!=','draft'), ('type','!=','in_invoice')]}">Draft Bill</span> @@ -424,7 +428,11 @@ <div groups="account.group_account_invoice" class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}"> You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding payments</a></bold> for this customer. You can allocate them to mark this invoice as paid. </div> + <div groups="account.group_account_invoice" class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('edition_mode_available','=',False)]}"> + You have suspense account moves that match this invoice. <bold><button class="alert-link" type="object" name="action_reconcile_to_check" role="button" string="Check them" style="padding: 0;vertical-align: baseline;"/></bold> to mark this invoice as paid. + </div> <field name="has_outstanding" invisible="1"/> + <field name="edition_mode_available" invisible="1"/> <sheet string="Invoice"> <div class="oe_button_box" name="button_box"> </div> diff --git a/addons/account/views/account_journal_dashboard_view.xml b/addons/account/views/account_journal_dashboard_view.xml index b7271a355f7..5ace8b60d4f 100644 --- a/addons/account/views/account_journal_dashboard_view.xml +++ b/addons/account/views/account_journal_dashboard_view.xml @@ -258,6 +258,16 @@ </div> </div> </t> + <t t-if="dashboard.number_to_check > 0"> + <div class="row"> + <div class="col-7"> + <a type="object" name="action_open_to_check"><t t-esc="dashboard.number_to_check"/> moves to check</a> + </div> + <div class="col-5 text-right"> + <span><t t-esc="dashboard.to_check_balance"/></span> + </div> + </div> + </t> </div> </t> <t t-name="JournalBodySalePurchase" id="account.JournalBodySalePurchase"> diff --git a/addons/account/views/account_view.xml b/addons/account/views/account_view.xml index 2d50974ca11..b7ffd04d859 100644 --- a/addons/account/views/account_view.xml +++ b/addons/account/views/account_view.xml @@ -554,12 +554,6 @@ <field name="target">new</field> </record> - <record id="action_bank_reconcile_bank_statements" model="ir.actions.client"> - <field name="name">Reconciliation on Bank Statements</field> - <field name="tag">bank_statement_reconciliation_view</field> - <field name="context">{'statement_ids': [active_id]}</field> - </record> - <record id="view_bank_statement_tree" model="ir.ui.view"> <field name="name">account.bank.statement.tree</field> <field name="model">account.bank.statement</field> @@ -605,7 +599,7 @@ <form string="Bank Statement"> <header> <field name="all_lines_reconciled" invisible="1" /> - <button name="%(action_bank_reconcile_bank_statements)d" string="Reconcile" type="action" class="oe_highlight" attrs="{'invisible':['|','|',('all_lines_reconciled','=',True),('line_ids','=',[]),('state', '!=', 'open')]}"/> + <button name="action_bank_reconcile_bank_statements" string="Reconcile" type="object" class="oe_highlight" attrs="{'invisible':['|','|',('all_lines_reconciled','=',True),('line_ids','=',[]),('state', '!=', 'open')]}"/> <button name="check_confirm_bank" string="Validate" type="object" class="oe_highlight" attrs="{'invisible':['|','|',('all_lines_reconciled','=',False),('line_ids','=',[]),('state', '!=', 'open')]}"/> <field name="state" widget="statusbar" statusbar_visible="open,confirm"/> </header> @@ -836,6 +830,7 @@ </group> <group> <field name="auto_reconcile" attrs="{'invisible': [('rule_type', '=', 'writeoff_button')]}"/> + <field name="to_check" attrs="{'invisible': [('rule_type', '!=', 'writeoff_button')]}"/> </group> </group> <group string="Conditions on Bank Statement Line"> @@ -1647,6 +1642,7 @@ <field name="auto_reverse" attrs="{'readonly':[('reverse_entry_id', '!=', False)]}"/> <field name="reverse_date" attrs="{'invisible':[('auto_reverse', '=', False)], 'required':[('auto_reverse', '=', True)],'readonly':[('reverse_entry_id', '!=', False)]}"/> <field name="reverse_entry_id" attrs="{'invisible':True}"/> + <field name="to_check"/> </group> </page> </notebook> @@ -1668,6 +1664,7 @@ <field name="date"/> <filter string="Unposted" name="unposted" domain="[('state','=','draft')]" help="Unposted Journal Entries"/> <filter string="Posted" name="posted" domain="[('state','=','posted')]" help="Posted Journal Entries"/> + <filter string="To Check" name="to_check" domain="[('to_check', '=', True)]"/> <separator/> <filter string="Sales" name="sales" domain="[('journal_id.type','=','sale')]" context="{'default_journal_type': 'sale'}"/> <filter string="Purchases" name="purchases" domain="[('journal_id.type','=','purchase')]" context="{'default_journal_type': 'purchase'}"/> |
