diff --git a/barcode_scanning_sale_purchase/__init__.py b/barcode_scanning_sale_purchase/__init__.py new file mode 100644 index 000000000..195b5dc12 --- /dev/null +++ b/barcode_scanning_sale_purchase/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Sreejith P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import models + diff --git a/barcode_scanning_sale_purchase/__manifest__.py b/barcode_scanning_sale_purchase/__manifest__.py new file mode 100644 index 000000000..c7511bb06 --- /dev/null +++ b/barcode_scanning_sale_purchase/__manifest__.py @@ -0,0 +1,45 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Sreejith P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## + +{ + 'name': 'Barcode scanning support for sale and Purchase', + 'version': '10.0.1.0.0', + 'category': 'Sales', + 'summary': 'This module will help you to use barcode scanner in sales and purchase.', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['purchase', 'sale'], + 'demo': [], + 'data': [ + 'views/sale_order_line.xml', + 'views/purchase_order_line.xml', + ], + 'installable': True, + 'application': False, + 'auto_install': False, + 'images': ['static/description/banner.jpg'], + 'qweb': [], + 'license': 'AGPL-3', +} + diff --git a/barcode_scanning_sale_purchase/models/__init__.py b/barcode_scanning_sale_purchase/models/__init__.py new file mode 100644 index 000000000..0c9d3847c --- /dev/null +++ b/barcode_scanning_sale_purchase/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Sreejith P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +import sale_order +import purchase_order + diff --git a/barcode_scanning_sale_purchase/models/purchase_order.py b/barcode_scanning_sale_purchase/models/purchase_order.py new file mode 100644 index 000000000..fb7541088 --- /dev/null +++ b/barcode_scanning_sale_purchase/models/purchase_order.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Sreejith P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, models, fields + + +class PurchaseOrderLines(models.Model): + _inherit = "purchase.order.line" + + barcode_scan = fields.Char(string='Product Barcode', help="Here you can provide the barcode for the product") + + @api.onchange('barcode_scan') + def _onchange_barcode_scan(self): + product_rec = self.env['product.product'] + if self.barcode_scan: + product = product_rec.search([('barcode', '=', self.barcode_scan)]) + self.product_id = product.id + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/barcode_scanning_sale_purchase/models/sale_order.py b/barcode_scanning_sale_purchase/models/sale_order.py new file mode 100644 index 000000000..4ef8cedc7 --- /dev/null +++ b/barcode_scanning_sale_purchase/models/sale_order.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2017-TODAY Cybrosys Technologies(). +# Author: Sreejith P() +# you can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. +# +# It is forbidden to publish, distribute, sublicense, or sell copies +# of the Software or modified copies of the Software. +# +# 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# GENERAL PUBLIC LICENSE (LGPL v3) along with this program. +# If not, see . +# +############################################################################## +from odoo import api, models, fields + + +class SaleOrderLines(models.Model): + _inherit = 'sale.order.line' + + barcode_scan = fields.Char(string='Product Barcode', help="Here you can provide the barcode for the product") + + @api.onchange('barcode_scan') + def _onchange_barcode_scan(self): + product_rec = self.env['product.product'] + if self.barcode_scan: + product = product_rec.search([('barcode', '=', self.barcode_scan)]) + self.product_id = product.id + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: \ No newline at end of file diff --git a/barcode_scanning_sale_purchase/static/description/banner.jpg b/barcode_scanning_sale_purchase/static/description/banner.jpg new file mode 100644 index 000000000..529143e4e Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/banner.jpg differ diff --git a/barcode_scanning_sale_purchase/static/description/cybro_logo.png b/barcode_scanning_sale_purchase/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/cybro_logo.png differ diff --git a/barcode_scanning_sale_purchase/static/description/icon.png b/barcode_scanning_sale_purchase/static/description/icon.png new file mode 100644 index 000000000..a9ded8dbd Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/icon.png differ diff --git a/barcode_scanning_sale_purchase/static/description/index.html b/barcode_scanning_sale_purchase/static/description/index.html new file mode 100644 index 000000000..117463b87 --- /dev/null +++ b/barcode_scanning_sale_purchase/static/description/index.html @@ -0,0 +1,95 @@ +
+
+

Barcode scanning support for sale and Purchase

+

This module will help you to use barcode scanner in sales and purchase module.

+ +

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Use barcode in Sales order
  • +
  •    Use barcode in Purchase order
  • +
+
+
+
+ +
+
+
+

Overview

+

+ A module that can use in sales and purchase for barcode scanning. +

+
+
+
+ +
+
+

Product Form

+
+

+ ☛ Provide a barcode for the product.
+

+
+ +
+
+
+
+ +
+
+

Sale Order

+
+

+ ☛ Just click on the barcode field and scan the product now the item is added to the order line.
+ +

+
+ +
+
+
+
+ +
+
+

Purchase Order

+
+

+ ☛ Just click on the barcode field and scan the product now the item is added to the order line.
+

+
+ +
+
+
+
+ +
+

Need Any Help?

+ +
diff --git a/barcode_scanning_sale_purchase/static/description/product_barcode.png b/barcode_scanning_sale_purchase/static/description/product_barcode.png new file mode 100644 index 000000000..c241dcf5b Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/product_barcode.png differ diff --git a/barcode_scanning_sale_purchase/static/description/purchase_order.png b/barcode_scanning_sale_purchase/static/description/purchase_order.png new file mode 100644 index 000000000..618694c4f Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/purchase_order.png differ diff --git a/barcode_scanning_sale_purchase/static/description/sale_order.png b/barcode_scanning_sale_purchase/static/description/sale_order.png new file mode 100644 index 000000000..25b507d75 Binary files /dev/null and b/barcode_scanning_sale_purchase/static/description/sale_order.png differ diff --git a/barcode_scanning_sale_purchase/views/purchase_order_line.xml b/barcode_scanning_sale_purchase/views/purchase_order_line.xml new file mode 100644 index 000000000..1b4fc9519 --- /dev/null +++ b/barcode_scanning_sale_purchase/views/purchase_order_line.xml @@ -0,0 +1,15 @@ + + + + + purchase.order.form.inherit + purchase.order + + + + + + + + + \ No newline at end of file diff --git a/barcode_scanning_sale_purchase/views/sale_order_line.xml b/barcode_scanning_sale_purchase/views/sale_order_line.xml new file mode 100644 index 000000000..7c4872fc7 --- /dev/null +++ b/barcode_scanning_sale_purchase/views/sale_order_line.xml @@ -0,0 +1,15 @@ + + + + + sale.order.form.inherit + sale.order + + + + + + + + +