diff --git a/pos_all_orders/README.rst b/pos_all_orders/README.rst new file mode 100644 index 000000000..cde0991f3 --- /dev/null +++ b/pos_all_orders/README.rst @@ -0,0 +1,17 @@ +POS Exchange Order v16 +====================== +POS Exchange Order + +Installation +============ + - www.odoo.com/documentation/16.0/setup/install.html + - Install our custom addon + +Configuration +============= + + No additional configurations needed + +Credits +======= + Developer: Megha v16 @ cybrosys, Contact: odoo@cybrosys.com diff --git a/pos_all_orders/__init__.py b/pos_all_orders/__init__.py new file mode 100644 index 000000000..60abb5ea3 --- /dev/null +++ b/pos_all_orders/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +################################################################################### +# POS Product Exchange +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Megha K () +# +# 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..5531f568f --- /dev/null +++ b/pos_all_orders/__manifest__.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +################################################################################### +# POS Order Management +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Megha K () +# +# 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': '16.0.1.0.0', + 'category': "POS All Order's Management", + 'summary': "POS All Order's Management", + 'author': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'description': "POS All Order's Management", + 'depends': ['base', 'point_of_sale'], + 'images': ['static/description/banner.png'], + 'data': [ + 'views/res_config_settings.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/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', + 'pos_all_orders/static/src/scss/pos.scss' + ], + }, + '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..fcc3a4edf --- /dev/null +++ b/pos_all_orders/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module + +#### 16.11.2022 +#### Version 16.0.1.0.0 + diff --git a/pos_all_orders/models/__init__.py b/pos_all_orders/models/__init__.py new file mode 100644 index 000000000..64c4db346 --- /dev/null +++ b/pos_all_orders/models/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +################################################################################ +# POS ALL Order +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Megha K () +# +# 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 diff --git a/pos_all_orders/models/pos_session.py b/pos_all_orders/models/pos_session.py new file mode 100644 index 000000000..2aa5c49cd --- /dev/null +++ b/pos_all_orders/models/pos_session.py @@ -0,0 +1,126 @@ +# -*- coding: utf-8 -*- +################################################################################ +# POS ALL Order +# +# Cybrosys Technologies Pvt. Ltd. +# Copyright (C) 2022-TODAY Cybrosys Technologies (). +# Author: Megha K () +# +# 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 fields, models, api + + +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']) + + def get_all_order_config(self): + 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') + } + + def get_all_order(self, session_id): + 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): + 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 + + +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')]) + + n_days = fields.Integer("No.of Day's") + + @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.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..77782b189 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/hero.png b/pos_all_orders/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..38b4b48b6 Binary files /dev/null and b/pos_all_orders/static/description/assets/screenshots/hero.png 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..9e31a1a85 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..601e37e20 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..bd97fa20b 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..05878755d 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..6009346ca 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..a8365da02 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..c7f615830 --- /dev/null +++ b/pos_all_orders/static/description/index.html @@ -0,0 +1,521 @@ +
+ +
+ +
+
+ Community +
+
+
+ + + +

POS All Orders

+

POS Order Management

+ + + +
+ + +
+
+ +
+

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

Screenshots +

+
+
+
+ +
+

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.

+ +
+ +
+

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.

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

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..47f75b8e6 --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_button.js @@ -0,0 +1,72 @@ +odoo.define('pos_all_orders.ALLOrderLine', function (require) { +'use strict'; + const { Gui } = require('point_of_sale.Gui'); + const PosComponent = require('point_of_sale.PosComponent'); + const { identifyError } = require('point_of_sale.utils'); + const ProductScreen = require('point_of_sale.ProductScreen'); + const { useListener } = require("@web/core/utils/hooks"); + const Registries = require('point_of_sale.Registries'); + const PaymentScreen = require('point_of_sale.PaymentScreen'); + class ALLOrderLine extends PosComponent { + setup() { + super.setup(); + useListener('click', this.onClick); + } + 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, n_days: result.n_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 this.env.pos; + }, + }); + 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..536025c29 --- /dev/null +++ b/pos_all_orders/static/src/js/all_order_screen.js @@ -0,0 +1,31 @@ +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 { useListener } =require("@web/core/utils/hooks"); + const Registries = require('point_of_sale.Registries'); + var rpc = require('web.rpc'); + var core = require('web.core'); + var Qweb = core.qweb; + const { onMounted, onWillUnmount, useState } = owl; + + class CustomALLOrdrScreen extends PosComponent { + setup(){ + super.setup(); + + this.state = { + order: this.props.orders + }; + } + + 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..ec20ac542 --- /dev/null +++ b/pos_all_orders/static/src/js/models.js @@ -0,0 +1,15 @@ +odoo.define('product_exchange_pos_sys.models', function (require) { + "use strict"; + var { PosGlobalState, Order} = require('point_of_sale.models'); + const Registries = require('point_of_sale.Registries'); + + const PosSessionOrdersPosGlobalState = (PosGlobalState) => class PosSessionOrdersPosGlobalState extends PosGlobalState { + async _processData(loadedData) { + await super._processData(...arguments); + this.pos_orders = loadedData['pos.order']; + this.pos_order_lines = loadedData['pos.order.line']; + + } + } + Registries.Model.extend(PosGlobalState, PosSessionOrdersPosGlobalState); +}); 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..8cf736234 --- /dev/null +++ b/pos_all_orders/static/src/js/partner_screen.js @@ -0,0 +1,34 @@ +odoo.define('pos_all_orders.PartnerLine', function (require) { + 'use strict'; + + const PartnerLine = require('point_of_sale.PartnerLine'); + const Registries = require('point_of_sale.Registries'); + const { useListener } =require("@web/core/utils/hooks"); + var rpc = require('web.rpc'); + + const PosOrderPartnerLine = (PartnerLine) => + class extends PartnerLine { + setup(){ + super.setup(); + useListener('click-order', this._onClickOrder); + } + async _onClickOrder(id) { + var self = this + var order = this.env.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.showScreen('CustomALLOrdrScreen', { + orders: orders, + }); + } + + }; + + Registries.Component.extend(PartnerLine, PosOrderPartnerLine); + + return PartnerLine; +}); 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..be8e47472 --- /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; +} 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..ffbb73482 --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_button.xml @@ -0,0 +1,10 @@ + + + +
+ + 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..efda93bdd --- /dev/null +++ b/pos_all_orders/static/src/xml/all_order_screen.xml @@ -0,0 +1,56 @@ + + + +
+
+
+
+ Back +
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + +
Order ReferenceReceipt ReferenceCustomerOrder 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..ab97f7f05 --- /dev/null +++ b/pos_all_orders/static/src/xml/partner_screen.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + diff --git a/pos_all_orders/views/res_config_settings.xml b/pos_all_orders/views/res_config_settings.xml new file mode 100644 index 000000000..a178d2ac3 --- /dev/null +++ b/pos_all_orders/views/res_config_settings.xml @@ -0,0 +1,36 @@ + + + + + + pos.twilio.config.view.form + res.config.settings + + +
+

POS Order

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