diff options
| author | Christophe Matthieu <chm@odoo.com> | 2017-04-26 13:47:32 +0200 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-04-28 11:32:05 +0200 |
| commit | 9da93dc2327d43958d47a3f1029f8de86fc007ee (patch) | |
| tree | 7d4aae967f28a08383a20df292310c0053971f15 /addons/web/static/tests/fields/basic_fields_tests.js | |
| parent | 76e6a0e3560db8257ab0d183463a894ace1e3a7e (diff) | |
[FIX] web: prevent record creation in M2O with option {'no_create': True}
before this fix, if you enter a random string and exit focus you'll be
prompted to create it.
Diffstat (limited to 'addons/web/static/tests/fields/basic_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/basic_fields_tests.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/tests/fields/basic_fields_tests.js b/addons/web/static/tests/fields/basic_fields_tests.js index 7ac38cad25f..dbe91188242 100644 --- a/addons/web/static/tests/fields/basic_fields_tests.js +++ b/addons/web/static/tests/fields/basic_fields_tests.js @@ -1409,12 +1409,12 @@ QUnit.module('basic_fields', { 'The value should be displayed properly.'); form.$buttons.find('.o_form_button_edit').click(); - assert.strictEqual(form.$('input.o_form_input').val(), '9.10', + assert.strictEqual(form.$('input.o_form_input').first().val(), '9.10', 'The input should be rendered without the currency symbol.'); assert.strictEqual(form.$('input.o_form_input').parent().children().first().text(), '$', 'The input should be preceded by a span containing the currency symbol.'); - form.$('input.o_form_input').val('108.2458938598598').trigger('input'); + form.$('input.o_form_input').first().val('108.2458938598598').trigger('input'); assert.strictEqual(form.$('input.o_form_input').val(), '108.2458938598598', 'The value should not be formated yet.'); @@ -1450,13 +1450,13 @@ QUnit.module('basic_fields', { 'The value should be displayed properly.'); form.$buttons.find('.o_form_button_edit').click(); - assert.strictEqual(form.$('input.o_form_input').val(), '0.00', + assert.strictEqual(form.$('input.o_form_input').first().val(), '0.00', 'The input should be rendered without the currency symbol.'); assert.strictEqual(form.$('input.o_form_input').parent().children().eq(1).text(), '€', 'The input should be followed by a span containing the currency symbol.'); - form.$('input.o_form_input').val('108.2458938598598').trigger('input'); - assert.strictEqual(form.$('input.o_form_input').val(), '108.2458938598598', + form.$('input.o_form_input').first().val('108.2458938598598').trigger('input'); + assert.strictEqual(form.$('input.o_form_input').first().val(), '108.2458938598598', 'The value should not be formated yet.'); form.$buttons.find('.o_form_button_save').click(); |
