diff --git a/click_and_collect_pos/README.rst b/click_and_collect_pos/README.rst new file mode 100755 index 000000000..700883a4f --- /dev/null +++ b/click_and_collect_pos/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Click And Collect POS +======================= +This module enables customers to order products online and pick them up from the closest shop/bar. + +Configuration +============= +* No additional configuration required + +Company +------- +*`Cybrosys Techno Solutions `__ + +License +------- +General Public License, version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer : (V15) Bhagyadev KP, Contact: odoo@cybrosys.com + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +Bug Tracker +----------- +Bugs are tracked on GitHub Issues. In case of trouble, please check there if +your issue has already been reported. + +Maintainer +========== +.. image:: https://cybrosys.com/images/logo.png + :target: https://cybrosys.com + +This module is maintained by Cybrosys Technologies. + +For further information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ diff --git a/click_and_collect_pos/__init__.py b/click_and_collect_pos/__init__.py new file mode 100644 index 000000000..7d45d5569 --- /dev/null +++ b/click_and_collect_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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/click_and_collect_pos/__manifest__.py b/click_and_collect_pos/__manifest__.py new file mode 100644 index 000000000..fc613da9b --- /dev/null +++ b/click_and_collect_pos/__manifest__.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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': 'Click And Collect PoS', + 'version': '15.0.1.0.0', + 'category': 'Point of Sale', + 'summary': 'With this module, customers may place product orders online ' + 'and pick them up from the closest shop.', + 'description': 'This module enables customers to order products online ' + 'and pick them up from the closest shop. ', + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'depends': ['website_sale', 'point_of_sale', 'sale_management', 'stock'], + 'data': [ + 'views/click_and_collect_button.xml', + 'views/pos_config_views.xml', + 'views/sale_order_views.xml', + 'views/stock_picking_views.xml' + ], + 'assets': { + 'web.assets_frontend': [ + 'click_and_collect_pos/static/src/js/website_sale_cart.js', + ], + 'point_of_sale.assets': [ + 'click_and_collect_pos/static/src/js/sale_order_button.js', + 'click_and_collect_pos/static/src/js/click_and_collect_screen.js', + 'click_and_collect_pos/static/src/scss/sale_order.scss', + ], + 'web.assets_qweb': [ + 'click_and_collect_pos/static/src/xml/**/*', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/click_and_collect_pos/doc/RELEASE_NOTES.md b/click_and_collect_pos/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..2c0e98e34 --- /dev/null +++ b/click_and_collect_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 23.06.2024 +#### Version 15.0.1.0.0 +#### ADD + +- Initial commit for Click and Collect POS diff --git a/click_and_collect_pos/models/__init__.py b/click_and_collect_pos/models/__init__.py new file mode 100644 index 000000000..ea9f3328e --- /dev/null +++ b/click_and_collect_pos/models/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 pos_config +from . import sale_order +from . import sale_order_line +from . import stock_picking diff --git a/click_and_collect_pos/models/pos_config.py b/click_and_collect_pos/models/pos_config.py new file mode 100644 index 000000000..67ff22c6e --- /dev/null +++ b/click_and_collect_pos/models/pos_config.py @@ -0,0 +1,38 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 odoo import fields, models + + +class PosConfig(models.Model): + """inherited for adding address in pos session""" + _inherit = 'pos.config' + + street = fields.Char('Street', required=True, + help='Enter Address for your store') + street2 = fields.Char(string='Street2', help='Enter street for your store') + zip = fields.Char('Zip', help='Enter zip for your store') + city = fields.Char('City', required=True, + help='Enter your store located city') + state_id = fields.Many2one("res.country.state", string='State', + required=True, help='Enter state') + country_id = fields.Many2one('res.country', string='Country', required=True, + help='Enter country') diff --git a/click_and_collect_pos/models/sale_order.py b/click_and_collect_pos/models/sale_order.py new file mode 100644 index 000000000..a846936e5 --- /dev/null +++ b/click_and_collect_pos/models/sale_order.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 odoo import api, fields, models + + +class SaleOrder(models.Model): + """to show the click and collect delivery order in smart button""" + _inherit = 'sale.order' + + collect_count = fields.Integer(string='Click And Collect', + compute='_compute_collect_count', + help='collect count') + + @api.depends('collect_count') + def _compute_collect_count(self): + """to see the click and collect orders count""" + count = self.env['stock.picking'].search_count( + [('is_click_and_collect_order', '=', True), + ('origin', '=', self.name)]) + self.collect_count = count + + def _action_confirm(self): + """this action is used for confirm delivery orders""" + self.action_split_delivery_order() + return super(SaleOrder, self)._action_confirm() + + def action_split_delivery_order(self): + """to split delivery order and click and collect order separately""" + click_and_collect_list = [] + for line in self.order_line.filtered(lambda l: l.is_click_and_collect): + click_and_collect_list.append(line) + for res in click_and_collect_list: + delivery_order = self.env['stock.picking'].create({ + 'partner_id': self.partner_id.id, + 'location_id': + self.env.ref('stock.stock_location_customers').id, + 'location_dest_id': + self.env.ref('stock.stock_location_customers').id, + 'picking_type_id': self.env.ref('stock.picking_type_out').id, + 'sale_id': self.id, + 'origin': self.name, + 'is_click_and_collect_order': True + }) + move = self.env['stock.move'].create({ + 'name': res.name, + 'product_id': res.product_id.id, + 'product_uom_qty': res.product_uom_qty, + 'product_uom': res.product_uom.id, + 'picking_id': delivery_order.id, + 'location_id': delivery_order.location_id.id, + 'location_dest_id': delivery_order.location_dest_id.id, + 'sale_line_id': res.id, + }) + move._action_confirm() + return True + + def action_view_click_and_collect(self): + """smart button for click and collect""" + self.ensure_one() + return { + 'name': 'Click And Collect', + 'view_mode': 'tree,form', + 'res_model': 'stock.picking', + 'type': 'ir.actions.act_window', + 'domain': [('origin', '=', self.name), + ('is_click_and_collect_order', '=', True)], + 'context': "{'create':False}" + } diff --git a/click_and_collect_pos/models/sale_order_line.py b/click_and_collect_pos/models/sale_order_line.py new file mode 100644 index 000000000..1ec7ef4c8 --- /dev/null +++ b/click_and_collect_pos/models/sale_order_line.py @@ -0,0 +1,33 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 odoo import fields, models + + +class SaleOrderLine(models.Model): + """here user can identify click and collect order""" + _inherit = 'sale.order.line' + + is_click_and_collect = fields.Boolean( + string='Collect', help='if you want to enable click and collect for ' + 'this product enable this field') + pos_config_id = fields.Many2one('pos.config', string='PoS Session', + help='Select pos session') diff --git a/click_and_collect_pos/models/stock_picking.py b/click_and_collect_pos/models/stock_picking.py new file mode 100644 index 000000000..eee4214b3 --- /dev/null +++ b/click_and_collect_pos/models/stock_picking.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Bhagyadev KP (odoo@cybrosys.com) +# +# 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 odoo import api, fields, models + + +class StockMove(models.Model): + """to identify the click and collect transfer""" + _inherit = 'stock.picking' + + is_click_and_collect_order = fields.Boolean(default=False, + string="is click and collect" + " order", + help="enable to change the" + " order as click and " + "collect order") + + @api.model + def action_confirmation_click(self, order_id): + """validate click and collect from pos config""" + order_id = int(order_id) + stock = self.search([]) + for rec in stock: + for lines in rec.move_ids_without_package: + if lines.sale_line_id.id == order_id: + rec.action_set_quantities_to_reservation() + rec._action_done() + return True + + @api.model + def action_stock_picking(self, order_lines): + """display the sale order lines in pos session""" + record = [] + stock = self.search([('state', '!=', 'done')]) + for rec in stock: + for lines in rec.move_ids_without_package: + if lines.sale_line_id.id in order_lines: + data = { + 'id': lines.sale_line_id.id, + 'order_id': rec.origin, + 'partner_id': rec.partner_id.name, + 'product_id': rec.product_id.name, + 'product_uom_quantity': lines.product_uom_qty, + } + record.append(data) + return record diff --git a/click_and_collect_pos/static/description/assets/icons/check.png b/click_and_collect_pos/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/check.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/chevron.png b/click_and_collect_pos/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/chevron.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/cogs.png b/click_and_collect_pos/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/cogs.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/consultation.png b/click_and_collect_pos/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/consultation.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/ecom-black.png b/click_and_collect_pos/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/ecom-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/education-black.png b/click_and_collect_pos/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/education-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/hotel-black.png b/click_and_collect_pos/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/hotel-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/license.png b/click_and_collect_pos/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/license.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/lifebuoy.png b/click_and_collect_pos/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/lifebuoy.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/logo.png b/click_and_collect_pos/static/description/assets/icons/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/logo.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/manufacturing-black.png b/click_and_collect_pos/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/manufacturing-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/pos-black.png b/click_and_collect_pos/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/pos-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/puzzle.png b/click_and_collect_pos/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/puzzle.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/restaurant-black.png b/click_and_collect_pos/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/restaurant-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/service-black.png b/click_and_collect_pos/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/service-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/trading-black.png b/click_and_collect_pos/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/trading-black.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/training.png b/click_and_collect_pos/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/training.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/update.png b/click_and_collect_pos/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/update.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/user.png b/click_and_collect_pos/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/user.png differ diff --git a/click_and_collect_pos/static/description/assets/icons/wrench.png b/click_and_collect_pos/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/icons/wrench.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/categories.png b/click_and_collect_pos/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/categories.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/check-box.png b/click_and_collect_pos/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/check-box.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/compass.png b/click_and_collect_pos/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/compass.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/corporate.png b/click_and_collect_pos/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/corporate.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/customer-support.png b/click_and_collect_pos/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/customer-support.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/cybrosys-logo.png b/click_and_collect_pos/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/cybrosys-logo.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/features.png b/click_and_collect_pos/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/features.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/logo.png b/click_and_collect_pos/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/logo.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/pictures.png b/click_and_collect_pos/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/pictures.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/pie-chart.png b/click_and_collect_pos/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/pie-chart.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/right-arrow.png b/click_and_collect_pos/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/right-arrow.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/star.png b/click_and_collect_pos/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/star.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/support.png b/click_and_collect_pos/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/support.png differ diff --git a/click_and_collect_pos/static/description/assets/misc/whatsapp.png b/click_and_collect_pos/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/whatsapp.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l1.png b/click_and_collect_pos/static/description/assets/modules/l1.png new file mode 100755 index 000000000..9c9d6cf26 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l1.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l2.png b/click_and_collect_pos/static/description/assets/modules/l2.png new file mode 100755 index 000000000..960ea72e2 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l2.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l3.png b/click_and_collect_pos/static/description/assets/modules/l3.png new file mode 100755 index 000000000..d5f1ed491 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l3.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l4.png b/click_and_collect_pos/static/description/assets/modules/l4.png new file mode 100755 index 000000000..f9f5e5657 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l4.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l5.png b/click_and_collect_pos/static/description/assets/modules/l5.png new file mode 100755 index 000000000..55cdda774 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l5.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/l6.png b/click_and_collect_pos/static/description/assets/modules/l6.png new file mode 100755 index 000000000..1ebe3ae10 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/l6.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/1.png b/click_and_collect_pos/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..7bf6691fb Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/1.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/2.png b/click_and_collect_pos/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..7a016cf3a Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/2.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/3.png b/click_and_collect_pos/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..82c857575 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/3.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/4.png b/click_and_collect_pos/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..85b93c995 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/4.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/5.png b/click_and_collect_pos/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..45abf3b61 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/5.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/6.png b/click_and_collect_pos/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..eb861f8a5 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/6.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/hero.gif b/click_and_collect_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..27d7fcdec Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/hero.gif differ diff --git a/click_and_collect_pos/static/description/banner.png b/click_and_collect_pos/static/description/banner.png new file mode 100644 index 000000000..69f63fa45 Binary files /dev/null and b/click_and_collect_pos/static/description/banner.png differ diff --git a/click_and_collect_pos/static/description/icon.png b/click_and_collect_pos/static/description/icon.png new file mode 100644 index 000000000..e1bb3520b Binary files /dev/null and b/click_and_collect_pos/static/description/icon.png differ diff --git a/click_and_collect_pos/static/description/index.html b/click_and_collect_pos/static/description/index.html new file mode 100755 index 000000000..3b2b65633 --- /dev/null +++ b/click_and_collect_pos/static/description/index.html @@ -0,0 +1,662 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo sh +
+
+
+ +
+
+
+ +

