From 10b9c7ddbf1d88b5cd067287d7184c876e59e6c9 Mon Sep 17 00:00:00 2001 From: David Vidal Date: Mon, 29 May 2017 17:22:25 +0200 Subject: [PATCH] [MIG] partner_contact_department: Migration to 10.0 --- partner_contact_department/README.rst | 11 ++++++----- .../{__openerp__.py => __manifest__.py} | 7 ++++--- partner_contact_department/models/res_partner.py | 7 +++---- partner_contact_department/tests/test_recursion.py | 4 ++-- .../views/res_partner_department_view.xml | 5 +---- partner_contact_department/views/res_partner_view.xml | 3 --- 6 files changed, 16 insertions(+), 21 deletions(-) rename partner_contact_department/{__openerp__.py => __manifest__.py} (77%) diff --git a/partner_contact_department/README.rst b/partner_contact_department/README.rst index 85d5a154f..ad6a940e3 100644 --- a/partner_contact_department/README.rst +++ b/partner_contact_department/README.rst @@ -29,7 +29,7 @@ To use this module, 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/134/9.0 + :target: https://runbot.odoo-community.org/runbot/134/10.0 Bug Tracker =========== @@ -50,11 +50,12 @@ Images Contributors ------------ -* Pedro M. Baeza -* Antonio Espinosa -* Rafael Blasco -* Jairo Llopis +* Pedro M. Baeza +* Antonio Espinosa +* Rafael Blasco +* Jairo Llopis * Vicent Cubells +* David Vidal Maintainer ---------- diff --git a/partner_contact_department/__openerp__.py b/partner_contact_department/__manifest__.py similarity index 77% rename from partner_contact_department/__openerp__.py rename to partner_contact_department/__manifest__.py index 080b98a55..08c87e5db 100644 --- a/partner_contact_department/__openerp__.py +++ b/partner_contact_department/__manifest__.py @@ -1,12 +1,13 @@ # -*- coding: utf-8 -*- -# © 2014-2015 Tecnativa S.L. - Jairo Llopis -# © 2016 Tecnativa S.L. - Vicent Cubells +# Copyright 2014-2015 Tecnativa S.L. - Jairo Llopis +# Copyright 2016 Tecnativa S.L. - Vicent Cubells +# Copyright 2017 Tecnativa S.L. - David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': 'Contact department', "summary": "Assign contacts to departments", - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'category': 'Customer Relationship Management', 'author': 'Tecnativa, ' 'Odoo Community Association (OCA)', diff --git a/partner_contact_department/models/res_partner.py b/partner_contact_department/models/res_partner.py index 94946ae8f..ad4cc80cd 100644 --- a/partner_contact_department/models/res_partner.py +++ b/partner_contact_department/models/res_partner.py @@ -3,8 +3,8 @@ # © 2016 Tecnativa S.L. - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import models, fields, api, _ -from openerp.exceptions import ValidationError +from odoo import models, fields, api, _ +from odoo.exceptions import ValidationError class ResPartner(models.Model): @@ -31,8 +31,7 @@ class ResPartnerDepartment(models.Model): child_ids = fields.One2many( "res.partner.department", "parent_id", - "Child departments", - oldname="children") + "Child departments") parent_left = fields.Integer(index=True) parent_right = fields.Integer(index=True) diff --git a/partner_contact_department/tests/test_recursion.py b/partner_contact_department/tests/test_recursion.py index 90204dd0b..4a4e17700 100644 --- a/partner_contact_department/tests/test_recursion.py +++ b/partner_contact_department/tests/test_recursion.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # © 2016 Tecnativa - Vicent Cubells # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0). -from openerp.tests import common -from openerp.exceptions import ValidationError +from odoo.tests import common +from odoo.exceptions import ValidationError class TestRecursion(common.SavepointCase): diff --git a/partner_contact_department/views/res_partner_department_view.xml b/partner_contact_department/views/res_partner_department_view.xml index f07ab520c..18f1894d1 100644 --- a/partner_contact_department/views/res_partner_department_view.xml +++ b/partner_contact_department/views/res_partner_department_view.xml @@ -1,7 +1,4 @@ - @@ -39,6 +36,6 @@ + parent="sales_team.menu_config_address_book"/> diff --git a/partner_contact_department/views/res_partner_view.xml b/partner_contact_department/views/res_partner_view.xml index e97e209a8..b5833571c 100644 --- a/partner_contact_department/views/res_partner_view.xml +++ b/partner_contact_department/views/res_partner_view.xml @@ -1,7 +1,4 @@ -