Skip to content
Permalink
Browse files

🚑 pos_product_lot: incompatibility with pos_scan_ref

  • Loading branch information...
Ommo73 committed May 17, 2019
1 parent 34b4c5c commit ee56a734d88c623f70a054d7c418603fda04840d
Showing with 15 additions and 6 deletions.
  1. +1 −1 pos_product_lot/__manifest__.py
  2. +6 −0 pos_product_lot/doc/changelog.rst
  3. +8 −5 pos_product_lot/static/src/js/pos.js
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
{
'name': 'Product lot in POS',
'version': '10.0.1.0.2',
'version': '10.0.1.0.3',
'author': 'IT-Projects LLC, Ivan Yelizariev',
'license': 'LGPL-3',
'category': 'Point Of Sale',
@@ -1,3 +1,9 @@
`1.0.3`
-------

- **Fix:** Incompatibility with pos_scan_ref module
- **Fix:** Scanning error

`1.0.2`
-------

@@ -73,9 +73,10 @@ function geByClass(searchClass, node, tag) {
},
scan_product: function(parsed_code){
var self = this;
var product = {};
var selectedOrder = this.get('selectedOrder');
if (parsed_code.encoding === 'ean13') {
var product = this.db.get_product_by_ean13(parsed_code.base_code);
product = this.db.get_product_by_ean13(parsed_code.base_code);
} else if (parsed_code.encoding === 'reference') {
product = this.db.get_product_by_reference(parsed_code.code);
}
@@ -93,16 +94,18 @@ function geByClass(searchClass, node, tag) {
product = lot_product;
}

} else {
return PosModelSuper.prototype.scan_product.apply(this, arguments);
}

if (parsed_code.type === 'price') {
selectedOrder.addProduct(product, {price:parsed_code.value});
selectedOrder.add_product(product, {price:parsed_code.value});
} else if (parsed_code.type === 'weight'){
selectedOrder.addProduct(product, {quantity:parsed_code.value, merge:false});
selectedOrder.add_product(product, {quantity:parsed_code.value, merge:false});
} else if (parsed_code.type === 'discount'){
selectedOrder.addProduct(product, {discount:parsed_code.value, merge:false});
selectedOrder.add_product(product, {discount:parsed_code.value, merge:false});
} else {
selectedOrder.addProduct(product);
selectedOrder.add_product(product);
}
return true;
},

0 comments on commit ee56a73

Please sign in to comment.
You can’t perform that action at this time.