Click And Collect POS

+

This Module Enables Customers To Order Products Online And Pick Them Up At The Closest Shop.

+ + +
+
+
+
+ +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
This module enables customers to order products online and pick them up at the closest shop. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + This module allows customers to place online orders and pick them up at a local retailer. +
+
+
+
+ + Whatever product the consumer needs to pick up from the shop can be specified on the website. +
+
+
+
+ + In the POS session, the user may view all click and collect orders. +
+
+
+ + When the goods is delivered, the user may confirm delivery in the PoS by clicking a single button. +
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Create PoS Shop Address

+

+ Go to PoS settings -> Enter your store address ->The online user may quickly find the closest store and pick up their order there. +

+ +
+
+

+ Create Click and Collect Order. +

+

+ Choose the item and add it to your shopping cart. Then you can mention the click and collect product from in cart line and select the nearest store. +

+ +
+
+

+ Click and Collect Order Mentioned in Sale Order +

+

+ All click and collect products and the customer's selected pos session are visible in the sale order lines. The user may view all the click and collect products by clicking on the click collect smart tab. +

+ +
+
+

Click and Collect Order in PoS. +

+

+ After opening the session, go to the PoS module where the click and collect button is shown. After you click on it, a new screen will open where you can see all the click and collect products and validate the order. +

