diff --git a/inventory_barcode_scanning/__manifest__.py b/inventory_barcode_scanning/__manifest__.py index 2e6a9d9fe..8abee72b1 100644 --- a/inventory_barcode_scanning/__manifest__.py +++ b/inventory_barcode_scanning/__manifest__.py @@ -23,7 +23,7 @@ { 'name': 'Barcode scanning in Inventory', - 'version': '12.0.1.0.0', + 'version': '12.0.1.0.1', 'summary': 'Barcode Support in Stock Picking.', 'author': 'Cybrosys Techno solutions', 'maintainer': 'Cybrosys Techno Solutions', diff --git a/inventory_barcode_scanning/doc/RELEASE_NOTES.md b/inventory_barcode_scanning/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..5500ca1c5 --- /dev/null +++ b/inventory_barcode_scanning/doc/RELEASE_NOTES.md @@ -0,0 +1,11 @@ +## Module + +#### 09.04.2019 +#### Version 12.0.1.0.0 +##### ADD +- Initial commit + +#### 06.11.2019 +#### Version 12.0.1.0.1 +##### FIX +- Bug Fixed diff --git a/inventory_barcode_scanning/models/stock_picking.py b/inventory_barcode_scanning/models/stock_picking.py index fdecf4422..44c224e0f 100644 --- a/inventory_barcode_scanning/models/stock_picking.py +++ b/inventory_barcode_scanning/models/stock_picking.py @@ -15,20 +15,27 @@ class StockPicking(models.Model): product_obj = self.env['product.product'] product_id = product_obj.search([('barcode', '=', self.barcode)]) if self.barcode and not product_id: - self.barcode = None raise Warning('No product is available for this barcode') if self.barcode and self.move_ids_without_package: for line in self.move_ids_without_package: if line.product_id.barcode == self.barcode: line.quantity_done += 1 - self.barcode = None match = True if self.barcode and not match: - self.barcode = None if product_id: raise Warning('This product is not available in the order.' 'You can add this product by clicking the "Add an item" and scan') + def write(self, vals): + res = super(StockPicking, self).write(vals) + if vals.get('barcode') and self.move_ids_without_package: + for line in self.move_ids_without_package: + if line.product_id.barcode == vals['barcode']: + print(line.quantity_done) + line.quantity_done += 1 + self.barcode = None + return res + class StockPickingOperation(models.Model): _inherit = 'stock.move'