Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pos_tare/static/src/js/screens.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ odoo.define('pos_tare.screens', function (require) {
'body': _t('Please set a numeric value' +
' in the tare field, or let empty.'),
});
} else if (isNaN(this.gross_weight)) {
this.gui.show_popup('error', {
'title': _t('Incorrect Gross Weight Value'),
'body': _t('Please set a numeric value' +
' in the gross weight field.'),
});
} else {
this._super();
if (this.tare > 0.0) {
Expand Down Expand Up @@ -180,7 +186,7 @@ odoo.define('pos_tare.screens', function (require) {
} else if (mode === 'tare') {
if (this.pos.config.iface_tare_method === 'barcode') {
this.gui.show_popup('error',
{'title': _t('Incorrect Tare Value'),
{'title': _t('Feature Disabled'),
'body': _t('You can not set the tare.' +
' To be able to set the tare manually' +
' you have to change the tare input method' +
Expand Down