From d179d7d22754749755be2f890149075a986d9f47 Mon Sep 17 00:00:00 2001 From: Simone Orsi Date: Fri, 5 Nov 2021 15:46:55 +0100 Subject: [PATCH] partner_identification_gln: migrate to v14 --- partner_identification_gln/__manifest__.py | 4 ++-- .../readme/CONTRIBUTORS.rst | 1 + partner_identification_gln/tests/test_gln.py | 22 ++++++++++--------- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/partner_identification_gln/__manifest__.py b/partner_identification_gln/__manifest__.py index 4aa0917a8..422123a8c 100644 --- a/partner_identification_gln/__manifest__.py +++ b/partner_identification_gln/__manifest__.py @@ -2,11 +2,11 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { - "name": "Partner Identification Gln", + "name": "Partner Identification GLN", "summary": """ This addon extends "Partner Identification Numbers" to provide a number category for GLN registration""", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "license": "AGPL-3", "author": "Acsone S.A.,Odoo Community Association (OCA)", "website": "https://github.com/OCA/partner-contact", diff --git a/partner_identification_gln/readme/CONTRIBUTORS.rst b/partner_identification_gln/readme/CONTRIBUTORS.rst index 42b018f96..90915f05a 100644 --- a/partner_identification_gln/readme/CONTRIBUTORS.rst +++ b/partner_identification_gln/readme/CONTRIBUTORS.rst @@ -2,3 +2,4 @@ * Denis Roussel * Meyomesse Gilles * Bejaoui Souheil +* Simone Orsi diff --git a/partner_identification_gln/tests/test_gln.py b/partner_identification_gln/tests/test_gln.py index 6d3e5b7a7..1b9c76d14 100644 --- a/partner_identification_gln/tests/test_gln.py +++ b/partner_identification_gln/tests/test_gln.py @@ -6,19 +6,21 @@ from odoo.tests.common import SavepointCase class TestGLN(SavepointCase): - def setUp(self): - super(TestGLN, self).setUp() - self.partner = self.env["res.partner"].create({"name": "TestGLN"}) - self.partner2 = self.env["res.partner"].create({"name": "TestGLN2"}) - pc = self.env.ref( - "partner_identification_gln." "partner_identification_gln_number_category" + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.partner = cls.env["res.partner"].create({"name": "TestGLN"}) + cls.partner2 = cls.env["res.partner"].create({"name": "TestGLN2"}) + pc = cls.env.ref( + "partner_identification_gln.partner_identification_gln_number_category" ) - self.partner_id_category = pc + cls.partner_id_category = pc - pc_gcp = self.env.ref( - "partner_identification_gln." "partner_identification_gcp_number_category" + pc_gcp = cls.env.ref( + "partner_identification_gln.partner_identification_gcp_number_category" ) - self.partner_id_gcp_category = pc_gcp + cls.partner_id_gcp_category = pc_gcp def test_gln(self): # Good GLN