diff --git a/click_and_collect_pos/README.rst b/click_and_collect_pos/README.rst new file mode 100755 index 000000000..e339f8d6b --- /dev/null +++ b/click_and_collect_pos/README.rst @@ -0,0 +1,49 @@ +.. image:: https://img.shields.io/badge/license-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 configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +Developer: + (V16) Nihala M K , + (V17) Anjhana A K, +Contact: odoo@cybrosys.com + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.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..359cef697 --- /dev/null +++ b/click_and_collect_pos/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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..8f08e7717 --- /dev/null +++ b/click_and_collect_pos/__manifest__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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': '17.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 facilitates customers to conveniently order + products online and opt for a click-and-collect service, enabling them to + pick up their purchases from the nearest store.""", + 'author': "Cybrosys Techno Solutions", + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': "https://www.cybrosys.com", + 'images': ['static/description/banner.jpg'], + 'depends': [ + 'base', 'website_sale', 'point_of_sale', 'sale_management', 'stock'], + 'data': [ + 'views/cart_line_template.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_pos': [ + 'click_and_collect_pos/static/src/js/navbar.js', + 'click_and_collect_pos/static/src/xml/navbar.xml', + 'click_and_collect_pos/static/src/js/click_and_collect_screen.js', + 'click_and_collect_pos/static/src/scss/sale_order.scss', + 'click_and_collect_pos/static/src/xml/click_and_collect_screen.xml', + 'click_and_collect_pos/static/src/js/pos_store.js', + 'click_and_collect_pos/static/src/xml/chrome.xml', + ] + }, + '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..ad52dbcf2 --- /dev/null +++ b/click_and_collect_pos/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 01.02.2024 +#### Version 17.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..a92a05386 --- /dev/null +++ b/click_and_collect_pos/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 +from . import pos_session 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..922295eda --- /dev/null +++ b/click_and_collect_pos/models/pos_config.py @@ -0,0 +1,39 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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, help='Enter country') diff --git a/click_and_collect_pos/models/pos_session.py b/click_and_collect_pos/models/pos_session.py new file mode 100644 index 000000000..595056f34 --- /dev/null +++ b/click_and_collect_pos/models/pos_session.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 models + + +class PosSession(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 += ['stock.picking', 'stock.move'] + return result + + def _loader_params_stock_picking(self): + """ returning corresponding data to pos""" + data = [rec.id for rec in self.env['stock.picking'].search( + [('state', '!=', ['done', 'cancelled'])])] + + 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..4bb99d2a6 --- /dev/null +++ b/click_and_collect_pos/models/sale_order.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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', + help='count click and collect') + + @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 = [line for line in self.order_line.filtered( + lambda l: l.is_click_and_collect)] + 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..1770a3e90 --- /dev/null +++ b/click_and_collect_pos/models/stock_picking.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies() +# Author:Anjhana A K() +# 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 StockPicking(models.Model): + """to identify the click and collect transfer""" + _inherit = 'stock.picking' + + is_click_and_collect_order = fields.Boolean( + default=False, help='Whether click and collect order or not') + + @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.button_validate() + 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/Cybrosys R.png b/click_and_collect_pos/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/misc/Cybrosys R.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/email.svg b/click_and_collect_pos/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/phone.svg b/click_and_collect_pos/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + 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 (1) 2.svg b/click_and_collect_pos/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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 (1) 1.svg b/click_and_collect_pos/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/click_and_collect_pos/static/description/assets/misc/support-email.svg b/click_and_collect_pos/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + 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/tick-mark.svg b/click_and_collect_pos/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/click_and_collect_pos/static/description/assets/misc/whatsapp 1.svg b/click_and_collect_pos/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + 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/misc/whatsapp.svg b/click_and_collect_pos/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/click_and_collect_pos/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/click_and_collect_pos/static/description/assets/modules/1.png b/click_and_collect_pos/static/description/assets/modules/1.png new file mode 100644 index 000000000..ba1058c42 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/1.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/2.png b/click_and_collect_pos/static/description/assets/modules/2.png new file mode 100644 index 000000000..6949185dd Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/2.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/3.png b/click_and_collect_pos/static/description/assets/modules/3.png new file mode 100644 index 000000000..4e506f79b Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/3.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/4.png b/click_and_collect_pos/static/description/assets/modules/4.png new file mode 100644 index 000000000..e78427938 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/4.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/5.gif b/click_and_collect_pos/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/5.gif differ diff --git a/click_and_collect_pos/static/description/assets/modules/5.png b/click_and_collect_pos/static/description/assets/modules/5.png new file mode 100755 index 000000000..272ec20f9 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/5.png differ diff --git a/click_and_collect_pos/static/description/assets/modules/6.png b/click_and_collect_pos/static/description/assets/modules/6.png new file mode 100644 index 000000000..7d5c3154f Binary files /dev/null and b/click_and_collect_pos/static/description/assets/modules/6.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 100644 index 000000000..f40a0756d 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 100644 index 000000000..5738a486e 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 100644 index 000000000..8d99e8c68 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 100644 index 000000000..3415917c2 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 100644 index 000000000..c7ea331ee 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/hero.gif b/click_and_collect_pos/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..d33751f3e 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/assets/screenshots/screenshot1.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot1.png new file mode 100644 index 000000000..cf993c568 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot1.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/screenshot2.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot2.png new file mode 100644 index 000000000..db93f8741 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot2.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/screenshot3.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot3.png new file mode 100644 index 000000000..cfb59adf9 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot3.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/screenshot4.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot4.png new file mode 100644 index 000000000..403f823aa Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot4.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/screenshot5.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot5.png new file mode 100644 index 000000000..a6d1813df Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot5.png differ diff --git a/click_and_collect_pos/static/description/assets/screenshots/screenshot6.png b/click_and_collect_pos/static/description/assets/screenshots/screenshot6.png new file mode 100644 index 000000000..75a34d784 Binary files /dev/null and b/click_and_collect_pos/static/description/assets/screenshots/screenshot6.png differ diff --git a/click_and_collect_pos/static/description/banner.jpg b/click_and_collect_pos/static/description/banner.jpg new file mode 100644 index 000000000..ed4c0f158 Binary files /dev/null and b/click_and_collect_pos/static/description/banner.jpg 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..b98be4aad 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..807b47e07 --- /dev/null +++ b/click_and_collect_pos/static/description/index.html @@ -0,0 +1,776 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Click And Collect POS

