diff --git a/barcode_scanning_sale_purchase/README.rst b/barcode_scanning_sale_purchase/README.rst new file mode 100644 index 000000000..273d04737 --- /dev/null +++ b/barcode_scanning_sale_purchase/README.rst @@ -0,0 +1,40 @@ +Barcode scanning support for sale and Purchase v11 +================================================== + +This module will help you to use barcode scanner in sales and purchase. + +Depends +======= +[sale_management] addon Odoo +[purchase] addon Odoo + +Tech +==== +* [Python] - Models +* [XML] - Odoo views + +Installation +============ +- www.odoo.com/documentation/11.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 @ cybrosys, sreejith@cybrosys.in + +Maintainer +---------- + +This module is maintained by Cybrosys Technologies. + +For support and more information, please visit https://www.cybrosys.com. diff --git a/barcode_scanning_sale_purchase/__init__.py b/barcode_scanning_sale_purchase/__init__.py new file mode 100644 index 000000000..a2892c4b9 --- /dev/null +++ b/barcode_scanning_sale_purchase/__init__.py @@ -0,0 +1,22 @@ +# -*- 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 . +# +################################################################################### +from . import models diff --git a/barcode_scanning_sale_purchase/__manifest__.py b/barcode_scanning_sale_purchase/__manifest__.py new file mode 100644 index 000000000..39b2eb40e --- /dev/null +++ b/barcode_scanning_sale_purchase/__manifest__.py @@ -0,0 +1,43 @@ +# -*- 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 support for sale and Purchase', + 'version': '11.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_management'], + '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..4a52eb7ef --- /dev/null +++ b/barcode_scanning_sale_purchase/models/__init__.py @@ -0,0 +1,23 @@ +# -*- 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 . +# +################################################################################### +from . import sale_order +from . 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..04ecd5b6b --- /dev/null +++ b/barcode_scanning_sale_purchase/models/purchase_order.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +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..30e4958f9 --- /dev/null +++ b/barcode_scanning_sale_purchase/models/sale_order.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- + +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 + + + + + + + + +