From b51d3481f888c7203300e37e853e72cc13340421 Mon Sep 17 00:00:00 2001 From: Fanha Giang Date: Tue, 30 May 2017 03:00:48 +0700 Subject: [PATCH] [MIG] [10.0] base custom info --- base_custom_info/README.rst | 2 +- base_custom_info/__init__.py | 4 ++-- base_custom_info/__manifest__.py | 14 +++++++------- base_custom_info/models/__init__.py | 6 +++--- base_custom_info/models/custom_info.py | 2 +- base_custom_info/models/custom_info_category.py | 4 ++-- base_custom_info/models/custom_info_option.py | 2 +- base_custom_info/models/custom_info_property.py | 5 ++--- base_custom_info/models/custom_info_template.py | 4 ++-- base_custom_info/models/custom_info_value.py | 6 +++--- base_custom_info/models/res_partner.py | 2 +- base_custom_info/tests/test_partner.py | 4 ++-- base_custom_info/tests/test_value_conversion.py | 2 +- .../views/custom_info_property_view.xml | 2 +- .../views/custom_info_template_view.xml | 2 +- base_custom_info/wizard/__init__.py | 4 ++-- base_custom_info/wizard/base_config_settings.py | 2 +- 17 files changed, 33 insertions(+), 34 deletions(-) diff --git a/base_custom_info/README.rst b/base_custom_info/README.rst index 2871256ed..78598f9d1 100644 --- a/base_custom_info/README.rst +++ b/base_custom_info/README.rst @@ -203,7 +203,7 @@ To manage their values, you need to: .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/135/9.0 + :target: https://runbot.odoo-community.org/runbot/135/10.0 Development =========== diff --git a/base_custom_info/__init__.py b/base_custom_info/__init__.py index a518dce55..95ffd47c5 100644 --- a/base_custom_info/__init__.py +++ b/base_custom_info/__init__.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. - Sergio Teruel -# © 2015 Antiun Ingeniería S.L. - Carlos Dauden +# Copyright 2015 Antiun Ingeniería S.L. - Sergio Teruel +# Copyright 2015 Antiun Ingeniería S.L. - Carlos Dauden # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html from . import models, wizard diff --git a/base_custom_info/__manifest__.py b/base_custom_info/__manifest__.py index 5afe440f9..4ec2709f1 100644 --- a/base_custom_info/__manifest__.py +++ b/base_custom_info/__manifest__.py @@ -1,14 +1,14 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. - Sergio Teruel -# © 2015 Antiun Ingeniería S.L. - Carlos Dauden -# © 2015-2016 Jairo Llopis -# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html +# Copyright 2015 Antiun Ingeniería S.L. - Sergio Teruel +# Copyright 2015 Antiun Ingeniería S.L. - Carlos Dauden +# Copyright 2015-2016 Jairo Llopis +# License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html { 'name': "Base Custom Info", 'summary': "Add custom field in models", 'category': 'Tools', - 'version': '9.0.2.0.0', + 'version': '10.0.1.0.0', 'depends': [ 'base_setup', ], @@ -40,8 +40,8 @@ ], 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', - 'website': 'https://www.tecnativa.com', - 'license': 'AGPL-3', + 'website': 'https://github.com/OCA/server-tools', + 'license': 'LGPL-3', 'application': True, 'installable': True, } diff --git a/base_custom_info/models/__init__.py b/base_custom_info/models/__init__.py index e0593f285..4da484e8e 100644 --- a/base_custom_info/models/__init__.py +++ b/base_custom_info/models/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería S.L. - Sergio Teruel -# © 2015 Antiun Ingeniería S.L. - Carlos Dauden -# © 2016 Jairo Llopis +# Copyright 2015 Antiun Ingeniería S.L. - Sergio Teruel +# Copyright 2015 Antiun Ingeniería S.L. - Carlos Dauden +# Copyright 2016 Jairo Llopis # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html from . import ( diff --git a/base_custom_info/models/custom_info.py b/base_custom_info/models/custom_info.py index 7222d0951..351868fb0 100644 --- a/base_custom_info/models/custom_info.py +++ b/base_custom_info/models/custom_info.py @@ -5,7 +5,7 @@ # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import api, fields, models +from odoo import api, fields, models class CustomInfo(models.AbstractModel): diff --git a/base_custom_info/models/custom_info_category.py b/base_custom_info/models/custom_info_category.py index f48551471..7af3a2b00 100644 --- a/base_custom_info/models/custom_info_category.py +++ b/base_custom_info/models/custom_info_category.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -# © 2016 Jairo Llopis +# Copyright 2016 Jairo Llopis # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import api, fields, models +from odoo import api, fields, models class CustomInfoCategory(models.Model): diff --git a/base_custom_info/models/custom_info_option.py b/base_custom_info/models/custom_info_option.py index a8ad2e95e..e19e09c7d 100644 --- a/base_custom_info/models/custom_info_option.py +++ b/base_custom_info/models/custom_info_option.py @@ -3,7 +3,7 @@ # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import api, fields, models +from odoo import api, fields, models class CustomInfoOption(models.Model): diff --git a/base_custom_info/models/custom_info_property.py b/base_custom_info/models/custom_info_property.py index a05b4d8a2..4d1ba9d13 100644 --- a/base_custom_info/models/custom_info_property.py +++ b/base_custom_info/models/custom_info_property.py @@ -3,8 +3,8 @@ # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import _, api, fields, models -from openerp.exceptions import UserError, ValidationError +from odoo import _, api, fields, models +from odoo.exceptions import UserError, ValidationError class CustomInfoProperty(models.Model): @@ -83,7 +83,6 @@ class CustomInfoProperty(models.Model): self.mapped("template_id").check_access_rule(operation) return super(CustomInfoProperty, self).check_access_rule(operation) - @api.one @api.constrains("default_value", "field_type") def _check_default_value(self): """Ensure the default value is valid.""" diff --git a/base_custom_info/models/custom_info_template.py b/base_custom_info/models/custom_info_template.py index 57ece627f..aeb22b46a 100644 --- a/base_custom_info/models/custom_info_template.py +++ b/base_custom_info/models/custom_info_template.py @@ -3,8 +3,8 @@ # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import _, api, fields, models -from openerp.exceptions import ValidationError +from odoo import _, api, fields, models +from odoo.exceptions import ValidationError class CustomInfoTemplate(models.Model): diff --git a/base_custom_info/models/custom_info_value.py b/base_custom_info/models/custom_info_value.py index b09d4c993..33a85158c 100644 --- a/base_custom_info/models/custom_info_value.py +++ b/base_custom_info/models/custom_info_value.py @@ -2,9 +2,9 @@ # Copyright 2016 Jairo Llopis # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import _, api, fields, models, SUPERUSER_ID -from openerp.exceptions import ValidationError -from openerp.tools.safe_eval import safe_eval +from odoo import _, api, fields, models, SUPERUSER_ID +from odoo.exceptions import ValidationError +from odoo.tools.safe_eval import safe_eval class CustomInfoValue(models.Model): diff --git a/base_custom_info/models/res_partner.py b/base_custom_info/models/res_partner.py index 1f0a562b6..ffb04de39 100644 --- a/base_custom_info/models/res_partner.py +++ b/base_custom_info/models/res_partner.py @@ -3,7 +3,7 @@ # Copyright 2017 Pedro M. Baeza # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import fields, models +from odoo import fields, models class ResPartner(models.Model): diff --git a/base_custom_info/tests/test_partner.py b/base_custom_info/tests/test_partner.py index 576f683a2..3bb09de96 100644 --- a/base_custom_info/tests/test_partner.py +++ b/base_custom_info/tests/test_partner.py @@ -3,8 +3,8 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from psycopg2 import IntegrityError -from openerp.exceptions import AccessError, ValidationError -from openerp.tests.common import TransactionCase +from odoo.exceptions import AccessError, ValidationError +from odoo.tests.common import TransactionCase class PartnerCase(TransactionCase): diff --git a/base_custom_info/tests/test_value_conversion.py b/base_custom_info/tests/test_value_conversion.py index 542ae44a5..29be332df 100644 --- a/base_custom_info/tests/test_value_conversion.py +++ b/base_custom_info/tests/test_value_conversion.py @@ -3,7 +3,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). import logging -from openerp.tests.common import TransactionCase +from odoo.tests.common import TransactionCase _logger = logging.getLogger(__name__) diff --git a/base_custom_info/views/custom_info_property_view.xml b/base_custom_info/views/custom_info_property_view.xml index 39d446f6d..054a76ad3 100644 --- a/base_custom_info/views/custom_info_property_view.xml +++ b/base_custom_info/views/custom_info_property_view.xml @@ -49,7 +49,7 @@ attrs="{'invisible': [('field_type', 'not in', ['str', 'int', 'float'])]}" /> - + - + # License LGPL-3 - See http://www.gnu.org/licenses/lgpl-3.0.html -from openerp import fields, models +from odoo import fields, models class BaseConfigSettings(models.TransientModel):