Browse Source

Ajout set weight 0 lors du retirage du contenant

12-V2.0
Juliana 4 years ago
parent
commit
6eefa81a26
  1. 6
      static/src/js/container.js

6
static/src/js/container.js

@ -757,6 +757,9 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
return self.pos.proxy.scale_read_data_price_tare(price, tare).then(function (scale_answer) {
self.set_weight(scale_answer.weight);
self.set_price(scale_answer.price);
if ((scale_answer.error === '30' || scale_answer.error === '31') && scale_answer.weight !== 0) {
self.set_weight(0);
}
});
}, {duration: 500, repeat: true});
@ -765,6 +768,9 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
return self.pos.proxy.scale_read_data_price(price).then(function (scale_answer) {
self.set_weight(scale_answer.weight);
self.set_price(scale_answer.price);
if ((scale_answer.error === '30' || scale_answer.error === '31') && scale_answer.weight !== 0) {
self.set_weight(0);
}
});
}, {duration: 500, repeat: true});
}

Loading…
Cancel
Save