mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Friendly error message upon canceling a payment reconciliation
[FIX] Delete import transaction when statement line is deleted
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
##############################################################################
|
||||
#
|
||||
# Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>).
|
||||
# Copyright (C) 2011 Therp BV (<http://therp.nl>).
|
||||
# Copyright (C) 2011 Smile (<http://smile.fr>).
|
||||
# (C) 2011 Therp BV (<http://therp.nl>).
|
||||
# (C) 2011 Smile (<http://smile.fr>).
|
||||
#
|
||||
# All other contributions are (C) by their own contributors
|
||||
#
|
||||
# All Rights Reserved
|
||||
#
|
||||
# WARNING: This program as such is intended to be used by professional
|
||||
@@ -29,7 +32,7 @@
|
||||
'name': 'Account Banking',
|
||||
'version': '0.1.92',
|
||||
'license': 'GPL-3',
|
||||
'author': 'EduSense BV / Therp BV / Smile',
|
||||
'author': 'Banking addons community',
|
||||
'website': 'https://launchpad.net/banking-addons',
|
||||
'category': 'Banking addons',
|
||||
'depends': ['base', 'account', 'base_iban', 'account_payment'],
|
||||
|
||||
@@ -630,9 +630,15 @@ class banking_import_transaction(osv.osv):
|
||||
'date_done': transaction.effective_date,
|
||||
}
|
||||
)
|
||||
return _reconcile_move(
|
||||
self, cr, uid, transaction_id, context=context)
|
||||
return self._reconcile_move(cr, uid, transaction_id, context=context)
|
||||
|
||||
def _cancel_payment(
|
||||
self, cr, uid, transaction_id, context=None):
|
||||
raise osv.except_osv(
|
||||
_("Cannot unreconcile"),
|
||||
_("Cannot unreconcile: this operation is not yet supported for "
|
||||
"match type 'payment'"))
|
||||
|
||||
def _cancel_payment_order(
|
||||
self, cr, uid, transaction_id, context=None):
|
||||
"""
|
||||
@@ -729,6 +735,7 @@ class banking_import_transaction(osv.osv):
|
||||
'manual': _cancel_move,
|
||||
'move': _cancel_move,
|
||||
'payment_order': _cancel_payment_order,
|
||||
'payment': _cancel_payment,
|
||||
}
|
||||
def cancel(self, cr, uid, ids, context=None):
|
||||
if ids and isinstance(ids, (int, float)):
|
||||
@@ -1540,7 +1547,8 @@ class banking_import_transaction(osv.osv):
|
||||
'res.company', 'Company', required=True),
|
||||
'duplicate': fields.boolean('duplicate'),
|
||||
'statement_line_id': fields.many2one(
|
||||
'account.bank.statement.line', 'Statement line'),
|
||||
'account.bank.statement.line', 'Statement line',
|
||||
ondelete='CASCADE'),
|
||||
'statement_id': fields.many2one(
|
||||
'account.bank.statement', 'Statement'),
|
||||
'parent_id': fields.many2one(
|
||||
|
||||
Reference in New Issue
Block a user