Browse Source

Ajout tempo de fin + Tare reinit

12.0
Juliana 4 years ago
parent
commit
c758529edd
  1. 44
      static/src/js/container.js

44
static/src/js/container.js

@ -381,12 +381,12 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
var container = this.gui.get_current_screen_param('container');
queue.schedule(function () {
return self.pos.proxy.reset_weight().then(function () {
self.set_weight(0);
self.set_price(0);
});
}, {duration: 500});
// queue.schedule(function () {
// return self.pos.proxy.reset_weight().then(function () {
// self.set_weight(0);
// self.set_price(0);
// });
// }, {duration: 500});
// format price
var scale_screen = this.gui.screen_instances['balancescale'];
@ -433,6 +433,10 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
scale_screen.weight = weight;
scale_screen.$('.weight').text(scale_screen.get_product_weight_string());
scale_screen.$('.computed-price').text(scale_screen.format_currency(scale_screen.get_product_price() * 0));
scale_screen.$('.weight-brut').text('');
var container_text = ''
scale_screen.$('.tare-container').text(container_text);
},
set_price: function (price) {
@ -537,9 +541,6 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
show: function(){
this._super();
var self = this;
this.set_weight(0);
this.set_price(0);
var scale_screen = this.gui.screen_instances['balancescale'];
scale_screen.$el.removeClass('oe_hidden');
@ -585,12 +586,25 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
scale_screen.$el.removeClass('oe_hidden');
this.$('.next,.back-presentation').click(function(){
self.set_weight(0);
// self.set_weight(0);
self.set_price(0);
self.pos.proxy.reset_tare();
self.gui.show_screen('presentation');
});
$("#pos-header-text-confirm").removeClass('oe_hidden');
var container = this.gui.get_current_screen_param('container');
if (container) {
this.pos.proxy.reset_tare();
}
setTimeout(function(){
self.set_price(0);
self.pos.proxy.reset_tare();
self.gui.show_screen('presentation');
}, 5000);
},
set_weight: function(weight){
@ -717,11 +731,6 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
});
$("#pos-header-text-prod").removeClass('oe_hidden');
var container = this.gui.get_current_screen_param('container');
if (container) {
this.pos.proxy.reset_tare();
}
},
hide: function(){
@ -764,12 +773,9 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require)
create_transaction: function(product){
var self = this;
var fields = {};
// var order = this.pos.get_order();
// var selected_orderline = order.get_selected_orderline();
// var container = selected_orderline.get_container();
var container = this.gui.get_current_screen_param('container');
var scale_screen = this.gui.screen_instances['balancescale'];
// var product = this.get_product();
var qrcode = '';
var ean13 = '';

Loading…
Cancel
Save