[FIX] web: can't saved X2Many list editable if a deleted record is invalid
The widget test if all lines are valid to save the view, but the test include the removed lines (eg: required field).
This commit is contained in:
@@ -973,7 +973,7 @@ var X2ManyListView = ListView.extend({
|
||||
field.no_rerender = true;
|
||||
current_values[field.name] = field.get('value');
|
||||
});
|
||||
var cached_records = _.filter(this.dataset.cache, function(item){return !_.isEmpty(item.values)});
|
||||
var cached_records = _.filter(this.dataset.cache, function(item){return !_.isEmpty(item.values) && !item.to_delete;});
|
||||
var valid = _.every(cached_records, function(record){
|
||||
_.each(fields, function(field){
|
||||
var value = record.values[field.name];
|
||||
|
||||
Reference in New Issue
Block a user