[MERGE] base_iban: Migrate to new api
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import base_iban
|
||||
import models
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
{
|
||||
'name': 'IBAN Bank Accounts',
|
||||
'version': '1.0',
|
||||
'category': 'Extra Tools',
|
||||
'description': """
|
||||
This module installs the base for IBAN (International Bank Account Number) bank accounts and checks for it's validity.
|
||||
@@ -12,7 +11,5 @@ The ability to extract the correctly represented local accounts from IBAN accoun
|
||||
with a single statement.
|
||||
""",
|
||||
'depends': ['account'],
|
||||
'demo': ['demo/iban_demo.xml'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'demo': ['data/res_partner_bank_demo.xml'],
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<odoo>
|
||||
<data noupdate="1">
|
||||
|
||||
<record id="bank_iban_asustek" model="res.partner.bank">
|
||||
@@ -24,4 +24,4 @@
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
</odoo>
|
||||
@@ -0,0 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
import res_partner_bank
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
import re
|
||||
|
||||
from openerp import api, fields, models, _
|
||||
from openerp.exceptions import UserError, ValidationError
|
||||
from odoo import api, models, _
|
||||
from odoo.exceptions import UserError, ValidationError
|
||||
|
||||
|
||||
def normalize_iban(iban):
|
||||
@@ -31,7 +31,7 @@ def validate_iban(iban):
|
||||
|
||||
iban_template = _map_iban_template[country_code]
|
||||
if len(iban) != len(iban_template.replace(' ', '')):
|
||||
raise ValidationError(_("The IBAN does not seem to be correct. You should have entered something like this %s\n"\
|
||||
raise ValidationError(_("The IBAN does not seem to be correct. You should have entered something like this %s\n"
|
||||
"Where B = National bank code, S = Branch code, C = Account No, k = Check digit") % iban_template)
|
||||
|
||||
check_chars = iban[4:] + iban[:4]
|
||||
Reference in New Issue
Block a user