mirror of
https://github.com/brain-tec/account_ebics.git
synced 2024-11-23 20:52:04 +00:00
Merge branch 'account_ebics-support-fintech-7.4' into '16.0'
[IMP]add support for fintech 7.4 See merge request Noviat/Noviat_Generic/accounting-ebics!15
This commit is contained in:
commit
6acb20aca6
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "EBICS banking protocol",
|
"name": "EBICS banking protocol",
|
||||||
"version": "16.0.1.6.1",
|
"version": "16.0.1.6.2",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "Noviat",
|
"author": "Noviat",
|
||||||
"website": "https://www.noviat.com/",
|
"website": "https://www.noviat.com/",
|
||||||
|
@ -462,12 +462,21 @@ class EbicsXfer(models.TransientModel):
|
|||||||
if self.ebics_config_id.ebics_version == "H003":
|
if self.ebics_config_id.ebics_version == "H003":
|
||||||
bank._order_number = self.ebics_config_id._get_order_number()
|
bank._order_number = self.ebics_config_id._get_order_number()
|
||||||
|
|
||||||
try:
|
signature_class = (
|
||||||
user = EbicsUser(
|
self.format_id.signature_class or self.ebics_userid_id.signature_class
|
||||||
keyring=keyring,
|
|
||||||
partnerid=self.ebics_config_id.ebics_partner,
|
|
||||||
userid=self.ebics_userid_id.name,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
user_params = {
|
||||||
|
"keyring": keyring,
|
||||||
|
"partnerid": self.ebics_config_id.ebics_partner,
|
||||||
|
"userid": self.ebics_userid_id.name,
|
||||||
|
}
|
||||||
|
# manual_approval replaced by transport_only class param in fintech 7.4
|
||||||
|
fintech74 = hasattr(EbicsUser, "transport_only")
|
||||||
|
if fintech74:
|
||||||
|
user_params["transport_only"] = signature_class == "T" and True or False
|
||||||
|
try:
|
||||||
|
user = EbicsUser(**user_params)
|
||||||
except ValueError as err:
|
except ValueError as err:
|
||||||
error = _("Error while accessing the EBICS UserID:")
|
error = _("Error while accessing the EBICS UserID:")
|
||||||
error += "\n"
|
error += "\n"
|
||||||
@ -477,11 +486,8 @@ class EbicsXfer(models.TransientModel):
|
|||||||
error += "\n"
|
error += "\n"
|
||||||
error += _("Doublecheck your EBICS Passphrase and UserID settings.")
|
error += _("Doublecheck your EBICS Passphrase and UserID settings.")
|
||||||
raise UserError(error) from err
|
raise UserError(error) from err
|
||||||
|
# manual_approval replaced by transport_only class param in fintech 7.4
|
||||||
signature_class = (
|
if not fintech74 and signature_class == "T":
|
||||||
self.format_id.signature_class or self.ebics_userid_id.signature_class
|
|
||||||
)
|
|
||||||
if signature_class == "T":
|
|
||||||
user.manual_approval = True
|
user.manual_approval = True
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user