+ + +
+
+

+ If the user confirms the delivery, it automatically affects inventory as well. In sale order and inventory, the user can see all the delivered orders. +

+ +
+
+ + + +
+
+

Suggested Products

+
+ +
+
+ + + + +
+
+ +
+

+ Our Services +

+
+ +
+
+
+
+ +
+
+ Odoo + Customization
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Support
+
+ + +
+
+ +
+
+ Hire + Odoo + Developer
+
+ +
+
+ +
+
+ Odoo + Integration
+
+ +
+
+ +
+
+ Odoo + Migration
+
+ + +
+
+ +
+
+ Odoo + Consultancy
+
+ +
+
+ +
+
+ Odoo + Implementation
+
+ +
+
+ +
+
+ Odoo + Licensing Consultancy
+
+
+ +
+ + + +
+
+ +
+

+ Our + Industries +

+
+ +
+
+
+
+ +
+ Trading +
+

+ Easily procure + and + sell your products

+
+
+ +
+
+ +
+ POS +
+

+ Easy + configuration + and convivial experience

+
+
+ +
+
+ +
+ Education +
+

+ A platform for + educational management

+
+
+ +
+
+ +
+ Manufacturing +
+

+ Plan, track and + schedule your operations

+
+
+ +
+
+ +
+ E-commerce & Website +
+

