diff --git a/base_external_system/__manifest__.py b/base_external_system/__manifest__.py index ca837198..90081ec1 100644 --- a/base_external_system/__manifest__.py +++ b/base_external_system/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Base External System", "summary": "Data models allowing for connection to external systems.", - "version": "13.0.1.0.0", + "version": "15.0.1.0.0", "category": "Base", "website": "https://github.com/OCA/server-backend", "author": "LasLabs, " "Odoo Community Association (OCA)", diff --git a/base_external_system/models/external_system_os.py b/base_external_system/models/external_system_os.py index 8ff2a501..19850c6a 100644 --- a/base_external_system/models/external_system_os.py +++ b/base_external_system/models/external_system_os.py @@ -23,7 +23,7 @@ class ExternalSystemOs(models.Model): """Return a usable client representing the remote system.""" super(ExternalSystemOs, self).external_get_client() if self.system_id.remote_path: - self.previous_dir = os.getcwd() + ExternalSystemOs.previous_dir = os.getcwd() os.chdir(self.system_id.remote_path) return os @@ -34,7 +34,8 @@ class ExternalSystemOs(models.Model): client (mixed): The client that was returned by ``external_get_client``. """ - super(ExternalSystemOs, self).external_destroy_client(client) - if self.previous_dir: - os.chdir(self.previous_dir) - self.previous_dir = None + result = super(ExternalSystemOs, self).external_destroy_client(client) + if ExternalSystemOs.previous_dir: + os.chdir(ExternalSystemOs.previous_dir) + ExternalSystemOs.previous_dir = None + return result diff --git a/base_external_system/readme/CONTRIBUTORS.rst b/base_external_system/readme/CONTRIBUTORS.rst index 5a590489..f484d8b9 100644 --- a/base_external_system/readme/CONTRIBUTORS.rst +++ b/base_external_system/readme/CONTRIBUTORS.rst @@ -1,3 +1,6 @@ * Dave Lasley -* Alexandre Díaz * Ronald Portier +* `Tecnativa `__: + + * Alexandre Díaz + * César A. Sánchez diff --git a/base_external_system/tests/test_external_system_os.py b/base_external_system/tests/test_external_system_os.py index 6e4d55cb..130082b1 100644 --- a/base_external_system/tests/test_external_system_os.py +++ b/base_external_system/tests/test_external_system_os.py @@ -16,8 +16,9 @@ class TestExternalSystemOs(Common): @classmethod def tearDownClass(cls): """Set the working dir back to origin, just in case.""" - super(TestExternalSystemOs, cls).tearDownClass() + result = super(TestExternalSystemOs, cls).tearDownClass() os.chdir(cls.working_dir) + return result def setUp(self): super(TestExternalSystemOs, self).setUp() diff --git a/base_external_system/views/external_system_view.xml b/base_external_system/views/external_system_view.xml index ada662a2..ec0ee254 100644 --- a/base_external_system/views/external_system_view.xml +++ b/base_external_system/views/external_system_view.xml @@ -53,7 +53,7 @@ external.system.view.tree external.system - +