[FIX] web: editable lists and read only fields bug
when the user press tab in editable list views, the focus is supposed to go to the next cell unless it is at the last cell of the line. in that case, it is supposed to create a new record. Sadly, when the last cell is readonly, this does not work. This commit make sure that read only fields are properly ignored when computing the last_field state.
This commit is contained in:
parent
368c674a9b
commit
2d524c947c
|
@ -650,7 +650,7 @@ openerp.web.list_editable = function (instance) {
|
|||
var form = this.editor.form;
|
||||
var last_field = _(form.fields_order).chain()
|
||||
.map(function (name) { return form.fields[name]; })
|
||||
.filter(function (field) { return field.$el.is(':visible'); })
|
||||
.filter(function (field) { return field.$el.is(':visible') && !field.get('effective_readonly'); })
|
||||
.last()
|
||||
.value();
|
||||
// tabbed from last field in form
|
||||
|
|
Loading…
Reference in New Issue