diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-06-13 18:18:17 +0200 |
| commit | a0a11fd5e2d78e5fc0d1503275adade570fe0d42 (patch) | |
| tree | 242f15169ef336a0fa3027a82a463b681aebe71d /odoo | |
| parent | dad9265d69a2e9ab21ea37cc15f7cd5f5d93afcf (diff) | |
| parent | 8a19a6a2a34d318d2c5b799a0e8e108fe04a097c (diff) | |
[MERGE] forward port branch saas-11.3 up to 8a19a6a2a34
Diffstat (limited to 'odoo')
| -rw-r--r-- | odoo/addons/test_new_api/__manifest__.py | 4 | ||||
| -rw-r--r-- | odoo/http.py | 16 |
2 files changed, 12 insertions, 8 deletions
diff --git a/odoo/addons/test_new_api/__manifest__.py b/odoo/addons/test_new_api/__manifest__.py index e238f37f779..ec4bdae82bc 100644 --- a/odoo/addons/test_new_api/__manifest__.py +++ b/odoo/addons/test_new_api/__manifest__.py @@ -10,7 +10,9 @@ 'data': [ 'ir.model.access.csv', 'views.xml', - 'demo_data.xml', 'template.xml', ], + 'demo': [ + 'demo_data.xml', + ], } diff --git a/odoo/http.py b/odoo/http.py index d5650e4ef9b..06c7bbe86f8 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -280,13 +280,15 @@ class WebRequest(object): _request_stack.pop() if self._cr: - if exc_type is None and not self._failed: - self._cr.commit() - if self.registry: - self.registry.signal_changes() - elif self.registry: - self.registry.reset_changes() - self._cr.close() + try: + if exc_type is None and not self._failed: + self._cr.commit() + if self.registry: + self.registry.signal_changes() + elif self.registry: + self.registry.reset_changes() + finally: + self._cr.close() # just to be sure no one tries to re-use the request self.disable_db = True self.uid = None |
