diff --git a/pos_all_orders/README.rst b/pos_all_orders/README.rst new file mode 100644 index 000000000..08883c7e2 --- /dev/null +++ b/pos_all_orders/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: https://www.odoo.com/documentation/15.0/legal/licenses.html + :alt: License: AGPL-3 + +POS Order Management +======================= +Allows you to display all the old orders in Point of Sale + +Configuration +============= +* In the settings of POS there is an option POS All Order, where you can filter +the orders based on the condition. + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Affero General Public License v3.0 (AGPL v3) +(https://www.odoo.com/documentation/15.0/legal/licenses.html) + +Credits +------- +Developer: (V15)Ammu Raj @cybrosys, 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: ``__ \ No newline at end of file diff --git a/pos_all_orders/__init__.py b/pos_all_orders/__init__.py new file mode 100644 index 000000000..d9e93b8e8 --- /dev/null +++ b/pos_all_orders/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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/pos_all_orders/__manifest__.py b/pos_all_orders/__manifest__.py new file mode 100644 index 000000000..6c121dfd2 --- /dev/null +++ b/pos_all_orders/__manifest__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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': 'POS Order Management', + 'version': '15.0.1.0.0', + 'category': "Point of Sale", + 'summary': "Allows you to display all the old orders in Point of Sale", + 'description': "Detailed view of all orders with Order Reference, " + "Receipt Reference, Customer and Order Date", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': '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_all_orders/static/src/js/models.js', + 'pos_all_orders/static/src/js/all_order_button.js', + 'pos_all_orders/static/src/js/all_order_screen.js', + 'pos_all_orders/static/src/js/partner_screen.js', + 'pos_all_orders/static/src/scss/pos.scss' + ], + 'web.assets_qweb': [ + 'pos_all_orders/static/src/xml/all_order_button_templates.xml', + 'pos_all_orders/static/src/xml/all_order_screen_templates.xml', + 'pos_all_orders/static/src/xml/partner_screen_templates.xml', + ], + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/pos_all_orders/doc/RELEASE_NOTES.md b/pos_all_orders/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..322766342 --- /dev/null +++ b/pos_all_orders/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 19.07.2023 +#### Version 15.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..4b3803ce0 --- /dev/null +++ b/pos_all_orders/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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_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..90347d5f4 --- /dev/null +++ b/pos_all_orders/models/pos_session.py @@ -0,0 +1,84 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 dateutil.relativedelta import relativedelta +from odoo import api, fields, models + + +class PosSession(models.Model): + """Inherits pos session for getting the all orders""" + _inherit = 'pos.session' + + def get_all_order_config(self): + """Returns the all pos orders and orders of n days""" + return { + 'config': self.env['ir.config_parameter'].sudo().get_param( + 'pos_all_orders.pos_all_order'), + 'no_of_days': self.env['ir.config_parameter'].sudo().get_param( + 'pos_all_orders.no_of_days') + } + + def get_all_order(self, session_id): + """ + Summary: + Listing all orders in pos + Args: + session_id (int): current session id + Returns: orders based on the condition + + """ + if session_id.get('session'): + order = self.env['pos.order'].search( + [('session_id', '=', session_id.get('session'))]) + orders = [] + if session_id.get('no_of_days'): + now = fields.Datetime.now() + date_to = (now + relativedelta(days=-int(session_id.get('no_of_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 + + @api.model + def pos_order_partner(self, partner_id): + """ + Summary: + Listing orders of a partner + Args: + partner_id (int): selected partner id + Returns: orders based on the 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..93fd97113 --- /dev/null +++ b/pos_all_orders/models/res_config_settings.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 odoo import api, fields, models + + +class ResConfigSettings(models.TransientModel): + """Inherits configuration settings for set session conditions""" + _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')], string='POS all order', + help='You can set required condition for ' + 'loading the orders') + no_of_days = fields.Integer(sring="No.of Day's", default=1, + help='Specify the number of days to load all of ' + 'last n 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') + no_of_days = params('pos_all_orders.no_of_days') + res.update(pos_all_order=pos_all_order, no_of_days=no_of_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.no_of_days', self.no_of_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.png b/pos_all_orders/static/description/assets/modules/1.png new file mode 100644 index 000000000..5238bdeab 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..1ae7cfe3b 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..3c3ff1afb 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.png b/pos_all_orders/static/description/assets/modules/4.png new file mode 100644 index 000000000..3fae4631e Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/4.png differ diff --git a/pos_all_orders/static/description/assets/modules/5.gif b/pos_all_orders/static/description/assets/modules/5.gif new file mode 100644 index 000000000..2a5f8e659 Binary files /dev/null and b/pos_all_orders/static/description/assets/modules/5.gif 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..7f2815273 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/screenshots/hero.gif b/pos_all_orders/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..bb7c8af69 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/hero.gif differ diff --git a/pos_all_orders/static/description/assets/screenshots/screenshot-1.png b/pos_all_orders/static/description/assets/screenshots/screenshot-1.png new file mode 100644 index 000000000..f5b281787 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/screenshot-1.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/screenshot-2.png b/pos_all_orders/static/description/assets/screenshots/screenshot-2.png new file mode 100644 index 000000000..bbd3fd777 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/screenshot-2.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/screenshot-3.png b/pos_all_orders/static/description/assets/screenshots/screenshot-3.png new file mode 100644 index 000000000..793f93044 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/screenshot-3.png differ diff --git a/pos_all_orders/static/description/assets/screenshots/screenshot-4.png b/pos_all_orders/static/description/assets/screenshots/screenshot-4.png new file mode 100644 index 000000000..9ac45c53d Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/screenshot-4.png differ diff --git a/pos_all_orders/static/description/banner.png b/pos_all_orders/static/description/banner.png new file mode 100644 index 000000000..b90666822 Binary files /dev/null and b/pos_all_orders/static/description/banner.png 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..724703a3a 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..0b8931315 --- /dev/null +++ b/pos_all_orders/static/description/index.html @@ -0,0 +1,643 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo SH +
+
+
+ +
+ +

+ POS Order Management

+

+ Allows the detailed view of all orders in POS

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

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

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

+ Features +

+
+
+
+
+ +
+ View all orders in POS +
+
+
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Configuration Settings

+

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

+
    +
  • Load all orders of current session.

  • +
  • Load all past orders.

  • +
  • Load all orders of last n days.

  • +
+ +
+ +
+

+ All order Button

+

+ Click this button to show the order screen

+ +
+ +
+

+ Order screen +

+

+ View the all order's

+ + +
+ +
+

+ Individual order's

+

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

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

+ 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/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..29ca388cd --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_button.js @@ -0,0 +1,82 @@ +odoo.define('pos_all_orders.ALLOrderLine', function (require) { +'use strict'; + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require("@web/core/utils/hooks"); + const Registries = require('point_of_sale.Registries'); + + class ALLOrderLine extends PosComponent { + setup() { + super.setup(); + useListener('click', this.onClick); + } + /** + * The function for clicking all order button for viewing all + orders based on the condition set in configuration + */ + onClick() { + var session = this.env.pos.config.current_session_id[0] + var self = this; + this.rpc({ + model: 'pos.session', + method: 'get_all_order_config', + args: [ + [] + ], + }).then(function(result) { + if (result.config == 'current_session') { + self.rpc({ + model: 'pos.session', + method: 'get_all_order', + args: [ + [], { + session: session + } + ], + }).then(function(order) { + self.showScreen('CustomALLOrdrScreen', { + orders: order, + pos: self.env.pos + }); + }); + } else if (result.config == 'past_order') { + self.showScreen('CustomALLOrdrScreen', { + orders: self.env.pos.pos_orders, + pos: self.env.pos + }); + } else if (result.config == 'last_n') { + self.rpc({ + model: 'pos.session', + method: 'get_all_order', + args: [ + [], { + session: session, + no_of_days: result.no_of_days + } + ], + }).then(function(order) { + self.showScreen('CustomALLOrdrScreen', { + orders: order, + pos: self.env.pos + }); + }); + } else { + self.showScreen('CustomALLOrdrScreen', { + orders: self.env.pos.pos_orders, + pos: self.env.pos + }); + } + }); + } +} +ALLOrderLine.template = 'ALLOrderLine'; +ProductScreen.addControlButton({ + component: ALLOrderLine, + condition: function() { + return true; + }, + position: ['before', 'SetPricelistButton'], +}); +Registries.Component.add(ALLOrderLine); +return ALLOrderLine; +}); \ No newline at end of file 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..0fd002784 --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_screen.js @@ -0,0 +1,24 @@ +odoo.define('pos_all_orders.all_order_screen', function(require) { + 'use strict'; + const PosComponent = require('point_of_sale.PosComponent'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const Registries = require('point_of_sale.Registries'); + + class CustomALLOrdrScreen extends PosComponent { + setup() { + super.setup(); + this.state = { + order: this.props.orders + }; + } + /** + * For showing the Product screen + */ + back() { + this.showScreen('ProductScreen'); + } +}; +CustomALLOrdrScreen.template = 'CustomALLOrdrScreen'; +Registries.Component.add(CustomALLOrdrScreen); +return CustomALLOrdrScreen; +}); \ No newline at end of file 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..2b5079f67 --- /dev/null +++ b/pos_all_orders/static/src/js/models.js @@ -0,0 +1,23 @@ +odoo.define('pos_all_orders.models', function(require) { + "use strict"; + var models = require('point_of_sale.models'); + /** + * Loading the required model and fields + */ + models.load_models({ + model: 'pos.order', + fields: ['name', 'date_order', 'pos_reference', + 'partner_id', 'lines' + ], + loaded: function(self, pos_orders) { + + self.pos_orders = pos_orders; + } + }, { + model: 'pos.order.line', + fields: ['product_id', 'qty', 'price_subtotal', 'total_cost'], + loaded: function(self, pos_order_lines) { + self.pos_order_lines = pos_order_lines; + } + }); +}); \ No newline at end of file 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..9824bfcdc --- /dev/null +++ b/pos_all_orders/static/src/js/partner_screen.js @@ -0,0 +1,37 @@ +odoo.define('pos_all_orders.ClientLine', function (require) { + 'use strict'; + const ClientListScreen = require('point_of_sale.ClientLine'); + const Registries = require('point_of_sale.Registries'); + const { useListener } =require("@web/core/utils/hooks"); + var rpc = require('web.rpc'); + + const PosOrderPartnerLine = (ClientLine) => + class extends ClientLine { + /** + * Calling the function when clicking click-order button from setup() + */ + setup() { + super.setup(); + useListener('click-order', this._onClickOrder); + var self = this; + } + /** + * The button for viewing the orders of selected customer + */ + async _onClickOrder(id) { + var self = this; + var query = await rpc.query({ + model: 'pos.session', + method: 'pos_order_partner', + args: [id], + }).then(function(result) { + self.showScreen('CustomALLOrdrScreen', { + orders: result, + }); + }); + this.trigger('close-temp-screen'); + } + }; +Registries.Component.extend(ClientListScreen, PosOrderPartnerLine); +return ClientListScreen; +}); \ No newline at end of file diff --git a/pos_all_orders/static/src/scss/pos.scss b/pos_all_orders/static/src/scss/pos.scss new file mode 100644 index 000000000..8c635ab3f --- /dev/null +++ b/pos_all_orders/static/src/scss/pos.scss @@ -0,0 +1,8 @@ +.order-list{ + font-size: 16px; + width: 100%; +} +.order-list th, +.order-list td { + padding: 12px; +} \ No newline at end of file diff --git a/pos_all_orders/static/src/xml/all_order_button_templates.xml b/pos_all_orders/static/src/xml/all_order_button_templates.xml new file mode 100644 index 000000000..9752ef7bf --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_button_templates.xml @@ -0,0 +1,10 @@ + + + + +
+ + All Order's +
+
+
\ No newline at end of file diff --git a/pos_all_orders/static/src/xml/all_order_screen_templates.xml b/pos_all_orders/static/src/xml/all_order_screen_templates.xml new file mode 100644 index 000000000..2dcd54ba4 --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_screen_templates.xml @@ -0,0 +1,57 @@ + + + + +
+
+
+
+ Back +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
Order ReferenceReceipt ReferenceCustomerOrder Date
+ + + + + + + + + +
+
+
+
+
+
+
+
+
+
\ No newline at end of file diff --git a/pos_all_orders/static/src/xml/partner_screen_templates.xml b/pos_all_orders/static/src/xml/partner_screen_templates.xml new file mode 100644 index 000000000..95f716f9f --- /dev/null +++ b/pos_all_orders/static/src/xml/partner_screen_templates.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + \ No newline at end of file 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..438652311 --- /dev/null +++ b/pos_all_orders/views/res_config_settings_views.xml @@ -0,0 +1,36 @@ + + + + + + res.config.settings.view.form.inherit.pos.all.orders + + res.config.settings + + +
+

POS Order

+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file