Skip to content
Extraits de code Groupes Projets
Valider b021279a rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[ADD]Add nomenclature to the table container

parent fd88f4dd
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
{
"name": "VRACOOP - POS Balance Container QRCode",
"summary": "VRACOOP - POS Balance Container QRCode",
"version": "12.0.1.7.0",
"version": "12.0.1.8.0",
"development_status": "Beta",
"author": "Le Filament",
"maintainers": ["remi-filament"],
......
......@@ -29,7 +29,7 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
init: function(parent, options){
this._super(parent, options);
this.barcode_base64;
this.barcode_base64 = false;
},
show: function(){
......@@ -54,7 +54,6 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
else {
count_it = 0;
if (self.weight > 0){
self.create_container();
self.print();
self.gui.show_screen('confirmation');
}
......@@ -91,7 +90,7 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
/////////////////////////////
handle_auto_print: function() {
this.create_container();
// this.create_container();
this.print();
this.click_next();
},
......@@ -112,7 +111,6 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
var categ_container = this.pos.config.categ_container;
var timestamp = Math.floor((new Date().getTime())/1000);
// var weight_str = (this.weight * 1000).toString();
var weight_str = parseInt(this.weight * 1000, 10);
weight_str = ("0000" + weight_str).slice(-4);
......@@ -130,12 +128,14 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
var second_int = parseInt(ean20.substring(10,21));
var cle_int = parseInt(ean20.substr(-1));
// Conversion bae 36
// Conversion base 36
var base36_first = first_int.toString(36);
var base36_second = second_int.toString(36);
var base36_cle = cle_int.toString(36);
var url_qrcode = url_qr.concat(base36_cle,'-',base36_first,'-',base36_second);
this.barcode_base64 = base36_cle.concat('-',base36_first,'-',base36_second);
var url_qrcode = url_qr.concat(this.barcode_base64);
var weight_gr = parseInt(weight_str, 10) + 'g'
return {
widget: this,
......@@ -151,7 +151,7 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
this._super();
this.$('.next,.print-qrcode').click(function(){
self.create_container();
// self.create_container();
self.print();
});
},
......@@ -177,9 +177,9 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
print_xml: function() {
var receipt = QWeb.render('XmlQR', this.get_receipt_render_env());
this.create_container();
this.pos.proxy.print_receipt(receipt);
},
print: function() {
var self = this;
......@@ -206,6 +206,7 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
},
render_receipt: function() {
this.$('.pos-qr-container').html(QWeb.render('PosQR', this.get_receipt_render_env()));
this.create_container();
},
create_container: function(){
var self = this;
......@@ -213,7 +214,7 @@ odoo.define('vracoop_pos_container_qrcode.container_print_qr', function (require
fields['weight'] = this.weight;
fields.barcode = false;
fields.barcode = this.barcode_base64;
fields.name = _t('Container');
this.pos.push_container(fields);
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter