[MERGE] forward port branch 9.0 up to b73518f

This commit is contained in:
Christophe Simonis
2016-11-22 12:41:06 +01:00
3 changed files with 6 additions and 4 deletions
@@ -280,7 +280,7 @@ var ScaleScreenWidget = ScreenWidget.extend({
return self.pos.proxy.scale_read().then(function(weight){
self.set_weight(weight.weight);
});
},{duration:50, repeat: true});
},{duration:150, repeat: true});
},
get_product: function(){
@@ -1208,7 +1208,7 @@ var One2ManyListView = X2ManyListView.extend({
this.dataset.x2m.internal_dataset_changed = false;
var self = this;
return this.save_edition().done(function () {
return this.save_edition(true).done(function () {
if (self._dataset_changed) {
self.dataset.trigger('dataset_changed');
}
@@ -448,7 +448,7 @@ ListView.include(/** @lends instance.web.ListView# */{
/**
* @return {jQuery.Deferred}
*/
save_edition: function () {
save_edition: function (cancel_onfail) {
var self = this;
return self.saving_mutex.exec(function() {
if (!self.editor.is_editing()) {
@@ -483,7 +483,9 @@ ListView.include(/** @lends instance.web.ListView# */{
return {created: created, record: record};
});
}, function() {
return self.cancel_edition();
if (cancel_onfail) {
return self.cancel_edition();
}
});
});
});