From 6f355623f0632527aae55d02d24a5a06976441c2 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 3 Aug 2015 19:07:57 +0200 Subject: [PATCH] [IMP] account_cancel: better handling of bank statement cancellation Before this addition, cancelling a bank statement line was allowed even if the bank statement was confirmed. However, when the bank statement is confirmed, it is not possible to reconcile it afterwards. The consequence is that is was not possible to reconcile this bank statement line without cancelling the whole bank statement, and therefore forcing the user to do the complete reconciliation process again. With this addition, it is not possible to cancel a bank statement line if the corresponding bank statement is confirmed. However, we offer the user the possibility to reset the bank statement to draft through a new button. This new button will only change the state of the bank statement, and will not modify the state of the associated bank statement lines. The consequence is that the user will be able to first set the bank statement to draft, then cancel the bank statement lines he wants, and finally launch the reconciliation process only on the lines which were cancelled. opw-645903 --- addons/account_cancel/__init__.py | 3 +-- addons/account_cancel/account_cancel_view.xml | 11 +++++++++ addons/account_cancel/i18n/account_cancel.pot | 24 +++++++++++++++++-- addons/account_cancel/models/__init__.py | 4 ++++ .../models/account_bank_statement.py | 23 ++++++++++++++++++ 5 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 addons/account_cancel/models/__init__.py create mode 100644 addons/account_cancel/models/account_bank_statement.py diff --git a/addons/account_cancel/__init__.py b/addons/account_cancel/__init__.py index 49a09e5570e..27c25120965 100644 --- a/addons/account_cancel/__init__.py +++ b/addons/account_cancel/__init__.py @@ -19,5 +19,4 @@ # ############################################################################## -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: - +import models diff --git a/addons/account_cancel/account_cancel_view.xml b/addons/account_cancel/account_cancel_view.xml index af094697de2..59d1afa4b12 100644 --- a/addons/account_cancel/account_cancel_view.xml +++ b/addons/account_cancel/account_cancel_view.xml @@ -34,6 +34,17 @@ + + bank.statement.draft.form.inherit + account.bank.statement + + + +