diff options
| author | Géry Debongnie <ged@odoo.com> | 2015-02-02 16:22:42 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2015-02-02 16:23:42 +0100 |
| commit | 913fa445aa2d60d9edeba55960b4afc54d1715bf (patch) | |
| tree | 6efeeac1ea0a410f7e9e71e2bfff4d6d418921ce /addons/web/static/src/js | |
| parent | 0c1d73b1bec68f0417856497ae125e069544b965 (diff) | |
[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.
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/view_list_editable.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js index d8358f69865..888ff4c0559 100644 --- a/addons/web/static/src/js/view_list_editable.js +++ b/addons/web/static/src/js/view_list_editable.js @@ -649,7 +649,7 @@ 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 |
