summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js
diff options
context:
space:
mode:
authorJérome Maes <jem@openerp.com>2015-10-02 14:52:50 +0200
committerJérome Maes <jem@openerp.com>2015-10-06 09:44:38 +0200
commit2df240ded02bf5aafee40c6f78b075e6f05fda89 (patch)
treefdaa892b494c826cadde4ea7adb33b4440e1f3e9 /addons/web/static/src/js
parent22631a152a1d242eefd9454857773039f58570bd (diff)
[FIX] bus : notification should be committed before awake longtpolling thread
If calling more than once `sendmany` (or `sendone`) on the same http request, the `NOTIFY imbus` will tell pertinent polling thread to fetch their notifications in the bus table, which will not contain the new notifications, since they are not yet committed. For some reason, this doesn't happen when calling only once `sendmany`. Committing the notifications breaks the tests since no rollback is possible. So, `self._cr.commit()` should not be called in a test environement. In this case, we cannot use `isinstance(self._cr, TestCursor)` since TestCursor is only avaiblable for http request in test mode. Here the cursor is a normal cursor, and to determine if we are in test mode, there is no other option than checking the config of the odoo server.
Diffstat (limited to 'addons/web/static/src/js')
0 files changed, 0 insertions, 0 deletions