summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/barcodes/static/src')
-rw-r--r--addons/barcodes/static/src/js/barcode_form_view.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/addons/barcodes/static/src/js/barcode_form_view.js b/addons/barcodes/static/src/js/barcode_form_view.js
index 7b82e68405c..08872f8084a 100644
--- a/addons/barcodes/static/src/js/barcode_form_view.js
+++ b/addons/barcodes/static/src/js/barcode_form_view.js
@@ -240,8 +240,13 @@ FormController.include({
if (prefixed && !hasCommand) {
self.do_warn(_t('Error : Barcode command is undefined'), barcode);
}
- return $.when.apply($, defs).then(function () {
- self.update({}, {reload: false});
+ return self.alive($.when.apply($, defs)).then(function () {
+ if (!prefixed) {
+ // redraw the view if we scanned a real barcode (required if
+ // we manually apply the change in JS, e.g. incrementing the
+ // quantity)
+ self.update({}, {reload: false});
+ }
});
});
},