summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2016-07-29 13:10:42 +0200
committerYannick Tivisse <yti@odoo.com>2016-07-29 13:10:42 +0200
commitb15f001dfbc28946f2cef8fa4e773a5051128d2c (patch)
tree77bb497238e1a1686983f7f49b3fd737ad0c74d7
parent962d0ee354db28533252d04e74ec46d01e2a2db8 (diff)
parent1b94ff054c2918b4b3c8a71f625027b8798c5455 (diff)
[MERGE] base_iban: Migrate to new api
-rw-r--r--addons/base_iban/__init__.py2
-rw-r--r--addons/base_iban/__openerp__.py5
-rw-r--r--addons/base_iban/data/res_partner_bank_demo.xml (renamed from addons/base_iban/demo/iban_demo.xml)4
-rw-r--r--addons/base_iban/models/__init__.py4
-rw-r--r--addons/base_iban/models/res_partner_bank.py (renamed from addons/base_iban/base_iban.py)6
5 files changed, 11 insertions, 10 deletions
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
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 @@
<?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>
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
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]