+

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

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Click And Collect POS

+

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

+
+
+
+
+
+
+ +
+
+

+ Single Order from multiple shops

+

In a single + Order different products can be purchased from + different shop +

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

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

+
+
+
+
+
+
+
    +
  • + 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. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:01st February 2024 +
+

+ + Initial Commit for Click And Collect POS.

+
+
+
+
+
+ +
+
+

+ Related Products

+
+
+ +
+
+

+ Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire + Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo + Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo + Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686 +
+
+
+
+
+
+
+
+
+ + + + + + 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..e9e6d4d5a --- /dev/null +++ b/click_and_collect_pos/static/src/js/click_and_collect_screen.js @@ -0,0 +1,41 @@ +/** @odoo-module */ +import { Component} from "@odoo/owl"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { registry } from "@web/core/registry"; + // Define a new class that extends PosComponent +export class SaleOrderScreen extends Component { + + /** + * Override the setup method to perform any additional setup logic. + */ + static template = "SaleOrderScreen"; + setup() { + super.setup(); + } + back() { + this.env.services.pos.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 + var stock_picking = await jsonrpc("/web/dataset/call_kw", { + 'model': 'stock.picking', + 'method': 'action_confirmation_click', + 'args': [order_line], + kwargs: {}, + }) + if (stock_picking = true) { + ev.target.parentNode.parentNode.remove() + } + location.reload(); + } + }; + registry.category("pos_screens").add("SaleOrderScreen", SaleOrderScreen); diff --git a/click_and_collect_pos/static/src/js/navbar.js b/click_and_collect_pos/static/src/js/navbar.js new file mode 100644 index 000000000..ba6ff72b2 --- /dev/null +++ b/click_and_collect_pos/static/src/js/navbar.js @@ -0,0 +1,38 @@ +/** @odoo-module **/ +import { Navbar } from "@point_of_sale/app/navbar/navbar"; +import { jsonrpc } from "@web/core/network/rpc_service"; +import { patch } from "@web/core/utils/patch"; + +patch(Navbar.prototype, { + setup() { + super.setup(); + }, + async onClick() { + var self = this; + var sale_order = []; + var stock_picking = self.pos.stock_picking; + var session_id = self.pos.pos_session.config_id + var sale_order_line = await jsonrpc("/web/dataset/call_kw", { + model: "sale.order.line", + method: "search_read", + args: [], + kwargs: {}, + }); + sale_order_line.forEach(function (object) { + if (object.state == "sale" && session_id[0] == 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 (line) { + if (object.id == line.sale_line_id[0] && line.state != "done" ) { + sale_order.push(object); + } + }); + }); + } + }); + self.pos.showScreen("SaleOrderScreen", { + click_and_collect: sale_order, + }); + }, +}); diff --git a/click_and_collect_pos/static/src/js/pos_store.js b/click_and_collect_pos/static/src/js/pos_store.js new file mode 100644 index 000000000..dfb8a75b3 --- /dev/null +++ b/click_and_collect_pos/static/src/js/pos_store.js @@ -0,0 +1,18 @@ +/** @odoo-module */ +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { patch } from "@web/core/utils/patch"; +patch(PosStore.prototype, { + /** + *Override PosGlobalState to load fields in pos session + */ + async _processData(loadedData) { + await 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 + } + }) 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..5882c6582 --- /dev/null +++ b/click_and_collect_pos/static/src/js/website_sale_cart.js @@ -0,0 +1,50 @@ +/** @odoo-module */ +import {websiteSaleCart} from "@website_sale/js/website_sale"; +import publicWidget from "@web/legacy/js/public/public_widget"; +import { jsonrpc } from "@web/core/network/rpc_service"; + +publicWidget.registry.websiteSaleCart .include({ + events: Object.assign({}, publicWidget.Widget.prototype.events, { + 'click .clickandecollect': '_onClickClickAndCollect', + 'click .session_values': '_onClickPosConfig', + 'click .js_delete_product': '_onClickDeleteProduct', + }), + _onClickClickAndCollect(ev){ + const order_id = $(ev.target).data('id'); + const 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') + } + jsonrpc('/web/dataset/call_kw', { + model: 'sale.order.line', + method: 'write', + args: [ + [order_id], + {'is_click_and_collect': ev.currentTarget.checked,}, + ], + kwargs: {}, + }); + }, + _onClickDeleteProduct(ev) { + ev.preventDefault(); + $(ev.currentTarget).closest('.o_cart_product').find('.js_quantity').val(0).trigger('change'); + }, + _onClickPosConfig(ev) { + const closestCheck = $(ev.currentTarget.parentElement.parentElement).find('.clickandecollect'); + const order_id = closestCheck.data('id'); + const session_id = $(ev.target).val(); + var m= jsonrpc('/web/dataset/call_kw', { + model: 'sale.order.line', + method: 'write', + args: [ + [order_id], + { + 'pos_config_id': parseInt(session_id), + }, + ], + kwargs: {}, + }); + }, +}); 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..adbaa3abc --- /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/click_and_collect_screen.xml b/click_and_collect_pos/static/src/xml/click_and_collect_screen.xml new file mode 100644 index 000000000..46ddc4ec1 --- /dev/null +++ b/click_and_collect_pos/static/src/xml/click_and_collect_screen.xml @@ -0,0 +1,54 @@ + + + + +
+
+
+
+
+ +
+
+
+
+
Sale Order
+
Session
+
Customer
+
Product
+
Total
+
State
+
Validate
+
+ + +
+
+
+
+
+
+
+
+
+ Confirm
+
+
+
+
+
+
+
+
+
diff --git a/click_and_collect_pos/static/src/xml/navbar.xml b/click_and_collect_pos/static/src/xml/navbar.xml new file mode 100644 index 000000000..2bd22608c --- /dev/null +++ b/click_and_collect_pos/static/src/xml/navbar.xml @@ -0,0 +1,16 @@ + + + + + +
+