[FIX]Refixed the issue of o2m record duplication
This commit is contained in:
parent
477fa85e55
commit
26cb208903
|
@ -3948,8 +3948,11 @@ instance.web.form.One2ManyListView = instance.web.ListView.extend({
|
||||||
else
|
else
|
||||||
return $.when();
|
return $.when();
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
if (!self.o2m.options.reload_on_button) {
|
var ds = self.o2m.dataset;
|
||||||
self.o2m.dataset.reset_ids([]);
|
var cached_records = _.any([ds.to_create, ds.to_delete, ds.to_write], function(value) {
|
||||||
|
return value.length;
|
||||||
|
});
|
||||||
|
if (!self.o2m.options.reload_on_button && !cached_records) {
|
||||||
self.handle_button(name, id, callback);
|
self.handle_button(name, id, callback);
|
||||||
}else {
|
}else {
|
||||||
self.handle_button(name, id, function(){
|
self.handle_button(name, id, function(){
|
||||||
|
|
Loading…
Reference in New Issue