diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-08-10 17:01:05 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-08-10 17:01:05 +0200 |
| commit | 48b2ce60ed12b9b0f3aaa0322465504798bd154e (patch) | |
| tree | 0ac2c53a78f678ad4701943eb9eab6a4c8f5ff48 /odoo/http.py | |
| parent | 298eaca4d1e268c43185e9c1dd6d6973e02d9b57 (diff) | |
| parent | 85571bb78c9acc4e867cc3b480be9236a756fc22 (diff) | |
[MERGE] forward port branch saas-16 up to 85571bb78c9
Diffstat (limited to 'odoo/http.py')
| -rw-r--r-- | odoo/http.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/odoo/http.py b/odoo/http.py index 1ea60b9194d..83cde441fb9 100644 --- a/odoo/http.py +++ b/odoo/http.py @@ -275,8 +275,9 @@ class WebRequest(object): if self._cr: if exc_type is None and not self._failed: self._cr.commit() - self.registry.signal_changes() - else: + if self.registry: + self.registry.signal_changes() + elif self.registry: self.registry.reset_changes() self._cr.close() # just to be sure no one tries to re-use the request @@ -1426,6 +1427,7 @@ class Root(object): httprequest = werkzeug.wrappers.Request(environ) httprequest.app = self httprequest.parameter_storage_class = werkzeug.datastructures.ImmutableOrderedMultiDict + threading.current_thread().url = httprequest.url explicit_session = self.setup_session(httprequest) self.setup_db(httprequest) |
