diff --git a/barcode_scanning_sale_purchase/README.rst b/barcode_scanning_sale_purchase/README.rst new file mode 100644 index 000000000..a2bf9c1d6 --- /dev/null +++ b/barcode_scanning_sale_purchase/README.rst @@ -0,0 +1,40 @@ +Barcode scanning support for sale and Purchase v12 +================================================== + +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/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 @ 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..13281af9e --- /dev/null +++ b/barcode_scanning_sale_purchase/__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 models diff --git a/barcode_scanning_sale_purchase/__manifest__.py b/barcode_scanning_sale_purchase/__manifest__.py new file mode 100644 index 000000000..2829b9706 --- /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': '12.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..21801482c --- /dev/null +++ b/barcode_scanning_sale_purchase/models/__init__.py @@ -0,0 +1,24 @@ +# -*- 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..fcd50fec5 --- /dev/null +++ b/barcode_scanning_sale_purchase/static/description/index.html @@ -0,0 +1,305 @@ + +
+
+

+ Barcode scanning support for sale and Purchase +

+

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

+
+ Cybrosys Technologies +
+
+
+
+
+

+ Overview +

+

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

+
+
+
+
+

+ Features +

+

+ + Use barcode in Sales order +

+

+ + Use barcode in Purchase order +

+
+
+
+
+

+ Screenshots +

+

+ + 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.
+

+
+ +
+ +
+
+
+ +
+
+ +
+ +
+ +
\ No newline at end of file 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..7c233b2a5 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..225ff7315 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..077c663a4 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 + + + + + + + + +