diff --git a/click_and_collect_pos/README.rst b/click_and_collect_pos/README.rst new file mode 100755 index 000000000..9f8e6f3a3 --- /dev/null +++ b/click_and_collect_pos/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://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. +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: Nihala M K @cybrosys, Contact: odoo@cybrosys.com + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +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 support and more 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..5ab86863a --- /dev/null +++ b/click_and_collect_pos/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) 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..8dc670bf8 --- /dev/null +++ b/click_and_collect_pos/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +{ + 'name': 'Click And Collect PoS', + 'version': '16.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", + 'images': ['static/description/banner.png'], + 'depends': [ + 'base', 'website_sale', 'point_of_sale', 'sale_management', 'stock'], + 'data': [ + 'views/click_and_collect_button.xml', + 'views/pos_config.xml', + 'views/sale_order.xml', + 'views/stock_picking.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/xml/sale_order_button.xml', + 'click_and_collect_pos/static/src/js/sale_order_button.js', + 'click_and_collect_pos/static/src/xml/chrome.xml', + 'click_and_collect_pos/static/src/js/click_and_collect_screen.js', + 'click_and_collect_pos/static/src/xml/click_and_collect_screen.xml', + 'click_and_collect_pos/static/src/scss/sale_order.scss', + 'click_and_collect_pos/static/src/js/pos_model_load.js' + ], + }, + '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..0b9b35083 --- /dev/null +++ b/click_and_collect_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 1.03.2023 +#### Version 16.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..3ef50fe15 --- /dev/null +++ b/click_and_collect_pos/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +from . import pos_config +from . import sale_order +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..c80b55de9 --- /dev/null +++ b/click_and_collect_pos/models/pos_config.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +"""This module enables users to place online orders and +pick up their purchases from nearby stores. """ +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('Street2') + 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) + + +class InheritPosSession(models.Model): + """inherit pos session for load models in pos""" + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + """load Meals Planning and Menu.Meals model in pos.""" + result = super()._pos_ui_models_to_load() + result.extend(['stock.picking', 'stock.move']) + return result + + def _loader_params_stock_picking(self): + """ returning corresponding data to pos""" + data = [] + stock_picking = self.env['stock.picking'].search([ + ('state', '!=', ['done', 'cancelled'])]) + for rec in stock_picking: + data.append(rec.id) + return { + 'search_params': { + 'domain': [('id', '=', data)], + 'fields': ['state', 'origin', 'move_ids_without_package'] + } + } + + def _loader_params_stock_move(self): + """load stock.move model in pos""" + return { + 'search_params': { + 'fields': ['product_id', 'sale_line_id', 'picking_id'] + } + } + + def _get_pos_ui_stock_picking(self, params): + """get params in stock picking""" + return self.env['stock.picking'].search_read( + **params['search_params']) + + def _get_pos_ui_stock_move(self, params): + """get params in stock move""" + return self.env['stock.move'].search_read( + **params['search_params']) 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..322ac5c71 --- /dev/null +++ b/click_and_collect_pos/models/sale_order.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +"""This module enables users to place online orders and +pick up their purchases from nearby stores. """ +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') + + @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}" + } + + +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..7a36feadb --- /dev/null +++ b/click_and_collect_pos/models/stock_picking.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions (odoo@cybrosys.com) +# +# You can modify it under the terms of the GNU AFFERO +# GENERAL PUBLIC LICENSE (AGPL v3), Version 3. +# +# 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 (AGPL v3) for more details. +# +# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE +# (AGPL v3) along with this program. +# If not, see . +# +################################################################################ +"""This module enables users to place online orders and +pick up their purchases from nearby stores. """ +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) + + @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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/manufacturing-black.png b/click_and_collect_pos/static/description/assets/icons/manufacturing-black.png new file mode 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/barcode.png b/click_and_collect_pos/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..f14dc60c5 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/barcode.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/dashboard.png b/click_and_collect_pos/static/description/assets/modules/dashboard.png new file mode 100644 index 000000000..17c14989e Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/dashboard.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/product_creation.png b/click_and_collect_pos/static/description/assets/modules/product_creation.png new file mode 100644 index 000000000..fd1f87699 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/product_creation.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/receipt.png b/click_and_collect_pos/static/description/assets/modules/receipt.png new file mode 100644 index 000000000..d1d3775d6 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/receipt.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/service.png b/click_and_collect_pos/static/description/assets/modules/service.png new file mode 100644 index 000000000..c247ba6ac Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/service.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/time_based.png b/click_and_collect_pos/static/description/assets/modules/time_based.png new file mode 100644 index 000000000..4e7befe1f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/time_based.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc1.0.png b/click_and_collect_pos/static/description/assets/screenshots/cc1.0.png new file mode 100644 index 000000000..61e7b1e52 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc1.0.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc2.png b/click_and_collect_pos/static/description/assets/screenshots/cc2.png new file mode 100644 index 000000000..96b64e5a5 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc2.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc3.png b/click_and_collect_pos/static/description/assets/screenshots/cc3.png new file mode 100644 index 000000000..088aede45 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc3.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc4.png b/click_and_collect_pos/static/description/assets/screenshots/cc4.png new file mode 100644 index 000000000..9918c8e48 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc4.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc5.png b/click_and_collect_pos/static/description/assets/screenshots/cc5.png new file mode 100644 index 000000000..2e9a5baa3 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc5.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/cc6.png b/click_and_collect_pos/static/description/assets/screenshots/cc6.png new file mode 100644 index 000000000..b4abf9376 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/cc6.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/v16_hero.gif b/click_and_collect_pos/static/description/assets/screenshots/v16_hero.gif new file mode 100644 index 000000000..a3b912a7c Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/v16_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..dd11b0fbe 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..72e921566 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 100644 index 000000000..71c5b9c61 --- /dev/null +++ b/click_and_collect_pos/static/description/index.html @@ -0,0 +1,549 @@ +
+ +
+ +
+
+ Community +
+
+ 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. +

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

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

