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) {
if (editing_product == null) {
let p = barcodes.get_corresponding_odoo_product(barcode);
var qtyIsWeight = false;
var qtyIsPriceToWeight = false;
console.log(p);
......@@ -83,6 +84,8 @@ function select_product_from_bc(barcode) {
if(p.rule == 'weight')
qtyIsWeight = true;
else if(p.rule == 'price_to_weight')
qtyIsPriceToWeight = true;
var found = {data: null, place: null};
......@@ -105,6 +108,9 @@ function select_product_from_bc(barcode) {
if(qtyIsWeight)
found.data.product_qty = p.qty;
else if(qtyIsPriceToWeight)
found.data.product_qty = p.qty;
if (found.data !== null) {
setLineEdition(found.data);
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