diff --git a/addons/base_iban/__init__.py b/addons/base_iban/__init__.py index f32b77fa221..81fc81d29c9 100644 --- a/addons/base_iban/__init__.py +++ b/addons/base_iban/__init__.py @@ -1,4 +1,4 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. -import base_iban +import models diff --git a/addons/base_iban/__openerp__.py b/addons/base_iban/__openerp__.py index c8c43cbfc52..8ad6b44c6e7 100644 --- a/addons/base_iban/__openerp__.py +++ b/addons/base_iban/__openerp__.py @@ -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'], } diff --git a/addons/base_iban/demo/iban_demo.xml b/addons/base_iban/data/res_partner_bank_demo.xml similarity index 98% rename from addons/base_iban/demo/iban_demo.xml rename to addons/base_iban/data/res_partner_bank_demo.xml index 4e1e247f410..86ab1c60687 100644 --- a/addons/base_iban/demo/iban_demo.xml +++ b/addons/base_iban/data/res_partner_bank_demo.xml @@ -1,5 +1,5 @@ - + @@ -24,4 +24,4 @@ - + diff --git a/addons/base_iban/models/__init__.py b/addons/base_iban/models/__init__.py new file mode 100644 index 00000000000..873ec945880 --- /dev/null +++ b/addons/base_iban/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +import res_partner_bank \ No newline at end of file diff --git a/addons/base_iban/base_iban.py b/addons/base_iban/models/res_partner_bank.py similarity index 97% rename from addons/base_iban/base_iban.py rename to addons/base_iban/models/res_partner_bank.py index 0877c264333..d1f6d8d9221 100644 --- a/addons/base_iban/base_iban.py +++ b/addons/base_iban/models/res_partner_bank.py @@ -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]