+
+
+
+
+
+
+
+ +
+
+
+ +
\ No newline at end of file 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..48fa20337 --- /dev/null +++ b/click_and_collect_pos/static/src/js/click_and_collect_screen.js @@ -0,0 +1,51 @@ +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() { + 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) { + var order_line = ev.target.dataset.id + await rpc.query({ + 'model': 'stock.picking', + 'method': 'action_confirmation_click', + 'args': [order_line], + }).then(function(result) { + if (result = true) { + ev.target.parentNode.parentNode.remove() + } + }) + location.reload(); + + } + + }; + SaleOrderScreen.template = 'SaleOrderScreen'; + + // Register the new SaleOrderScreen component with the POS registry. + Registries.Component.add(SaleOrderScreen); + + // Export the new SaleOrderScreen class. + return SaleOrderScreen; +}); \ No newline at end of file diff --git a/click_and_collect_pos/static/src/js/pos_model_load.js b/click_and_collect_pos/static/src/js/pos_model_load.js new file mode 100644 index 000000000..cd018f1ee --- /dev/null +++ b/click_and_collect_pos/static/src/js/pos_model_load.js @@ -0,0 +1,20 @@ +odoo.define('click_and_collect_pos.StockPicking', function(require) { + "use strict"; + + var { PosGlobalState } = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); + + const StockPicking = (PosGlobalState) => class StockPicking extends PosGlobalState { + async _processData(loadedData) { + super._processData(...arguments) + let stock_picking = [] + this.stock_picking = loadedData['stock.picking'] + loadedData['stock.picking'].forEach((data) => { + data.move_ids_without_package = loadedData['stock.move'].filter((stock) => data.move_ids_without_package.includes(stock.id)) + stock_picking.push(data) + }) + this.stock_picking = stock_picking + } + } + Registries.Model.extend(PosGlobalState, StockPicking); +}); \ 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..fa67a31aa --- /dev/null +++ b/click_and_collect_pos/static/src/js/sale_order_button.js @@ -0,0 +1,50 @@ +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'); + + // 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() { + var self = this; + var sale_order = []; + var stock_picking = self.env.pos.stock_picking; + var session_id = self.env.pos.pos_session.id + await this.rpc({ + model: 'sale.order.line', + method: 'search_read', + args: [], + }).then(function(result) { + result.forEach(function(object) { + if (object.state == 'sale' && session_id == object.pos_config_id[0]) { + stock_picking.forEach(function(lines) { + let plan_arr = null; + plan_arr = lines.move_ids_without_package.flat(1) + plan_arr.forEach(function(lines) { + if (object.id == lines.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..ce6d3f10b --- /dev/null +++ b/click_and_collect_pos/static/src/js/website_sale_cart.js @@ -0,0 +1,53 @@ +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) { + 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) { + ev.preventDefault(); + $(ev.currentTarget).closest('tr').find('.js_quantity').val(0).trigger('change'); + + }, + _onClickPosConfig: function(ev) { + 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 @@ + + + + +
+