+ Mobile + friendly, + awe-inspiring product pages

+
+
+ +
+
+ +
+ Service Management +
+

+ Keep track of + services and invoice

+
+
+ +
+
+ +
+ Restaurant +
+

+ Run your bar or + restaurant methodically

+
+
+ +
+
+ +
+ Hotel Management +
+

+ An + all-inclusive + hotel management application

+
+
+
+
+ +
+
+ +
+

+ Support +

+
+
+
+
+
+
+ +
+
+

Need Help?

+

Got questions or need + help? + Get in touch.

+ +

+ odoo@cybrosys.com

+
+
+
+
+
+
+
+ +
+
+

WhatsApp

+

Say hi to us on + WhatsApp!

+ +

+ +91 86068 + 27707

+
+
+
+
+
+
+
+ +
+
+
+ +
diff --git a/click_and_collect_pos/static/src/js/click_and_collect_screen.js b/click_and_collect_pos/static/src/js/click_and_collect_screen.js new file mode 100644 index 000000000..d7bc5f2d5 --- /dev/null +++ b/click_and_collect_pos/static/src/js/click_and_collect_screen.js @@ -0,0 +1,46 @@ +odoo.define('click_and_collect_pos.SaleOrderScreen', function(require) { + 'use strict'; + const PosComponent = require('point_of_sale.PosComponent'); + const Registries = require('point_of_sale.Registries'); + var rpc = require('web.rpc'); + // Define a new class that extends PosComponent + class SaleOrderScreen extends PosComponent { + /** + * Override the setup method to perform any additional setup logic. + */ + setup() { + super.setup(); + } + back() { + this.showScreen('ProductScreen'); + } + + getSaleOrderListLine() { +// Function to get sale order list line + var order_line_id = []; + this.props.click_and_collect.forEach(function(object) { + if (object.is_click_and_collect == true) { + order_line_id.push(object) + } + }) + return order_line_id + } + + async onClick(ev) { +// Confirming order + const order_line = await ev.target.dataset.id + await rpc.query({ + 'model': 'stock.picking', + 'method': 'action_confirmation_click', + 'args': [Number(order_line)], + }).then(function(result) { + if (result = true) { + ev.target.closest('.order-row').remove() + } + }) + } + }; + SaleOrderScreen.template = 'SaleOrderScreen'; + Registries.Component.add(SaleOrderScreen); + return SaleOrderScreen; +}); \ No newline at end of file diff --git a/click_and_collect_pos/static/src/js/sale_order_button.js b/click_and_collect_pos/static/src/js/sale_order_button.js new file mode 100644 index 000000000..4d97df47a --- /dev/null +++ b/click_and_collect_pos/static/src/js/sale_order_button.js @@ -0,0 +1,58 @@ +odoo.define('click_and_collect_pos.SaleOrderButton', function (require) { + 'use strict'; + + const PosComponent = require('point_of_sale.PosComponent'); + const Registries = require('point_of_sale.Registries'); + var ajax = require('web.ajax'); + const {useService} = require("@web/core/utils/hooks"); + + // Define a new class that extends PosComponent + class SaleOrderButton extends PosComponent { + + /** + * Override the setup method to perform any additional setup logic. + */ + setup() { + super.setup(); + } + + async onClick() { +// getting orders + var self = this; + var sale_order = []; + var session_id = self.env.pos.pos_session.id + var sale_order_line = await this.rpc({ + model: 'sale.order.line', + method: 'search_read', + args: [], + kwargs: {}, + }); + var stock_picking = await this.rpc({ + model: 'stock.move', + method: 'search_read', + fields: ['id', 'sale_line_id', 'state'], + args: [], + kwargs: {}, + }); + sale_order_line.forEach(function (object) { + if (object.state == 'sale' && object.is_click_and_collect) { + if(self.env.pos.config_id == object.pos_config_id[0]){ + stock_picking.forEach(function (line) { + if (line.sale_line_id[0] && line.state != 'done') { + if (object.id == line.sale_line_id[0]) { + sale_order.push(object); + } + } + }) + } + } + }); + self.showScreen('SaleOrderScreen', { + click_and_collect: sale_order, + }); + } + } + SaleOrderButton.template = 'click_and_collect_pos.SaleOrderButton'; + Registries.Component.add(SaleOrderButton); + return SaleOrderButton; +}); \ No newline at end of file diff --git a/click_and_collect_pos/static/src/js/website_sale_cart.js b/click_and_collect_pos/static/src/js/website_sale_cart.js new file mode 100644 index 000000000..e10d49da8 --- /dev/null +++ b/click_and_collect_pos/static/src/js/website_sale_cart.js @@ -0,0 +1,56 @@ +odoo.define('click_and_collect_pos.website_sale_cart', function(require) { + "use strict" + + var rpc = require('web.rpc'); + var { websiteSaleCart } = require('website_sale.website_sale'); + + // using include method and adding events + websiteSaleCart.include({ + events: _.extend({}, websiteSaleCart.events, { + 'click #is_click_and_collect': '_onClickClickAndCollect', + 'click .session_values': '_onClickPosConfig', + 'click .js_delete_product': '_onClickDeleteProduct', + }), + _onClickClickAndCollect: function(ev) { +// Making order as collected + var order_id = $(ev.target).data('id') + var pos_conf = $(ev.currentTarget.parentElement.parentElement).find('.oe_session') + if ($(ev.target).is(':checked')) { + pos_conf.removeClass('d-none') + } else { + pos_conf.addClass('d-none') + } + rpc.query({ + 'model': 'sale.order.line', + 'method': 'write', + 'args': [ + [order_id], { + 'is_click_and_collect': ev.currentTarget.checked + } + ], + }); + + }, + _onClickDeleteProduct: function(ev) { +// Deleting product + ev.preventDefault(); + $(ev.currentTarget).closest('tr').find('.js_quantity').val(0).trigger('change'); + + }, + _onClickPosConfig: function(ev) { +// Adding pos_config_id to order + var closest_check = $(ev.currentTarget.parentElement.parentElement).find('.clickandecollect') + var order_id = closest_check.data('id') + var session_id = $(ev.target).val() + rpc.query({ + 'model': 'sale.order.line', + 'method': 'write', + 'args': [ + [order_id], { + 'pos_config_id': parseInt(session_id) + } + ], + }); + }, + }); +}) \ No newline at end of file diff --git a/click_and_collect_pos/static/src/scss/sale_order.scss b/click_and_collect_pos/static/src/scss/sale_order.scss new file mode 100644 index 000000000..ef2c8f0ed --- /dev/null +++ b/click_and_collect_pos/static/src/scss/sale_order.scss @@ -0,0 +1,38 @@ +.sale-order-button { + display: flex; + align-items: center; + font-size: medium; + color: white; +} + +.sale-order-button:hover{ + background: rgba(0, 0, 0, .08); + cursor: pointer; +} +.btn{ + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: 400; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; + text-decoration: none; + + color: #333; + background-color: #fff; + border-color: #ccc; + height: 21px; +} diff --git a/click_and_collect_pos/static/src/xml/chrome.xml b/click_and_collect_pos/static/src/xml/chrome.xml new file mode 100644 index 000000000..eed1c0121 --- /dev/null +++ b/click_and_collect_pos/static/src/xml/chrome.xml @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/click_and_collect_pos/static/src/xml/click_and_collect_screen.xml b/click_and_collect_pos/static/src/xml/click_and_collect_screen.xml new file mode 100644 index 000000000..fe6a79d58 --- /dev/null +++ b/click_and_collect_pos/static/src/xml/click_and_collect_screen.xml @@ -0,0 +1,74 @@ + + + + +
+
+
+
+ Back +
+
+
+
+
+
+
+
Sale Order
+
Session
+
Customer
+
Product
+
Total
+
Status
+
Validate
+
+ + +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ +
+
+
+
+ Confirm +
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/click_and_collect_pos/static/src/xml/sale_order_button.xml b/click_and_collect_pos/static/src/xml/sale_order_button.xml new file mode 100644 index 000000000..fd8dec4c0 --- /dev/null +++ b/click_and_collect_pos/static/src/xml/sale_order_button.xml @@ -0,0 +1,10 @@ + + + + +
+