mirror of
https://github.com/OCA/bank-payment.git
synced 2025-02-02 10:37:31 +02:00
[FIX] Faulty import
[IMP] Method references in confirm/cancel mappings
This commit is contained in:
@@ -364,25 +364,18 @@ class banking_import_transaction(orm.Model):
|
||||
def __init__(self, pool, cr):
|
||||
"""
|
||||
Updating the function maps to handle the match types that this
|
||||
module adds. While creating the map in the super object was
|
||||
straightforward, the fact that these are now functions rather than
|
||||
method requires the awkward way of updating it with the methods'
|
||||
function objects.
|
||||
|
||||
As noted above, another implication is that any addon that inherits
|
||||
one of these methods needs to overwrite the entry in the function
|
||||
maps in the same way as is done below.
|
||||
module adds.
|
||||
"""
|
||||
super(banking_import_transaction, self).__init__(pool, cr)
|
||||
|
||||
self.confirm_map.update({
|
||||
'storno': self._confirm_storno.__func__,
|
||||
'payment_order': self._confirm_payment_order.__func__,
|
||||
'payment': self._confirm_payment.__func__,
|
||||
banking_import_transaction.confirm_map.update({
|
||||
'storno': banking_import_transaction._confirm_storno,
|
||||
'payment_order': banking_import_transaction._confirm_payment_order,
|
||||
'payment': banking_import_transaction._confirm_payment,
|
||||
})
|
||||
|
||||
self.cancel_map.update({
|
||||
'storno': self._cancel_storno.__func__,
|
||||
'payment_order': self._cancel_payment_order.__func__,
|
||||
'payment': self._cancel_payment.__func__,
|
||||
banking_import_transaction.cancel_map.update({
|
||||
'storno': banking_import_transaction._cancel_storno,
|
||||
'payment_order': banking_import_transaction._cancel_payment_order,
|
||||
'payment': banking_import_transaction._cancel_payment,
|
||||
})
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
from datetime import datetime
|
||||
from openerp.osv import orm, fields
|
||||
from openerp.misc import DEFAULT_SERVER_DATE_FORMAT
|
||||
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT
|
||||
|
||||
|
||||
class payment_order_create(orm.TransientModel):
|
||||
|
||||
Reference in New Issue
Block a user