diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-10-16 17:53:26 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-10-16 17:53:26 +0200 |
| commit | 41bf8ce6d900cd247c4adf33cc75e3d018c89ffb (patch) | |
| tree | a248bfe02d5b1e1495ad274bbc3c2b33f87d0b82 /addons/web/static/tests/fields/relational_fields_tests.js | |
| parent | a9f11fb4772f2862ca5806baee38cf6a043b5143 (diff) | |
| parent | b29b545fe8464610ce04ac8be11e0356962d10d9 (diff) | |
[MERGE] forward port branch 11.0 up to b29b545fe84
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index cebe9102551..270a0736845 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -9788,6 +9788,37 @@ QUnit.module('relational_fields', { form.destroy(); }); + QUnit.test('click on URL should not open the record', function (assert) { + assert.expect(2); + + this.data.partner.records[0].turtles = [1]; + + var form = createView({ + View: FormView, + model: 'partner', + data: this.data, + arch:'<form string="Partners">' + + '<field name="turtles">' + + '<tree>' + + '<field name="display_name" widget="email"/>' + + '<field name="turtle_foo" widget="url"/>' + + '</tree>' + + '<form></form>' + + '</field>' + + '</form>', + res_id: 1, + }); + + form.$('.o_email_cell a').click(); + assert.strictEqual($('.modal .o_form_view').length, 0, + 'click should not open the modal'); + + form.$('.o_url_cell a').click(); + assert.strictEqual($('.modal .o_form_view').length, 0, + 'click should not open the modal'); + form.destroy(); + }); + QUnit.module('FieldMany2Many'); QUnit.test('many2many kanban: edition', function (assert) { |
