summaryrefslogtreecommitdiff
path: root/addons/barcodes/static/src/js
diff options
context:
space:
mode:
authorJulien Mougenot <jum@odoo.com>2020-06-12 09:01:44 +0000
committerJulien Mougenot <jum@odoo.com>2020-06-12 09:01:50 +0000
commitc4786fccfd23360a02e442c48ae2fb9f1e70aa4c (patch)
tree95434422bfecf324a2112fadfc078a9bced134e7 /addons/barcodes/static/src/js
parentd093fd4236a7c7f18645a85970cbdda6fec44c92 (diff)
[IMP] *: update notifications to optional title
closes odoo/odoo#52826 Related: odoo/enterprise#11084 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/barcodes/static/src/js')
-rw-r--r--addons/barcodes/static/src/js/barcode_form_view.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/addons/barcodes/static/src/js/barcode_form_view.js b/addons/barcodes/static/src/js/barcode_form_view.js
index 5e24923f20c..b42c3334f40 100644
--- a/addons/barcodes/static/src/js/barcode_form_view.js
+++ b/addons/barcodes/static/src/js/barcode_form_view.js
@@ -60,8 +60,7 @@ FormController.include({
*/
_barcodeAddX2MQuantity: function (barcode, activeBarcode) {
if (this.mode === 'readonly') {
- this.do_warn(_t('Error: Document not editable'),
- _t('To modify this document, please enable edit mode.'));
+ this.do_warn(false, _t('Enable edit mode to modify this document'));
return Promise.reject();
}
@@ -134,7 +133,7 @@ FormController.include({
const state = this.model.get(this.handle, { raw: true });
const pagingInfo = this._getPagingInfo(state);
if (!pagingInfo) {
- return this.do_warn(_t('Error: Pager not available'));
+ return this.do_warn(false, _t('Pager unavailable'));
}
const currentMinimum = updater(pagingInfo.currentMinimum, state);
const limit = pagingInfo.limit;
@@ -331,7 +330,7 @@ FormController.include({
}
}
if (prefixed && !hasCommand) {
- self.do_warn(_t('Error: Barcode command is undefined'), barcode);
+ self.do_warn(_t('Undefined barcode command'), barcode);
}
return self.alive(Promise.all(defs)).then(function () {
if (!prefixed) {
@@ -367,8 +366,7 @@ FormController.include({
}
if (!_.compact(_.pluck(barcodeInfos, 'candidate')).length) {
- return this.do_warn(_t('Error: No last scanned barcode'),
- _t('To set the quantity please scan a barcode first.'));
+ return this.do_warn(false, _t('Scan a barcode to set the quantity'));
}
for (var k in this.activeBarcode) {