Skip to content

Commit

Permalink
[IMP] web: select input on add record in list editable
Browse files Browse the repository at this point in the history
bzr revid: dle@openerp.com-20140408120141-f1fx2e9e8vqatccx
  • Loading branch information
beledouxdenis committed Apr 8, 2014
1 parent 7dc732a commit a16b0c7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion addons/web/static/src/js/view_list_editable.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,19 @@ openerp.web.list_editable = function (instance) {
* as an editable row at the top or bottom of the list)
*/
do_add_record: function () {
var self = this;
if (this.editable()) {
this.$el.find('table:first').show();
this.$el.find('.oe_view_nocontent').remove();
this.start_edition();
this.start_edition().then(function(){
var fields = self.editor.form.fields;
self.editor.form.fields_order.some(function(field){
if (fields[field].$el.is(':visible')){
fields[field].$el.find("input").select();
return true;
}
});
});
} else {
this._super();
}
Expand Down

0 comments on commit a16b0c7

Please sign in to comment.