summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/helpers/test_utils_mock.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web/static/tests/helpers/test_utils_mock.js')
-rw-r--r--addons/web/static/tests/helpers/test_utils_mock.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/addons/web/static/tests/helpers/test_utils_mock.js b/addons/web/static/tests/helpers/test_utils_mock.js
index 2ecc655db7e..7485ef41ec8 100644
--- a/addons/web/static/tests/helpers/test_utils_mock.js
+++ b/addons/web/static/tests/helpers/test_utils_mock.js
@@ -11,6 +11,7 @@ odoo.define('web.test_utils_mock', function (require) {
*/
var basic_fields = require('web.basic_fields');
+var BasicModel = require('web.BasicModel');
var config = require('web.config');
var core = require('web.core');
var dom = require('web.dom');
@@ -192,6 +193,11 @@ function addMockEnvironment(widget, params) {
return func;
};
}
+ // FORWARDPORT THIS UP TO 12.2, NOT FURTHER
+ var initialDisableBatchedRPCs = BasicModel.prototype.disableBatchedRPCs;
+ if (!params.enableBasicModelBachedRPCs) {
+ BasicModel.prototype.disableBatchedRPCs = true;
+ }
var widgetDestroy = widget.destroy;
widget.destroy = function () {
@@ -232,6 +238,10 @@ function addMockEnvironment(widget, params) {
}
_.extend(core._t.database.parameters, initialParameters);
}
+ // FORWARDPORT THIS UP TO 12.2, NOT FURTHER
+ if (!params.enableBasicModelBachedRPCs) {
+ BasicModel.prototype.disableBatchedRPCs = initialDisableBatchedRPCs;
+ }
$('body').off('DOMNodeInserted.removeSRC');
$('body').removeClass('debug');