diff --git a/inventory_barcode_scanning/README.rst b/inventory_barcode_scanning/README.rst new file mode 100644 index 000000000..4948e3978 --- /dev/null +++ b/inventory_barcode_scanning/README.rst @@ -0,0 +1,39 @@ +Barcode scanning in inventory v12 +================================= + +This module will used for barcode scanning in inventory. +Depends +======= +[stock] addon Odoo + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/12.0/setup/install.html +- Install our custom addon + + +Bug Tracker +=========== +Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. + +Credits +======= +* Cybrosys Techno Solutions + +Author +------ + +Developer: Sreejith P, sreejith@cybrosys.in +Developer: Niyas Raphy, niyas@cybrosys.in + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. \ No newline at end of file diff --git a/inventory_barcode_scanning/__init__.py b/inventory_barcode_scanning/__init__.py new file mode 100644 index 000000000..cde864bae --- /dev/null +++ b/inventory_barcode_scanning/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import models diff --git a/inventory_barcode_scanning/__manifest__.py b/inventory_barcode_scanning/__manifest__.py new file mode 100644 index 000000000..2e6a9d9fe --- /dev/null +++ b/inventory_barcode_scanning/__manifest__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- + +################################################################################### +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2018-TODAY Cybrosys Technologies (). +# Author: Sreejith P () +# +# This program is free software: you can modify +# it under the terms of the GNU Affero General Public License (AGPL) as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +################################################################################### + +{ + 'name': 'Barcode scanning in Inventory', + 'version': '12.0.1.0.0', + 'summary': 'Barcode Support in Stock Picking.', + 'author': 'Cybrosys Techno solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['stock'], + 'category': 'Inventory', + 'demo': [], + 'data': ['views/stock_picking.xml'], + 'installable': True, + 'application': False, + 'auto_install': False, + 'images': ['static/description/banner.jpg'], + 'qweb': [], + 'license': 'AGPL-3', +} diff --git a/inventory_barcode_scanning/models/__init__.py b/inventory_barcode_scanning/models/__init__.py new file mode 100644 index 000000000..2b6800c64 --- /dev/null +++ b/inventory_barcode_scanning/models/__init__.py @@ -0,0 +1,3 @@ +# -*- coding: utf-8 -*- + +from . import stock_picking diff --git a/inventory_barcode_scanning/models/stock_picking.py b/inventory_barcode_scanning/models/stock_picking.py new file mode 100644 index 000000000..fdecf4422 --- /dev/null +++ b/inventory_barcode_scanning/models/stock_picking.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- + +from odoo import fields, models, api +from odoo.exceptions import Warning + + +class StockPicking(models.Model): + _inherit = 'stock.picking' + + barcode = fields.Char(string='Barcode') + + @api.onchange('barcode') + def barcode_scanning(self): + match = False + 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') + + +class StockPickingOperation(models.Model): + _inherit = 'stock.move' + + barcode = fields.Char(string='Barcode') + + @api.onchange('barcode') + def _onchange_barcode_scan(self): + product_rec = self.env['product.product'] + if self.barcode: + product = product_rec.search([('barcode', '=', self.barcode)]) + self.product_id = product.id + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/inventory_barcode_scanning/static/description/banner.jpg b/inventory_barcode_scanning/static/description/banner.jpg new file mode 100644 index 000000000..86c66b6c2 Binary files /dev/null and b/inventory_barcode_scanning/static/description/banner.jpg differ diff --git a/inventory_barcode_scanning/static/description/cybro_logo.png b/inventory_barcode_scanning/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/inventory_barcode_scanning/static/description/cybro_logo.png differ diff --git a/inventory_barcode_scanning/static/description/icon.png b/inventory_barcode_scanning/static/description/icon.png new file mode 100644 index 000000000..110f86b9f Binary files /dev/null and b/inventory_barcode_scanning/static/description/icon.png differ diff --git a/inventory_barcode_scanning/static/description/index.html b/inventory_barcode_scanning/static/description/index.html new file mode 100644 index 000000000..61cf8168f --- /dev/null +++ b/inventory_barcode_scanning/static/description/index.html @@ -0,0 +1,77 @@ +
+
+

Barcode scanning support for Inventory

+

Use Barcode scanner to add entry in Stock Picking

+ +

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Avoid manual entry of item count in Stock Picking.
  • +
  •    Use barcode to add product.
  • +
+
+
+
+ +
+
+
+

Overview

+

+ With this module you can avoid manual entry of product quantity in Stock Picking form. Presently you have to enter the quantity of each product individually. By installing this module you will get an extra field in stock picking form to Scan Barcode and update the quantity of product automatically. +

+
+
+
+ +
+
+

Stock Picking

+
+

+ ☛ Enable editing mode.
+ ☛ Click the field ‘Barcode’ and scan the Product.
+ ☛ You can see the quantity is updating automatically.
+ ☛ If no associated product is found in list then a warning will popup.
+ +

  • + In this case you can add the product to list by clicking Add an Item + +
  • +
  • + Here also you will have the option to scan barcode for easy addition. +
  • +
+

+
+ +
+
+
+
+
+

Need Any Help?

+ +
diff --git a/inventory_barcode_scanning/static/description/inventory_barcode.png b/inventory_barcode_scanning/static/description/inventory_barcode.png new file mode 100644 index 000000000..c0fb3e3a1 Binary files /dev/null and b/inventory_barcode_scanning/static/description/inventory_barcode.png differ diff --git a/inventory_barcode_scanning/views/stock_picking.xml b/inventory_barcode_scanning/views/stock_picking.xml new file mode 100644 index 000000000..daaddde1d --- /dev/null +++ b/inventory_barcode_scanning/views/stock_picking.xml @@ -0,0 +1,20 @@ + + + + + + Barcode Scanning Inventory + stock.picking + + + + + + + + + + + + +