diff options
| author | Dhruv Patel <dhp@odoo.com> | 2020-06-03 10:35:33 +0000 |
|---|---|---|
| committer | Julien Mougenot <jum@odoo.com> | 2020-06-10 13:08:33 +0000 |
| commit | eacbec1e03b1f25e71875fb7caed646a53af67ed (patch) | |
| tree | 0945bb57b0c438bc8af7ee3b21f1cc49567bf28f /addons/sale_expense | |
| parent | a392da16015c69161814e83f1cde5ddf40782505 (diff) | |
[IMP] web,*: highlight quick create feature to user
Generally, Users are not necessarily aware that they can quick create a most
records by simply typing in their name+enter in the many2xxx field input.
The exact purpose of this commit is to make sure the user discovers the quick
create feature of our many2xxx fields.
For that, when the input is empty, display 'Start typing to create a record...'
at the bottom of the dropdown when can_create is set and no_create_edit option
not set. So the user can easily understand that by typing and pressing enter
will create the new record.
Also "Search and Create" options in the dropdown only been shown to the user
when it type anything in the input box as the same case in the "Create" option.
Task : 2266557
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Diffstat (limited to 'addons/sale_expense')
| -rw-r--r-- | addons/sale_expense/static/tests/sale_order_many2one_tests.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/sale_expense/static/tests/sale_order_many2one_tests.js b/addons/sale_expense/static/tests/sale_order_many2one_tests.js index 62a8bb735c2..00c7eed7b0c 100644 --- a/addons/sale_expense/static/tests/sale_order_many2one_tests.js +++ b/addons/sale_expense/static/tests/sale_order_many2one_tests.js @@ -70,8 +70,8 @@ QUnit.module('sale_expense', { }); var $dropdown = form.$('.o_field_many2one input').autocomplete('widget'); await testUtils.fields.many2one.clickOpenDropdown('sale_order_id'); - assert.containsN($dropdown, 'li:not(.o_m2o_dropdown_option)', 8, 'autocomplete should contains 8 suggestions'); - assert.containsN($dropdown, 'li.o_m2o_dropdown_option', 1, 'autocomplete should contain only one option'); + assert.containsN($dropdown, 'li:not(.o_m2o_dropdown_option)', 9); + assert.containsNone($dropdown, 'li.o_m2o_dropdown_option'); assert.containsNone($dropdown, 'li.o_m2o_dropdown_option:contains("Search More...")', "Should not display the 'Search More... option'"); form.destroy(); }); |
