summaryrefslogtreecommitdiff
path: root/addons/web/static/tests/widgets
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-10-10 16:49:59 +0200
committerChristophe Simonis <chs@odoo.com>2017-10-10 16:49:59 +0200
commit6c2ab192eab5d7a730edad6d1b42ae98a2a75471 (patch)
tree4c86ef12648c69654c41ae03d30c96115899eed1 /addons/web/static/tests/widgets
parentbfba2c0e758d3ef4bdda1f704bbb044569fa4683 (diff)
parent88a9980b0c0ba83938f3976f33b28c2bfb06ee75 (diff)
[MERGE] forward port branch saas-16 up to 88a9980b0c0
Diffstat (limited to 'addons/web/static/tests/widgets')
-rw-r--r--addons/web/static/tests/widgets/domain_selector_tests.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/addons/web/static/tests/widgets/domain_selector_tests.js b/addons/web/static/tests/widgets/domain_selector_tests.js
index 77d8eeb24da..55ddc971642 100644
--- a/addons/web/static/tests/widgets/domain_selector_tests.js
+++ b/addons/web/static/tests/widgets/domain_selector_tests.js
@@ -174,6 +174,26 @@ QUnit.module('DomainSelector', {
domainSelector.destroy();
});
+
+ QUnit.test("building a domain with a m2o without following the relation", function (assert) {
+ assert.expect(1);
+
+ var $target = $("#qunit-fixture");
+
+ // Create the domain selector and its mock environment
+ var domainSelector = new DomainSelector(null, "partner", [["product_id", "ilike", 1]], {
+ debugMode: true,
+ readonly: false,
+ });
+ testUtils.addMockEnvironment(domainSelector, {data: this.data});
+ domainSelector.appendTo($target);
+
+ domainSelector.$('.o_domain_leaf_value_input').val('pad').trigger('input').trigger('change');
+ assert.strictEqual(domainSelector.$('.o_domain_debug_input').val(), '[["product_id","ilike","pad"]]',
+ "string should have been allowed as m2o value");
+
+ domainSelector.destroy();
+ });
});
});
});