diff --git a/merge_products_pos/README.rst b/merge_products_pos/README.rst new file mode 100644 index 000000000..fd162efe1 --- /dev/null +++ b/merge_products_pos/README.rst @@ -0,0 +1,32 @@ +Merge Products in POS v10 +========================= +Merge Same Products Into Single Line. + +Depends +======= +[point_of_sale] addon Odoo + +Tech +==== +* [JS] - static + +Installation +============ +- www.odoo.com/documentation/10.0/setup/install.html +- Install our custom addon + +License +======= +GNU LESSER GENERAL PUBLIC LICENSE, Version 3 (LGPLv3) +(http://www.gnu.org/licenses/agpl.html) + +Credits +======= +Cybrosys Techno Solutions + +Authors +------- +* Sreejith P +* Linto CT +* Faslu CA + diff --git a/merge_products_pos/__init__.py b/merge_products_pos/__init__.py new file mode 100644 index 000000000..40a96afc6 --- /dev/null +++ b/merge_products_pos/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/merge_products_pos/__manifest__.py b/merge_products_pos/__manifest__.py new file mode 100644 index 000000000..44b424cbd --- /dev/null +++ b/merge_products_pos/__manifest__.py @@ -0,0 +1,40 @@ +# -*- 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': 'Merge Products in POS', + 'version': '10.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'Merge Same Products Into Single Line', + 'author': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'company': 'Cybrosys Techno Solutions', + 'depends': ['point_of_sale'], + 'data': ['views/pos_template.xml'], + 'images': ['static/description/banner.jpg'], + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/merge_products_pos/static/description/banner.jpg b/merge_products_pos/static/description/banner.jpg new file mode 100644 index 000000000..6643e3336 Binary files /dev/null and b/merge_products_pos/static/description/banner.jpg differ diff --git a/merge_products_pos/static/description/before_merge_products.gif b/merge_products_pos/static/description/before_merge_products.gif new file mode 100644 index 000000000..f3d815b19 Binary files /dev/null and b/merge_products_pos/static/description/before_merge_products.gif differ diff --git a/merge_products_pos/static/description/cybro_logo.png b/merge_products_pos/static/description/cybro_logo.png new file mode 100644 index 000000000..bb309114c Binary files /dev/null and b/merge_products_pos/static/description/cybro_logo.png differ diff --git a/merge_products_pos/static/description/icon.png b/merge_products_pos/static/description/icon.png new file mode 100644 index 000000000..13ab96963 Binary files /dev/null and b/merge_products_pos/static/description/icon.png differ diff --git a/merge_products_pos/static/description/index.html b/merge_products_pos/static/description/index.html new file mode 100644 index 000000000..58a4dede4 --- /dev/null +++ b/merge_products_pos/static/description/index.html @@ -0,0 +1,75 @@ +
+
+

Merge Products in POS

+

Merge Same Products Into Single Line

+ +

Author : Cybrosys Techno Solutions , www.cybrosys.com

+
+

Features:

+
    +
  •    Merge the same products in the order line.
  • +
+
+
+
+ +
+
+
+

Overview

+

+ Merge the order line of the same product in POS even if you don’t add them successively. +Presently to merge the order line of the same product, you have to Scan/Add them +successively. If you scan the item after another product a separate order line is created for the +item in the invoice. But with ‘Merge Products’ app, you can avoid this problem and create a +single order line for a product even if you don’t add them successively. +

+
+
+
+ +
+
+

Point of sale

+
+

+ ☛ Presently, New order line is created if you add the item not successively.
+

+
+ +
+

+ ☛ The scanned product is added with the existing orderline.
+ ☛ The Quantity of the product will be increase by one.
+

+
+ +
+
+
+
+
+

Need Any Help?

+ +
diff --git a/merge_products_pos/static/description/merge_products_pos.gif b/merge_products_pos/static/description/merge_products_pos.gif new file mode 100644 index 000000000..1adbd5464 Binary files /dev/null and b/merge_products_pos/static/description/merge_products_pos.gif differ diff --git a/merge_products_pos/static/src/js/merge_products.js b/merge_products_pos/static/src/js/merge_products.js new file mode 100644 index 000000000..7ded2ce2f --- /dev/null +++ b/merge_products_pos/static/src/js/merge_products.js @@ -0,0 +1,27 @@ +odoo.define("merge_products_pos.products", function (require) { + "use strict"; + var pos_screen = require('point_of_sale.screens'); + + pos_screen.ProductScreenWidget.include({ + click_product: function(product) { + if(product.to_weight && this.pos.config.iface_electronic_scale){ + this.gui.show_screen('scale',{product: product}); + }else{ + var self = this; + var order = self.pos.get_order(); + var lines = order.orderlines.models; + var flag = false; + for (var i in lines){ + if(lines[i].product.display_name == product.display_name){ + var qty = lines[i].get_quantity(); + lines[i].set_quantity(qty+1); + flag = true; + } + } + if (!flag){ + order.add_product(product); + } + } + }, + }); +}); diff --git a/merge_products_pos/views/pos_template.xml b/merge_products_pos/views/pos_template.xml new file mode 100644 index 000000000..0e92789f3 --- /dev/null +++ b/merge_products_pos/views/pos_template.xml @@ -0,0 +1,10 @@ + + + + + +