summaryrefslogtreecommitdiff
path: root/addons/payment/models/account_payment.py
diff options
context:
space:
mode:
authorLaurent Smet <las@odoo.com>2019-10-29 12:21:27 +0000
committerqdp-odoo <qdp@odoo.com>2020-04-10 09:47:24 +0000
commitcaeb782841fc5a7ad71a196e2c9ee67644ef9074 (patch)
tree28103bc29ab4f0d98162095f607c4c6ab1433f25 /addons/payment/models/account_payment.py
parentb4d1360ed1d71c8fda44ca0c3b1a80d5a112b93f (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/payment/models/account_payment.py')
-rw-r--r--addons/payment/models/account_payment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/payment/models/account_payment.py b/addons/payment/models/account_payment.py
index 5c398c8f634..e324b033ce8 100644
--- a/addons/payment/models/account_payment.py
+++ b/addons/payment/models/account_payment.py
@@ -88,7 +88,7 @@ class AccountPayment(models.Model):
self.mapped('payment_transaction_id').filtered(lambda x: x.state == 'done' and not x.is_processed)._post_process_after_done()
return res
- def post(self):
+ def action_post(self):
# Post the payments "normally" if no transactions are needed.
# If not, let the acquirer updates the state.
# __________ ______________
@@ -109,7 +109,7 @@ class AccountPayment(models.Model):
payments_need_trans = self.filtered(lambda pay: pay.payment_token_id and not pay.payment_transaction_id)
transactions = payments_need_trans._create_payment_transaction()
- res = super(AccountPayment, self - payments_need_trans).post()
+ res = super(AccountPayment, self - payments_need_trans).action_post()
transactions.s2s_do_transaction()