Commit 9bef85c5 by Alexis Aoun

rajout detection poids pour barcode price_to_weight

parent b7186bd6
...@@ -69,6 +69,7 @@ function select_product_from_bc(barcode) { ...@@ -69,6 +69,7 @@ function select_product_from_bc(barcode) {
if (editing_product == null) { if (editing_product == null) {
let p = barcodes.get_corresponding_odoo_product(barcode); let p = barcodes.get_corresponding_odoo_product(barcode);
var qtyIsWeight = false; var qtyIsWeight = false;
var qtyIsPriceToWeight = false;
console.log(p); console.log(p);
...@@ -83,6 +84,8 @@ function select_product_from_bc(barcode) { ...@@ -83,6 +84,8 @@ function select_product_from_bc(barcode) {
if(p.rule == 'weight') if(p.rule == 'weight')
qtyIsWeight = true; qtyIsWeight = true;
else if(p.rule == 'price_to_weight')
qtyIsPriceToWeight = true;
var found = {data: null, place: null}; var found = {data: null, place: null};
...@@ -105,6 +108,9 @@ function select_product_from_bc(barcode) { ...@@ -105,6 +108,9 @@ function select_product_from_bc(barcode) {
if(qtyIsWeight) if(qtyIsWeight)
found.data.product_qty = p.qty; found.data.product_qty = p.qty;
else if(qtyIsPriceToWeight)
found.data.product_qty = p.qty;
if (found.data !== null) { if (found.data !== null) {
setLineEdition(found.data); setLineEdition(found.data);
if (found.place === 'to_process') { if (found.place === 'to_process') {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment