diff --git a/pos_all_orders/README.rst b/pos_all_orders/README.rst new file mode 100644 index 000000000..5eb9f382a --- /dev/null +++ b/pos_all_orders/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 + +POS Order Management +===================== +Module allows you to display all the old orders in Point of Sale. + +Configuration +============= +* No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +GNU AFFERO GENERAL PUBLIC LICENSE, Version 3 (AGPLv3) +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Credits +------- +Developer: (V16) Megha K, + (V17)Akhil Ashok, + 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 support and more information, please visit `Our Website `__ + +Further information +=================== +HTML Description: ``__ + diff --git a/pos_all_orders/__init__.py b/pos_all_orders/__init__.py new file mode 100644 index 000000000..9deeb7135 --- /dev/null +++ b/pos_all_orders/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies (). +# Author: Akhil() +# +# 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/pos_all_orders/__manifest__.py b/pos_all_orders/__manifest__.py new file mode 100644 index 000000000..a808adc8c --- /dev/null +++ b/pos_all_orders/__manifest__.py @@ -0,0 +1,54 @@ +# -*- coding: utf-8 -*- +################################################################################### +# POS Order Management +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies (). +# Author: Akhil() +# +# 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': 'POS Order Management', + 'version': '17.0.1.0.0', + 'category': 'Point of Sale', + 'summary': "POS All Order's Management", + 'description': """Module allows you to display all the old orders in Point of Sale. + You will get the detailed view of Order Reference, Receipt Reference, Customer and Order Date.""", + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['base', 'point_of_sale'], + 'data': [ + 'views/res_config_settings_views.xml' + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'pos_all_orders/static/src/js/models.js', + 'pos_all_orders/static/src/js/all_order_button.js', + 'pos_all_orders/static/src/xml/all_order_button.xml', + 'pos_all_orders/static/src/xml/all_order_screen.xml', + 'pos_all_orders/static/src/js/all_order_screen.js', + 'pos_all_orders/static/src/xml/partner_screen.xml', + 'pos_all_orders/static/src/js/partner_screen.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'installable': True, + 'application': False, + 'auto_install': False, + 'license': 'AGPL-3', +} diff --git a/pos_all_orders/doc/RELEASE_NOTES.md b/pos_all_orders/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..b40e6a6e1 --- /dev/null +++ b/pos_all_orders/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 28.08.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for POS Order Management diff --git a/pos_all_orders/models/__init__.py b/pos_all_orders/models/__init__.py new file mode 100644 index 000000000..bd61a949a --- /dev/null +++ b/pos_all_orders/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies (). +# Author: Akhil() +# +# 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_session +from . import res_config_settings diff --git a/pos_all_orders/models/pos_session.py b/pos_all_orders/models/pos_session.py new file mode 100644 index 000000000..1df68768b --- /dev/null +++ b/pos_all_orders/models/pos_session.py @@ -0,0 +1,102 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies (). +# Author: Akhil() +# +# 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 dateutil.relativedelta import relativedelta +from odoo import api, fields, models + + +class PosSession(models.Model): + _inherit = 'pos.session' + + def _pos_ui_models_to_load(self): + result = super()._pos_ui_models_to_load() + result += { + 'pos.order', 'pos.order.line' + } + return result + + def _loader_params_pos_order(self): + return {'search_params': { + 'domain': [], + 'fields': ['name', 'date_order', 'pos_reference', + 'partner_id', 'lines']}} + + def _get_pos_ui_pos_order(self, params): + return self.env['pos.order'].search_read(**params['search_params']) + + def _loader_params_pos_order_line(self): + return {'search_params': {'domain': [], + 'fields': ['product_id', 'qty', + 'price_subtotal', 'total_cost']}} + + def _get_pos_ui_pos_order_line(self, params): + return self.env['pos.order.line'].search_read( + **params['search_params']) + + @api.model + def get_all_order_config(self): + """ + Retrieves the configuration parameters related to POS all orders. + """ + return { + 'config': self.env['ir.config_parameter'].sudo().get_param('pos_all_orders.pos_all_order'), + 'n_days': self.env['ir.config_parameter'].sudo().get_param('pos_all_orders.n_days') + } + + @api.model + def get_all_order(self, session_id): + """ + Retrieves POS orders based on the provided session ID and optional number of days. + """ + if session_id.get('session'): + order = self.env['pos.order'].search( + [('session_id', '=', session_id.get('session'))]) + orders = [] + if session_id.get('n_days'): + now = fields.Datetime.now() + date_to = (now + relativedelta(days=-int(session_id.get('n_days')))) + + order = self.env['pos.order'].search( + [('date_order', '>=', date_to)]) + for rec in order: + orders.append( + {'id': rec.id, 'name': rec.name, 'date_order': rec.date_order, + 'pos_reference': rec.pos_reference, + 'partner_id': rec.partner_id.name, + 'session': 'current_session' + }) + return orders + + def pos_order_partner(self, partner_id): + """ + Retrieves POS orders associated with a specific partner. + """ + order = self.env['pos.order'].search( + [('partner_id', '=', partner_id)]) + orders = [] + for rec in order: + orders.append( + {'id': rec.id, 'name': rec.name, 'date_order': rec.date_order, + 'pos_reference': rec.pos_reference, + 'partner_id': rec.partner_id.name, + }) + return orders diff --git a/pos_all_orders/models/res_config_settings.py b/pos_all_orders/models/res_config_settings.py new file mode 100644 index 000000000..59ab9ca4d --- /dev/null +++ b/pos_all_orders/models/res_config_settings.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +################################################################################### +# +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2024-TODAY Cybrosys Technologies (). +# Author: Akhil() +# +# 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 ResConfigSettings(models.TransientModel): + _inherit = 'res.config.settings' + + pos_all_order = fields.Selection( + [('current_session', 'Load Orders from the current session'), + ('past_order', 'Load All past Orders'), + ('last_n', 'Load all orders of last n days')],help='Select Order types') + + n_days = fields.Integer(string="No.of Day's",help='Add number of days') + + @api.model + def get_values(self): + """get values from the fields""" + res = super(ResConfigSettings, self).get_values() + params = self.env['ir.config_parameter'].sudo().get_param + pos_all_order = params('pos_all_orders.pos_all_order') + n_days = params('pos_all_orders.n_days') + res.update( + pos_all_order=pos_all_order, + n_days=n_days + ) + return res + + def set_values(self): + """Set values in the fields""" + super(ResConfigSettings, self).set_values() + self.env['ir.config_parameter'].sudo().set_param( + 'pos_all_orders.pos_all_order', self.pos_all_order) + self.env['ir.config_parameter'].sudo().set_param( + 'pos_all_orders.n_days', + self.n_days) diff --git a/pos_all_orders/static/description/assets/icons/check.png b/pos_all_orders/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/check.png differ diff --git a/pos_all_orders/static/description/assets/icons/chevron.png b/pos_all_orders/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/chevron.png differ diff --git a/pos_all_orders/static/description/assets/icons/cogs.png b/pos_all_orders/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/cogs.png differ diff --git a/pos_all_orders/static/description/assets/icons/consultation.png b/pos_all_orders/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/consultation.png differ diff --git a/pos_all_orders/static/description/assets/icons/ecom-black.png b/pos_all_orders/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/ecom-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/education-black.png b/pos_all_orders/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/education-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/hotel-black.png b/pos_all_orders/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/hotel-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/license.png b/pos_all_orders/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/license.png differ diff --git a/pos_all_orders/static/description/assets/icons/lifebuoy.png b/pos_all_orders/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/lifebuoy.png differ diff --git a/pos_all_orders/static/description/assets/icons/manufacturing-black.png b/pos_all_orders/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/manufacturing-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/pos-black.png b/pos_all_orders/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/pos-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/puzzle.png b/pos_all_orders/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/puzzle.png differ diff --git a/pos_all_orders/static/description/assets/icons/restaurant-black.png b/pos_all_orders/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/restaurant-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/service-black.png b/pos_all_orders/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/service-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/trading-black.png b/pos_all_orders/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/trading-black.png differ diff --git a/pos_all_orders/static/description/assets/icons/training.png b/pos_all_orders/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/training.png differ diff --git a/pos_all_orders/static/description/assets/icons/update.png b/pos_all_orders/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/update.png differ diff --git a/pos_all_orders/static/description/assets/icons/user.png b/pos_all_orders/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/user.png differ diff --git a/pos_all_orders/static/description/assets/icons/wrench.png b/pos_all_orders/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/pos_all_orders/static/description/assets/icons/wrench.png differ diff --git a/pos_all_orders/static/description/assets/misc/categories.png b/pos_all_orders/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/categories.png differ diff --git a/pos_all_orders/static/description/assets/misc/check-box.png b/pos_all_orders/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/check-box.png differ diff --git a/pos_all_orders/static/description/assets/misc/compass.png b/pos_all_orders/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/compass.png differ diff --git a/pos_all_orders/static/description/assets/misc/corporate.png b/pos_all_orders/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/corporate.png differ diff --git a/pos_all_orders/static/description/assets/misc/customer-support.png b/pos_all_orders/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/customer-support.png differ diff --git a/pos_all_orders/static/description/assets/misc/cybrosys-logo.png b/pos_all_orders/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/cybrosys-logo.png differ diff --git a/pos_all_orders/static/description/assets/misc/features.png b/pos_all_orders/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/features.png differ diff --git a/pos_all_orders/static/description/assets/misc/logo.png b/pos_all_orders/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/logo.png differ diff --git a/pos_all_orders/static/description/assets/misc/pictures.png b/pos_all_orders/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/pictures.png differ diff --git a/pos_all_orders/static/description/assets/misc/pie-chart.png b/pos_all_orders/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/pie-chart.png differ diff --git a/pos_all_orders/static/description/assets/misc/right-arrow.png b/pos_all_orders/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/right-arrow.png differ diff --git a/pos_all_orders/static/description/assets/misc/star.png b/pos_all_orders/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/star.png differ diff --git a/pos_all_orders/static/description/assets/misc/support.png b/pos_all_orders/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/support.png differ diff --git a/pos_all_orders/static/description/assets/misc/whatsapp.png b/pos_all_orders/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/pos_all_orders/static/description/assets/misc/whatsapp.png differ diff --git a/pos_all_orders/static/description/assets/modules/1.gif b/pos_all_orders/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/1.gif differ diff --git a/pos_all_orders/static/description/assets/modules/1.png b/pos_all_orders/static/description/assets/modules/1.png new file mode 100644 index 000000000..d0f36b007 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/1.png differ diff --git a/pos_all_orders/static/description/assets/modules/2.png b/pos_all_orders/static/description/assets/modules/2.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/2.png differ diff --git a/pos_all_orders/static/description/assets/modules/3.png b/pos_all_orders/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/3.png differ diff --git a/pos_all_orders/static/description/assets/modules/4.jpg b/pos_all_orders/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/4.jpg differ diff --git a/pos_all_orders/static/description/assets/modules/5.jpg b/pos_all_orders/static/description/assets/modules/5.jpg new file mode 100644 index 000000000..5141a7802 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/5.jpg differ diff --git a/pos_all_orders/static/description/assets/modules/6.png b/pos_all_orders/static/description/assets/modules/6.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/6.png differ diff --git a/pos_all_orders/static/description/assets/modules/l2.png b/pos_all_orders/static/description/assets/modules/l2.png new file mode 100644 index 000000000..f40a0756d Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/l2.png differ diff --git a/pos_all_orders/static/description/assets/modules/l3.png b/pos_all_orders/static/description/assets/modules/l3.png new file mode 100644 index 000000000..5738a486e Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/l3.png differ diff --git a/pos_all_orders/static/description/assets/modules/l4.png b/pos_all_orders/static/description/assets/modules/l4.png new file mode 100644 index 000000000..8d99e8c68 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/l4.png differ diff --git a/pos_all_orders/static/description/assets/modules/l5.png b/pos_all_orders/static/description/assets/modules/l5.png new file mode 100644 index 000000000..3415917c2 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/l5.png differ diff --git a/pos_all_orders/static/description/assets/modules/l6.png b/pos_all_orders/static/description/assets/modules/l6.png new file mode 100644 index 000000000..c7ea331ee Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/l6.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/1.png b/pos_all_orders/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..953a888bb Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/1.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/2.png b/pos_all_orders/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..78f47a577 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/2.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/3.png b/pos_all_orders/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..7978cd4a4 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/3.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/4.png b/pos_all_orders/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..75728c622 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/4.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/hero.gif b/pos_all_orders/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..bc704fd78 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/hero.gif differ diff --git a/pos_all_orders/static/description/banner.jpg b/pos_all_orders/static/description/banner.jpg new file mode 100644 index 000000000..7f605613d Binary files /dev/null and b/pos_all_orders/static/description/banner.jpg differ diff --git a/pos_all_orders/static/description/icon.png b/pos_all_orders/static/description/icon.png new file mode 100644 index 000000000..e8746d891 Binary files /dev/null and b/pos_all_orders/static/description/icon.png differ diff --git a/pos_all_orders/static/description/index.html b/pos_all_orders/static/description/index.html new file mode 100644 index 000000000..d79f3b51d --- /dev/null +++ b/pos_all_orders/static/description/index.html @@ -0,0 +1,632 @@ + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ POS All Orders

