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/account/models/company.py | |
| 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/account/models/company.py')
| -rw-r--r-- | addons/account/models/company.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/addons/account/models/company.py b/addons/account/models/company.py index 330257355ea..4535f0da68d 100644 --- a/addons/account/models/company.py +++ b/addons/account/models/company.py @@ -45,6 +45,7 @@ class ResCompany(models.Model): cash_account_code_prefix = fields.Char(string='Prefix of the cash accounts') default_cash_difference_income_account_id = fields.Many2one('account.account', string="Cash Difference Income Account") default_cash_difference_expense_account_id = fields.Many2one('account.account', string="Cash Difference Expense Account") + account_journal_suspense_account_id = fields.Many2one('account.account', string='Journal Suspense Account') transfer_account_code_prefix = fields.Char(string='Prefix of the transfer accounts') account_sale_tax_id = fields.Many2one('account.tax', string="Default Sale Tax") account_purchase_tax_id = fields.Many2one('account.tax', string="Default Purchase Tax") @@ -64,9 +65,6 @@ class ResCompany(models.Model): property_stock_valuation_account_id = fields.Many2one('account.account', string="Account Template for Stock Valuation") bank_journal_ids = fields.One2many('account.journal', 'company_id', domain=[('type', '=', 'bank')], string='Bank Journals') tax_exigibility = fields.Boolean(string='Use Cash Basis') - account_bank_reconciliation_start = fields.Date(string="Bank Reconciliation Threshold", help="""The bank reconciliation widget won't ask to reconcile payments older than this date. - This is useful if you install accounting after having used invoicing for some time and - don't want to reconcile all the past payments with bank statements.""") incoterm_id = fields.Many2one('account.incoterms', string='Default incoterm', help='International Commercial Terms are a series of predefined commercial terms used in international transactions.') @@ -456,7 +454,7 @@ class ResCompany(models.Model): raise RedirectWarning(msg, action.id, _("Go to the journal configuration")) sample_invoice = self.env['account.move'].with_context(default_move_type='out_invoice', default_journal_id=journal.id).create({ - 'invoice_payment_ref': _('Sample invoice'), + 'payment_reference': _('Sample invoice'), 'partner_id': partner.id, 'invoice_line_ids': [ (0, 0, { |
