mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-12-25 19:01:44 +00:00
[13.0]move ebics 2.4 order number generator to ebics_userid
This commit is contained in:
parent
357952d9b4
commit
ba77eb3bea
@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
'name': 'EBICS banking protocol',
|
||||
'version': '13.0.1.1.2',
|
||||
'version': '13.0.1.1.3',
|
||||
'license': 'LGPL-3',
|
||||
'author': 'Noviat',
|
||||
'website': 'www.noviat.com',
|
||||
|
@ -10,25 +10,6 @@ from odoo.exceptions import UserError
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
import fintech
|
||||
from fintech.ebics import EbicsBank
|
||||
fintech.cryptolib = 'cryptography'
|
||||
except ImportError:
|
||||
EbicsBank = object
|
||||
_logger.warning('Failed to import fintech')
|
||||
|
||||
|
||||
class EbicsBank(EbicsBank):
|
||||
|
||||
def _next_order_id(self, partnerid):
|
||||
"""
|
||||
EBICS protocol version H003 requires generation of the OrderID.
|
||||
The OrderID must be a string between 'A000' and 'ZZZZ' and
|
||||
unique for each partner id.
|
||||
"""
|
||||
return hasattr(self, '_order_number') and self._order_number or 'A000'
|
||||
|
||||
|
||||
class EbicsConfig(models.Model):
|
||||
"""
|
||||
|
@ -30,6 +30,17 @@ except ImportError:
|
||||
_logger.warning('Failed to import fintech')
|
||||
|
||||
|
||||
class EbicsBank(EbicsBank):
|
||||
|
||||
def _next_order_id(self, partnerid):
|
||||
"""
|
||||
EBICS protocol version H003 requires generation of the OrderID.
|
||||
The OrderID must be a string between 'A000' and 'ZZZZ' and
|
||||
unique for each partner id.
|
||||
"""
|
||||
return hasattr(self, '_order_number') and self._order_number or 'A000'
|
||||
|
||||
|
||||
class EbicsUserID(models.Model):
|
||||
_name = 'ebics.userid'
|
||||
_description = 'EBICS UserID'
|
||||
|
Loading…
Reference in New Issue
Block a user