+

+ POS Order Management +

+
+ +
+
+
+
+
+

+ Key Highlights +

+
+
+
+
+
+ +
+
+

+ Module allows you to display all the old orders in Point of Sale. +

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

+ Click this button to show the order screen.

+
+
+
+
+
+
+ +
+
+

+ View the all order's.

+
+
+
+
+
+
+ +
+
+

+ User can view the orders associated with individual customers also.

+
+
+
+
+
+
+ +
+
+

+ In the configuration we can set the pos orders views.

+
+
+
+
+
+
+
    +
  • + Odoo POS All Orders List Module allows you to display all the old orders in Point of Sale. +
  • +
  • + Using this module you will get the detailed view of Order Reference, Receipt Reference, Customer and Order Date. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:20th Aug 2024 +
+

+ Initial commit for POS Order Management

+
+
+
+
+
+
+
+

+ 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 +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/pos_all_orders/static/src/js/all_order_button.js b/pos_all_orders/static/src/js/all_order_button.js new file mode 100644 index 000000000..350d032aa --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_button.js @@ -0,0 +1,60 @@ +/** @odoo-module **/ +/* + * This file is used to register the a new button to see all orders data. + */ +import { Component } from "@odoo/owl"; +import { useService } from "@web/core/utils/hooks"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; + +class AllOrdersButton extends Component { +static template = 'pos_all_orders.AllOrders'; + setup() { + this.orm = useService("orm"); + this.pos = usePos(); + } + async onClick() { + var session = this.pos.pos_session.id + var self = this; + await this.orm.call( + "pos.session", "get_all_order_config", [], {} + ).then(function(result){ + if ( result.config == 'current_session'){ + self.orm.call( + "pos.session", "get_all_order", [{session:session}], {} + ).then(function(order){ + self.pos.showScreen('CustomALLOrdrScreen', { + orders: order, + pos: self.env.pos + }); + }); + } + else if (result.config == 'past_order'){ + self.pos.showScreen('CustomALLOrdrScreen', { + orders: self.pos.pos_orders, + pos: self.env.pos + }); + } + else if (result.config == 'last_n'){ + self.orm.call( + "pos.session", "get_all_order", [{session: session, n_days: result.n_days}], {} + ).then(function(order){ + self.pos.showScreen('CustomALLOrdrScreen', { + orders: order, + pos: self.env.pos + }); + }); + } + else{ + self.pos.showScreen('CustomALLOrdrScreen', { + orders: self.pos.pos_orders, + pos: self.env.pos + }); + } + }); + } +} +ProductScreen.addControlButton({ + component: AllOrdersButton, + condition: () => true +}) diff --git a/pos_all_orders/static/src/js/all_order_screen.js b/pos_all_orders/static/src/js/all_order_screen.js new file mode 100644 index 000000000..fa2110961 --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_screen.js @@ -0,0 +1,27 @@ +/** @odoo-module **/ +/* + * This file is used to register a new screen for All orders. + */ +import { Component } from "@odoo/owl"; +import { registry } from "@web/core/registry"; +import { TicketScreen } from "@point_of_sale/app/screens/ticket_screen/ticket_screen"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { useService } from "@web/core/utils/hooks"; +import { useState } from "@odoo/owl"; + +class CustomALLOrdrScreen extends Component { + static template = "pos_all_orders.CustomALLOrdrScreen"; + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.state = useState({ + order: this.props.orders + }); + } + back() { + // on clicking the back button it will redirected Product screen + this.pos.showScreen('ProductScreen'); + } +} +registry.category("pos_screens").add("CustomALLOrdrScreen", CustomALLOrdrScreen); diff --git a/pos_all_orders/static/src/js/models.js b/pos_all_orders/static/src/js/models.js new file mode 100644 index 000000000..2e7f4a6c0 --- /dev/null +++ b/pos_all_orders/static/src/js/models.js @@ -0,0 +1,13 @@ +/** @odoo-module */ +import { PosStore } from "@point_of_sale/app/store/pos_store"; +import { patch } from "@web/core/utils/patch"; + + +patch(PosStore.prototype, { + // @Override + async _processData(loadedData) { + await super._processData(...arguments); + this.pos_orders = loadedData['pos.order']; + this.pos_order_lines = loadedData['pos.order.line']; + }, +}); diff --git a/pos_all_orders/static/src/js/partner_screen.js b/pos_all_orders/static/src/js/partner_screen.js new file mode 100644 index 000000000..95717540f --- /dev/null +++ b/pos_all_orders/static/src/js/partner_screen.js @@ -0,0 +1,24 @@ +/** @odoo-module **/ +import { PartnerLine } from "@point_of_sale/app/screens/partner_list/partner_line/partner_line"; +import { patch } from "@web/core/utils/patch"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; + +patch(PartnerLine.prototype, { + setup() { + super.setup(...arguments); + this.pos = usePos(); + }, + _onClickOrder(id) { + var self = this; + var order = this.pos.pos_orders; + var orders = []; + for (let i = 0; i < order.length; i++) { + if (order[i].partner_id[0] == id) { + orders.push(order[i]); + } + } + this.pos.showScreen('CustomALLOrdrScreen', { + orders: orders, + }); + } +}); diff --git a/pos_all_orders/static/src/xml/all_order_button.xml b/pos_all_orders/static/src/xml/all_order_button.xml new file mode 100644 index 000000000..b5698bad1 --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_button.xml @@ -0,0 +1,13 @@ + + + + +
+ + All Order's +
+
+
+ + diff --git a/pos_all_orders/static/src/xml/all_order_screen.xml b/pos_all_orders/static/src/xml/all_order_screen.xml new file mode 100644 index 000000000..3a88aaf0d --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_screen.xml @@ -0,0 +1,57 @@ + + + +
+
+
+
+ Back +
+
+
+
+
+
+
Order Reference
+
Receipt Reference
+
Customer
+
Order Date
+
+ +
+
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/pos_all_orders/static/src/xml/partner_screen.xml b/pos_all_orders/static/src/xml/partner_screen.xml new file mode 100644 index 000000000..fb220cd3c --- /dev/null +++ b/pos_all_orders/static/src/xml/partner_screen.xml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/pos_all_orders/views/res_config_settings_views.xml b/pos_all_orders/views/res_config_settings_views.xml new file mode 100644 index 000000000..ef947b1dc --- /dev/null +++ b/pos_all_orders/views/res_config_settings_views.xml @@ -0,0 +1,34 @@ + + + + + res.config.settings.view.form.inherit.pos_all_orders + res.config.settings + + + +

POS Order

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