|
@ -582,7 +582,7 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require) |
|
|
orderline.set_tare_mode('AUTO'); |
|
|
orderline.set_tare_mode('AUTO'); |
|
|
orderline.trigger('change', orderline); |
|
|
orderline.trigger('change', orderline); |
|
|
} else { |
|
|
} else { |
|
|
this._super(); |
|
|
|
|
|
|
|
|
this.pos.get_order().add_product(product,{ quantity: this.weight }); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -607,8 +607,11 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require) |
|
|
var qrcode = ''; |
|
|
var qrcode = ''; |
|
|
var ean13 = ''; |
|
|
var ean13 = ''; |
|
|
var ean13_verif = ''; |
|
|
var ean13_verif = ''; |
|
|
|
|
|
|
|
|
|
|
|
if (container){ |
|
|
fields['qrcode'] = qrcode.concat('https://qr.mayam.fr/', container.barcode); |
|
|
fields['qrcode'] = qrcode.concat('https://qr.mayam.fr/', container.barcode); |
|
|
fields['container_ean13'] = container.barcode; |
|
|
fields['container_ean13'] = container.barcode; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
fields['product_id'] = product.id; |
|
|
fields['product_id'] = product.id; |
|
|
// var product_id = (this.get_product().id).toString();
|
|
|
// var product_id = (this.get_product().id).toString();
|
|
@ -637,7 +640,12 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require) |
|
|
fields['write_date'] = date_time; |
|
|
fields['write_date'] = date_time; |
|
|
|
|
|
|
|
|
fields['weight_net'] = scale_screen.weight; |
|
|
fields['weight_net'] = scale_screen.weight; |
|
|
|
|
|
if(container){ |
|
|
fields['weight_tare'] = container.weight; |
|
|
fields['weight_tare'] = container.weight; |
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
fields['weight_tare'] = 0.0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var pricelist = scale_screen._get_active_pricelist(); |
|
|
var pricelist = scale_screen._get_active_pricelist(); |
|
|
fields['price_product'] = (product ? product.get_price(pricelist, scale_screen.weight) : 0) || 0; |
|
|
fields['price_product'] = (product ? product.get_price(pricelist, scale_screen.weight) : 0) || 0; |
|
@ -837,6 +845,17 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require) |
|
|
screen.$el.removeClass('oe_hidden'); |
|
|
screen.$el.removeClass('oe_hidden'); |
|
|
$("#pos-header-text-selec").removeClass('oe_hidden'); |
|
|
$("#pos-header-text-selec").removeClass('oe_hidden'); |
|
|
$("#pos-header-text-confirm").addClass('oe_hidden'); |
|
|
$("#pos-header-text-confirm").addClass('oe_hidden'); |
|
|
|
|
|
|
|
|
|
|
|
// Ajout de la fonctionnalité Pesée sans contenant
|
|
|
|
|
|
if (this.pos.config.allow_without_container){ |
|
|
|
|
|
this.$('.bypass-container').removeClass('oe_hidden'); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
this.$('.bypass-container').addClass('oe_hidden'); |
|
|
|
|
|
} |
|
|
|
|
|
this.$('.bypass-container').click(function(){ |
|
|
|
|
|
self.gui.show_screen('products-balance'); |
|
|
|
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// this methods hides the screen. It's not a good place to put your cleanup stuff as it is called on the
|
|
|
// this methods hides the screen. It's not a good place to put your cleanup stuff as it is called on the
|
|
@ -903,9 +922,15 @@ odoo.define('vracoop_pos_free_balance_v2.container_balance', function (require) |
|
|
|
|
|
|
|
|
var container = this.gui.get_current_screen_param('container'); |
|
|
var container = this.gui.get_current_screen_param('container'); |
|
|
|
|
|
|
|
|
scale_screen.weight_container = container.weight; |
|
|
|
|
|
|
|
|
if (container){ |
|
|
|
|
|
var container_weight = container.weight; |
|
|
|
|
|
} |
|
|
|
|
|
else{ |
|
|
|
|
|
var container_weight = 0.0 |
|
|
|
|
|
} |
|
|
|
|
|
scale_screen.weight_container = container_weight; |
|
|
scale_screen.weight = weight; |
|
|
scale_screen.weight = weight; |
|
|
scale_screen.weight_brut = container.weight + scale_screen.weight; |
|
|
|
|
|
|
|
|
scale_screen.weight_brut = container_weight + scale_screen.weight; |
|
|
scale_screen.$('.weight').text(scale_screen.get_product_weight_string()); |
|
|
scale_screen.$('.weight').text(scale_screen.get_product_weight_string()); |
|
|
scale_screen.$('.computed-price').text(scale_screen.get_computed_price_string()); |
|
|
scale_screen.$('.computed-price').text(scale_screen.get_computed_price_string()); |
|
|
scale_screen.$('.weight-brut').text(scale_screen.get_product_weight_string_brut()); |
|
|
scale_screen.$('.weight-brut').text(scale_screen.get_product_weight_string_brut()); |
|
|