diff --git a/advanced_pos_reports/README.rst b/advanced_pos_reports/README.rst new file mode 100644 index 000000000..83a0fb461 --- /dev/null +++ b/advanced_pos_reports/README.rst @@ -0,0 +1,48 @@ +.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Advanced POS Reports +==================== +* Generates Various Reports From POS Screen and From Reporting Menu. + +Configuration +============= +* No additional configuration required + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +Lesser General Public License, Version 3 (LGPL-3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +* Developer: (V17) Ashwin A, + (V18) Busthana Shirin +* 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/advanced_pos_reports/__init__.py b/advanced_pos_reports/__init__.py new file mode 100644 index 000000000..833f9d1f7 --- /dev/null +++ b/advanced_pos_reports/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import models +from . import report +from . import wizard diff --git a/advanced_pos_reports/__manifest__.py b/advanced_pos_reports/__manifest__.py new file mode 100644 index 000000000..12f9bc60e --- /dev/null +++ b/advanced_pos_reports/__manifest__.py @@ -0,0 +1,96 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +{ + 'name': 'Advanced POS Reports', + 'version': '18.0.1.0.0', + 'category': 'Point of Sale', + 'summary': """Generates various reports from POS screen and reporting + menu""", + 'description': """Generates various reports like, top + selling products / categories / customers report, ongoing sessions report + under reporting menu.""", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['point_of_sale'], + 'data': [ + 'security/ir.model.access.csv', + 'wizard/advanced_pos_reports_wizard.xml', + 'wizard/pos_sale_ongoing_views.xml', + 'wizard/pos_sale_top_selling_views.xml', + 'report/advanced_pos_reports.xml', + 'report/pos_ongoing_session_templates.xml', + 'report/pos_top_selling_categories_templates.xml', + 'report/pos_top_selling_customers_templates.xml', + 'report/pos_top_selling_products_templates.xml', + ], + 'assets': { + 'point_of_sale._assets_pos': [ + 'advanced_pos_reports/static/src/js/Category.js', + 'advanced_pos_reports/static/src/js/CategoryPopup.js', + 'advanced_pos_reports/static/src/js/CategoryReceipt.js', + 'advanced_pos_reports/static/src/js/CategoryReceiptPopup.js', + 'advanced_pos_reports/static/src/xml/Category_templates.xml', + 'advanced_pos_reports/static/src/xml/CategoryPopup_templates.xml', + 'advanced_pos_reports/static/src/xml/CategoryReceipt_templates.xml', + 'advanced_pos_reports/static/src/xml/CategoryReceiptPopup_templates.xml', + 'advanced_pos_reports/static/src/js/Location.js', + 'advanced_pos_reports/static/src/js/LocationPopup.js', + 'advanced_pos_reports/static/src/js/LocationReceipt.js', + 'advanced_pos_reports/static/src/js/LocationReceiptPopup.js', + 'advanced_pos_reports/static/src/xml/Location_templates.xml', + 'advanced_pos_reports/static/src/xml/LocationPopup_templates.xml', + 'advanced_pos_reports/static/src/xml/LocationReceipt_templates.xml', + 'advanced_pos_reports/static/src/xml/LocationReceiptPopup_templates.xml', + 'advanced_pos_reports/static/src/js/Order.js', + 'advanced_pos_reports/static/src/js/OrderPopup.js', + 'advanced_pos_reports/static/src/js/OrderReceipt.js', + 'advanced_pos_reports/static/src/js/OrderReceiptPopup.js', + 'advanced_pos_reports/static/src/xml/Order_templates.xml', + 'advanced_pos_reports/static/src/xml/OrderPopup_templates.xml', + 'advanced_pos_reports/static/src/xml/OrderReceipt_templates.xml', + 'advanced_pos_reports/static/src/xml/OrderReceiptPopup_templates.xml', + 'advanced_pos_reports/static/src/js/Payment.js', + 'advanced_pos_reports/static/src/js/PaymentPopup.js', + 'advanced_pos_reports/static/src/js/PaymentReceipt.js', + 'advanced_pos_reports/static/src/js/PaymentReceiptPopup.js', + 'advanced_pos_reports/static/src/xml/Payment_templates.xml', + 'advanced_pos_reports/static/src/xml/PaymentPopup_templates.xml', + 'advanced_pos_reports/static/src/xml/PaymentReceipt_templates.xml', + 'advanced_pos_reports/static/src/xml/PaymentReceiptPopup_templates.xml', + 'advanced_pos_reports/static/src/js/Product.js', + 'advanced_pos_reports/static/src/js/ProductPopup.js', + 'advanced_pos_reports/static/src/js/ProductReceipt.js', + 'advanced_pos_reports/static/src/js/ProductReceiptPopup.js', + 'advanced_pos_reports/static/src/xml/Product_templates.xml', + 'advanced_pos_reports/static/src/xml/ProductPopup_templates.xml', + 'advanced_pos_reports/static/src/xml/ProductReceipt_templates.xml', + 'advanced_pos_reports/static/src/xml/ProductReceiptPopup_templates.xml' + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/advanced_pos_reports/doc/RELEASE_NOTES.md b/advanced_pos_reports/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..751c49484 --- /dev/null +++ b/advanced_pos_reports/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 25.10.2024 +#### Version 18.0.1.0.0 +##### ADD +- Initial Commit for Advanced POS Reports diff --git a/advanced_pos_reports/models/__init__.py b/advanced_pos_reports/models/__init__.py new file mode 100644 index 000000000..d3002b916 --- /dev/null +++ b/advanced_pos_reports/models/__init__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_config +from . import pos_order +from . import pos_payment diff --git a/advanced_pos_reports/models/pos_config.py b/advanced_pos_reports/models/pos_config.py new file mode 100644 index 000000000..9c49b0792 --- /dev/null +++ b/advanced_pos_reports/models/pos_config.py @@ -0,0 +1,70 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, models + + +class PosConfig(models.Model): + """Inheriting pos config to get location summary""" + _inherit = 'pos.config' + + def get_location_summary(self, location_id): + """Function to get location details""" + location_quant = self.env['stock.quant'].search( + [('location_id', '=', int(location_id))]) + location_summary = [] + for quant in location_quant.filtered( + lambda x: x.product_id.available_in_pos): + location_summary.append({ + 'product_id': quant.product_id.id, + 'product': quant.product_id.name, + 'quantity': quant.available_quantity, + }) + return location_summary + + +class PosSession(models.Model): + """Inheriting pos config to get location summary""" + _inherit = 'pos.session' + + @api.model + def _load_pos_data_models(self, config_id): + data = super()._load_pos_data_models(config_id) + data += ['stock.location'] + return data + + +class StockLocation(models.Model): + """Inheriting pos config to get location summary""" + _inherit = 'stock.location' + + @api.model + def _load_pos_data_fields(self, config_id): + return ['id', 'name'] + + def _load_pos_data(self, data): + fields = self._load_pos_data_fields(data['pos.config']['data'][0]['id']) + domain = [('usage', '=', 'internal')] + return { + 'data': self.search_read(domain, fields, + load=False) if domain is not False else [], + 'fields': fields, + } diff --git a/advanced_pos_reports/models/pos_order.py b/advanced_pos_reports/models/pos_order.py new file mode 100644 index 000000000..c94e3889b --- /dev/null +++ b/advanced_pos_reports/models/pos_order.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class PosOrder(models.Model): + """Get details from pos order""" + _inherit = 'pos.order' + + def get_category_summary(self, order_ids): + """Function to get category details""" + categories = [] + if order_ids: + self.env.cr.execute("""SELECT category.name,category.id, sum(price_subtotal_incl) as amount, sum(qty) as qty + FROM pos_order_line AS line + INNER JOIN product_product AS product ON line.product_id = product.id + INNER JOIN product_template AS template ON product.product_tmpl_id = template.id + INNER JOIN pos_category_product_template_rel as categ ON product.product_tmpl_id = categ.product_template_id + INNER JOIN pos_category AS category ON categ.pos_category_id = category.id WHERE line.order_id IN %s GROUP BY category.name,category.id """, + (tuple(order_ids),)) + categories = self.env.cr.dictfetchall() + return categories + + def get_product_summary(self, order_ids): + """Function to get product details""" + product_summary = [] + if order_ids: + self.env.cr.execute(""" + SELECT product.id, template.name, product.default_code as code, + sum(qty) as qty + FROM product_product AS product, + pos_order_line AS line, product_template AS template + WHERE product.id = line.product_id AND + template.id = product.product_tmpl_id + AND line.order_id IN %s + GROUP BY product.id, template.name, template.default_code + """, (tuple(order_ids),)) + product_summary = self.env.cr.dictfetchall() + return product_summary + + def get_order_summary(self, order_ids): + """Function to get order details""" + orders = self.env["pos.order"].browse(order_ids) + order_summary = [] + for order in orders: + order_summary.append( + {'order_name': order.name, + 'state': dict(self._fields['state'].selection).get( + order.state), + 'date_order': order.date_order.date(), + 'amount_total': order.amount_total, + 'id': order.id}) + return order_summary diff --git a/advanced_pos_reports/models/pos_payment.py b/advanced_pos_reports/models/pos_payment.py new file mode 100644 index 000000000..6b26a7b2a --- /dev/null +++ b/advanced_pos_reports/models/pos_payment.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import models + + +class PosPayment(models.Model): + """Get payment details of pos session""" + _inherit = 'pos.payment' + + def get_payment_summary(self, order_ids): + """Function to get payment details""" + payments_summary = [] + if order_ids: + self.env.cr.execute(""" + SELECT method.name,method.id, sum(amount) total + FROM pos_payment AS payment, + pos_payment_method AS method + WHERE payment.payment_method_id = method.id + AND payment.id IN %s + GROUP BY method.name,method.id + """, (tuple(order_ids),)) + payments_summary = self.env.cr.dictfetchall() + return payments_summary diff --git a/advanced_pos_reports/report/__init__.py b/advanced_pos_reports/report/__init__.py new file mode 100644 index 000000000..ad979135b --- /dev/null +++ b/advanced_pos_reports/report/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_ongoing_session_report +from . import pos_top_selling_categories_report +from . import pos_top_selling_customers_report +from . import pos_top_selling_products_report diff --git a/advanced_pos_reports/report/advanced_pos_reports.xml b/advanced_pos_reports/report/advanced_pos_reports.xml new file mode 100644 index 000000000..7c81d8a74 --- /dev/null +++ b/advanced_pos_reports/report/advanced_pos_reports.xml @@ -0,0 +1,31 @@ + + + + + Ongoing Sessions + report.advanced_pos_reports.report_pos_ongoing_session + qweb-pdf + advanced_pos_reports.report_pos_ongoing_session + + + + Top Selling Products Report + report.advanced_pos_reports.report_pos_top_selling_products + qweb-pdf + advanced_pos_reports.report_pos_top_selling_products + + + + Top Selling Categories Report + report.advanced_pos_reports.report_pos_top_selling_categories + qweb-pdf + advanced_pos_reports.report_pos_top_selling_categories + + + + Top Selling Customers Report + report.advanced_pos_reports.report_pos_top_selling_customers + qweb-pdf + advanced_pos_reports.report_pos_top_selling_customers + + diff --git a/advanced_pos_reports/report/pos_ongoing_session_report.py b/advanced_pos_reports/report/pos_ongoing_session_report.py new file mode 100644 index 000000000..ec494f9e5 --- /dev/null +++ b/advanced_pos_reports/report/pos_ongoing_session_report.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ReportPosOngoingSession(models.AbstractModel): + """Generate ongoing session report of pos""" + _name = 'report.advanced_pos_reports.report_pos_ongoing_session' + _description = "Ongoing POS Session Report" + + def get_ongoing_sessions_details(self, session_ids=False): + """Function to get ongoing session details""" + if session_ids: + sessions = self.env['pos.session'].search( + [('state', '=', 'opened'), + ('id', 'in', session_ids)]) + amount_total_without_tax = 0 + amount_total_tax = 0 + amount_total_return = 0 + orders = [] + for session in sessions: + for order in session.order_ids.filtered( + lambda x: x.state in ['paid', 'done', 'invoiced']): + orders.append(order.id) + currency = order.currency_id + amount_tax = currency.round(sum( + order._amount_line_tax(line, order.fiscal_position_id) + for line in order.lines)) + amount_untaxed = currency.round( + sum(line.price_subtotal for line in order.lines)) + amount_return = sum( + payment.amount < 0 and payment.amount or 0 for payment + in + order.payment_ids) + amount_total_without_tax += amount_untaxed + amount_total_tax += amount_tax + amount_total_return += amount_return + order_ids = self.env["pos.order"].browse(orders) + user_currency = self.env.company.currency_id + total = 0.0 + for order in order_ids: + if user_currency != order.pricelist_id.currency_id: + total += order.pricelist_id.currency_id._convert( + order.amount_total, user_currency, order.company_id, + order.date_order or fields.Date.today()) + else: + total += order.amount_total + categories = [] + if order_ids: + self.env.cr.execute(""" + SELECT category.name, sum(price_subtotal_incl) as amount + FROM pos_order_line AS line + INNER JOIN product_product AS product ON line.product_id = product.id + INNER JOIN product_template AS template ON product.product_tmpl_id = template.id + INNER JOIN pos_category_product_template_rel as categ ON product.product_tmpl_id = categ.product_template_id + INNER JOIN pos_category AS category ON categ.pos_category_id = category.id + WHERE line.order_id IN %s GROUP BY category.name """, (tuple(order_ids.ids),)) + categories = self.env.cr.dictfetchall() + + payment_ids = self.env["pos.payment"].search( + [('pos_order_id', 'in', order_ids.ids)]).ids + if payment_ids: + self.env.cr.execute(""" + SELECT method.name, sum(amount) total + FROM pos_payment AS payment, + pos_payment_method AS method + WHERE payment.payment_method_id = method.id + AND payment.id IN %s + GROUP BY method.name + """, (tuple(payment_ids),)) + payments = self.env.cr.dictfetchall() + else: + payments = [] + return { + 'sessions': sessions, + 'categories': categories, + 'today': fields.Datetime.now(), + 'total_paid': user_currency.round(total), + 'amount_total_without_tax': amount_total_without_tax, + 'amount_total_tax': amount_total_tax, + 'amount_return': amount_total_return, + 'amount_total': total, + 'payments': payments + } + + @api.model + def _get_report_values(self, docids, data=None): + """Get ongoing session report values""" + data = dict(data or {}) + data.update(self.get_ongoing_sessions_details(data['session_ids'])) + return data diff --git a/advanced_pos_reports/report/pos_ongoing_session_templates.xml b/advanced_pos_reports/report/pos_ongoing_session_templates.xml new file mode 100644 index 000000000..9197da795 --- /dev/null +++ b/advanced_pos_reports/report/pos_ongoing_session_templates.xml @@ -0,0 +1,134 @@ + + + + + diff --git a/advanced_pos_reports/report/pos_top_selling_categories_report.py b/advanced_pos_reports/report/pos_top_selling_categories_report.py new file mode 100644 index 000000000..99d22ae9c --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_categories_report.py @@ -0,0 +1,69 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ReportPosTopSellingCategories(models.AbstractModel): + """Generate top_selling categories report""" + _name = 'report.advanced_pos_reports.report_pos_top_selling_categories' + _description = "Report for Top Selling POS Categories" + + def get_top_selling_categories_details(self, no_of_categories=None, + start_date=False, end_date=False): + """Get top_selling categories details""" + order_ids = self.env["pos.order"].search( + [('date_order', '>=', start_date), + ('date_order', '<=', end_date), + ('state', 'in', ['paid', 'done', 'invoiced'])]) + if order_ids: + query = """ + SELECT category.name, sum(price_subtotal_incl) as amount + FROM pos_order_line AS line + INNER JOIN product_product AS product ON line.product_id = product.id + INNER JOIN product_template AS template ON product.product_tmpl_id = template.id + INNER JOIN pos_category_product_template_rel as categ ON product.product_tmpl_id = categ.product_template_id + INNER JOIN pos_category AS category ON categ.pos_category_id = category.id WHERE line.order_id IN %s GROUP BY category.name ORDER BY amount DESC + """ + + if no_of_categories > 0: + query += " LIMIT %s" + self.env.cr.execute(query, + (tuple(order_ids.ids), no_of_categories)) + else: + self.env.cr.execute(query, (tuple(order_ids.ids),)) + categories = self.env.cr.dictfetchall() + return { + 'categories': categories or [], + 'today': fields.Datetime.now(), + 'start_date': start_date, + 'end_date': end_date + } + + @api.model + def _get_report_values(self, docids, data=None): + """Get report values""" + data = dict(data or {}) + data.update( + self.get_top_selling_categories_details(data['no_of_categories'], + data['start_date'], + data['end_date'])) + return data diff --git a/advanced_pos_reports/report/pos_top_selling_categories_templates.xml b/advanced_pos_reports/report/pos_top_selling_categories_templates.xml new file mode 100644 index 000000000..87017afdc --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_categories_templates.xml @@ -0,0 +1,65 @@ + + + + + diff --git a/advanced_pos_reports/report/pos_top_selling_customers_report.py b/advanced_pos_reports/report/pos_top_selling_customers_report.py new file mode 100644 index 000000000..eef636392 --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_customers_report.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ReportPosTopSellingCustomers(models.AbstractModel): + """Generate top_selling customers report of pos""" + _name = 'report.advanced_pos_reports.report_pos_top_selling_customers' + _description = "Report for Top Selling POS Customers" + + def get_top_selling_customers_details(self, no_of_customers=None, + start_date=False, end_date=False): + """Get top_selling customers details""" + order_ids = self.env["pos.order"].search([ + ('date_order', '>=', start_date), + ('date_order', '<=', end_date), + ('state', 'in', ['paid', 'done', 'invoiced'])]) + if order_ids: + query = """ + SELECT partner.id, partner.name, + sum(amount_total) as amount FROM pos_order, + res_partner AS partner + WHERE partner.id= pos_order.partner_id AND + pos_order.id IN %s GROUP BY partner.id, partner.name + ORDER BY amount DESC + """ + if no_of_customers > 0: + query += " LIMIT %s" + self.env.cr.execute(query, + (tuple(order_ids.ids), no_of_customers)) + else: + self.env.cr.execute(query, (tuple(order_ids.ids),)) + customers = self.env.cr.dictfetchall() + return { + 'customers': customers or [], + 'today': fields.Datetime.now(), + 'start_date': start_date, + 'end_date': end_date + } + + @api.model + def _get_report_values(self, docids, data=None): + """Get report values""" + data = dict(data or {}) + data.update(self.get_top_selling_customers_details( + data['no_of_customers'], data['start_date'], data['end_date'])) + return data diff --git a/advanced_pos_reports/report/pos_top_selling_customers_templates.xml b/advanced_pos_reports/report/pos_top_selling_customers_templates.xml new file mode 100644 index 000000000..679f58676 --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_customers_templates.xml @@ -0,0 +1,64 @@ + + + + + diff --git a/advanced_pos_reports/report/pos_top_selling_products_report.py b/advanced_pos_reports/report/pos_top_selling_products_report.py new file mode 100644 index 000000000..ee5ff22d5 --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_products_report.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import api, fields, models + + +class ReportPosTopSellingProducts(models.AbstractModel): + """Generate top_selling products from pos""" + _name = 'report.advanced_pos_reports.report_pos_top_selling_products' + _description = "Report for POS Top Selling Products" + + def get_top_selling_products_details(self, + no_of_products=None, + start_date=False, end_date=False): + """Get top_selling products details""" + order_ids = self.env["pos.order"].search( + [('date_order', '>=', start_date), + ('date_order', '<=', end_date), + ('state', 'in', ['paid', 'done', 'invoiced'])]) + + if order_ids: + query = """ + SELECT product.id, template.name, uom.name AS uom, + product.default_code as code, sum(qty) as qty, + sum(line.price_subtotal_incl) as total FROM + product_product AS product, pos_order_line AS line, + product_template AS template , uom_uom AS uom WHERE + product.id = line.product_id AND + template.id = product.product_tmpl_id AND + uom.id = template.uom_id AND line.order_id IN %s + GROUP BY product.id, template.name, + template.default_code, uom.name ORDER BY qty DESC + """ + if no_of_products > 0: + query += " LIMIT %s" + self.env.cr.execute(query, + (tuple(order_ids.ids), no_of_products)) + else: + self.env.cr.execute(query, (tuple(order_ids.ids),)) + + product_summary = self.env.cr.dictfetchall() + + return { + 'products': product_summary, + 'today': fields.Datetime.now(), + 'start_date': start_date, + 'end_date': end_date + } + + @api.model + def _get_report_values(self, docids, data=None): + """Get report values""" + data = dict(data or {}) + data.update( + self.get_top_selling_products_details(data['no_of_products'], + data['start_date'], + data['end_date'])) + return data diff --git a/advanced_pos_reports/report/pos_top_selling_products_templates.xml b/advanced_pos_reports/report/pos_top_selling_products_templates.xml new file mode 100644 index 000000000..42ca7e92d --- /dev/null +++ b/advanced_pos_reports/report/pos_top_selling_products_templates.xml @@ -0,0 +1,71 @@ + + + + + diff --git a/advanced_pos_reports/security/ir.model.access.csv b/advanced_pos_reports/security/ir.model.access.csv new file mode 100644 index 000000000..85e937656 --- /dev/null +++ b/advanced_pos_reports/security/ir.model.access.csv @@ -0,0 +1,3 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_pos_sale_top_selling_user,access.pos.sale.top.selling.user,model_pos_sale_top_selling,point_of_sale.group_pos_manager,1,1,1,0 +access_pos_sale_ongoing_user,access.pos.sale.ongoing.user,model_pos_sale_ongoing,point_of_sale.group_pos_manager,1,1,1,0 diff --git a/advanced_pos_reports/static/description/assets/icons/arrows-repeat.svg b/advanced_pos_reports/static/description/assets/icons/arrows-repeat.svg new file mode 100755 index 000000000..1d7efabc5 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-1.png b/advanced_pos_reports/static/description/assets/icons/banner-1.png new file mode 100755 index 000000000..c180db172 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/banner-1.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/banner-2.svg b/advanced_pos_reports/static/description/assets/icons/banner-2.svg new file mode 100755 index 000000000..e606d97d9 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-bg.png b/advanced_pos_reports/static/description/assets/icons/banner-bg.png new file mode 100755 index 000000000..a8238d3c0 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/banner-bg.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/banner-bg.svg b/advanced_pos_reports/static/description/assets/icons/banner-bg.svg new file mode 100755 index 000000000..b1378103e --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-call.svg b/advanced_pos_reports/static/description/assets/icons/banner-call.svg new file mode 100755 index 000000000..96c687e81 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-mail.svg b/advanced_pos_reports/static/description/assets/icons/banner-mail.svg new file mode 100755 index 000000000..cbf0d158d --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-pattern.svg b/advanced_pos_reports/static/description/assets/icons/banner-pattern.svg new file mode 100755 index 000000000..9c1c7e101 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/banner-promo.svg b/advanced_pos_reports/static/description/assets/icons/banner-promo.svg new file mode 100755 index 000000000..d52791b11 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/brand-pair.svg b/advanced_pos_reports/static/description/assets/icons/brand-pair.svg new file mode 100755 index 000000000..d8db7fc1e --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/check.png b/advanced_pos_reports/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/check.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/chevron.png b/advanced_pos_reports/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/chevron.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/close-icon.svg b/advanced_pos_reports/static/description/assets/icons/close-icon.svg new file mode 100755 index 000000000..df8cce37a --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/cogs.png b/advanced_pos_reports/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/cogs.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/collabarate-icon.svg b/advanced_pos_reports/static/description/assets/icons/collabarate-icon.svg new file mode 100755 index 000000000..dd4e10518 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/advanced_pos_reports/static/description/assets/icons/consultation.png b/advanced_pos_reports/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/consultation.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/cybro-logo.png b/advanced_pos_reports/static/description/assets/icons/cybro-logo.png new file mode 100755 index 000000000..ff4b78220 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/cybro-logo.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/down.svg b/advanced_pos_reports/static/description/assets/icons/down.svg new file mode 100755 index 000000000..f21c36271 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/advanced_pos_reports/static/description/assets/icons/ecom-black.png b/advanced_pos_reports/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/ecom-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/education-black.png b/advanced_pos_reports/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/education-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/faq.png b/advanced_pos_reports/static/description/assets/icons/faq.png new file mode 100755 index 000000000..4250b5b81 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/faq.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/feature-icon.svg b/advanced_pos_reports/static/description/assets/icons/feature-icon.svg new file mode 100755 index 000000000..fa0ea6850 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/feature.png b/advanced_pos_reports/static/description/assets/icons/feature.png new file mode 100755 index 000000000..ac7a785c0 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/feature.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/gear.svg b/advanced_pos_reports/static/description/assets/icons/gear.svg new file mode 100755 index 000000000..0cc66b6ea --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/hero.gif b/advanced_pos_reports/static/description/assets/icons/hero.gif new file mode 100755 index 000000000..380654dfe Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/hero.gif differ diff --git a/advanced_pos_reports/static/description/assets/icons/hire-odoo.svg b/advanced_pos_reports/static/description/assets/icons/hire-odoo.svg new file mode 100755 index 000000000..e1ac089b0 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/hotel-black.png b/advanced_pos_reports/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/hotel-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/license.png b/advanced_pos_reports/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/license.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/life-ring-icon.svg b/advanced_pos_reports/static/description/assets/icons/life-ring-icon.svg new file mode 100755 index 000000000..3ae6e1d89 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/lifebuoy.png b/advanced_pos_reports/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/lifebuoy.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/mail.svg b/advanced_pos_reports/static/description/assets/icons/mail.svg new file mode 100755 index 000000000..1eedde695 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + diff --git a/advanced_pos_reports/static/description/assets/icons/manufacturing-black.png b/advanced_pos_reports/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/manufacturing-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/notes.png b/advanced_pos_reports/static/description/assets/icons/notes.png new file mode 100755 index 000000000..ee5e95404 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/notes.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/notification icon.svg b/advanced_pos_reports/static/description/assets/icons/notification icon.svg new file mode 100755 index 000000000..053189973 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/odoo-consultancy.svg b/advanced_pos_reports/static/description/assets/icons/odoo-consultancy.svg new file mode 100755 index 000000000..e05f65bde --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/odoo-licencing.svg b/advanced_pos_reports/static/description/assets/icons/odoo-licencing.svg new file mode 100755 index 000000000..2606c88b0 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/advanced_pos_reports/static/description/assets/icons/odoo-logo.png b/advanced_pos_reports/static/description/assets/icons/odoo-logo.png new file mode 100755 index 000000000..0e4d0eb5a Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/odoo-logo.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/patter.svg b/advanced_pos_reports/static/description/assets/icons/patter.svg new file mode 100755 index 000000000..25c9c0a8f --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/pattern1.png b/advanced_pos_reports/static/description/assets/icons/pattern1.png new file mode 100755 index 000000000..09ab0fb2d Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/pattern1.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/pos-black.png b/advanced_pos_reports/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/pos-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/puzzle-piece-icon.svg b/advanced_pos_reports/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100755 index 000000000..3e9ad9373 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/puzzle.png b/advanced_pos_reports/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/puzzle.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/replace-icon.svg b/advanced_pos_reports/static/description/assets/icons/replace-icon.svg new file mode 100755 index 000000000..d0e3a7af1 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/restaurant-black.png b/advanced_pos_reports/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/restaurant-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/screenshot-main.png b/advanced_pos_reports/static/description/assets/icons/screenshot-main.png new file mode 100755 index 000000000..575f8e676 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/screenshot-main.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/screenshot.png b/advanced_pos_reports/static/description/assets/icons/screenshot.png new file mode 100755 index 000000000..cef272529 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/screenshot.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/service-black.png b/advanced_pos_reports/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/service-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/skype-fill.svg b/advanced_pos_reports/static/description/assets/icons/skype-fill.svg new file mode 100755 index 000000000..c17423639 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/skype.png b/advanced_pos_reports/static/description/assets/icons/skype.png new file mode 100755 index 000000000..51b409fb3 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/skype.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/skype.svg b/advanced_pos_reports/static/description/assets/icons/skype.svg new file mode 100755 index 000000000..df3dad39b --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/advanced_pos_reports/static/description/assets/icons/star-1.svg b/advanced_pos_reports/static/description/assets/icons/star-1.svg new file mode 100755 index 000000000..7e55ab162 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/star-2.svg b/advanced_pos_reports/static/description/assets/icons/star-2.svg new file mode 100755 index 000000000..5ae9f507a --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/support.png b/advanced_pos_reports/static/description/assets/icons/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/support.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/test-1 - Copy.png b/advanced_pos_reports/static/description/assets/icons/test-1 - Copy.png new file mode 100755 index 000000000..f6a902663 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/test-1 - Copy.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/test-1.png b/advanced_pos_reports/static/description/assets/icons/test-1.png new file mode 100755 index 000000000..0908add2b Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/test-1.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/test-2.png b/advanced_pos_reports/static/description/assets/icons/test-2.png new file mode 100755 index 000000000..4671fe91e Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/test-2.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/trading-black.png b/advanced_pos_reports/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/trading-black.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/training.png b/advanced_pos_reports/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/training.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/translate.svg b/advanced_pos_reports/static/description/assets/icons/translate.svg new file mode 100755 index 000000000..af9c8a1aa --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/update.png b/advanced_pos_reports/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/update.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/user.png b/advanced_pos_reports/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/user.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/video.png b/advanced_pos_reports/static/description/assets/icons/video.png new file mode 100755 index 000000000..576705b17 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/video.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/whatsapp.png b/advanced_pos_reports/static/description/assets/icons/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/whatsapp.png differ diff --git a/advanced_pos_reports/static/description/assets/icons/wrench-icon.svg b/advanced_pos_reports/static/description/assets/icons/wrench-icon.svg new file mode 100755 index 000000000..174b5a465 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/icons/wrench.png b/advanced_pos_reports/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/icons/wrench.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/Cybrosys R.png b/advanced_pos_reports/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/Cybrosys R.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/categories.png b/advanced_pos_reports/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/categories.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/check-box.png b/advanced_pos_reports/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/check-box.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/compass.png b/advanced_pos_reports/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/compass.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/corporate.png b/advanced_pos_reports/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/corporate.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/customer-support.png b/advanced_pos_reports/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/customer-support.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/cybrosys-logo.png b/advanced_pos_reports/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/cybrosys-logo.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/email.svg b/advanced_pos_reports/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/features.png b/advanced_pos_reports/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/features.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/logo.png b/advanced_pos_reports/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/logo.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/phone.svg b/advanced_pos_reports/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/advanced_pos_reports/static/description/assets/misc/pictures.png b/advanced_pos_reports/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/pictures.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/pie-chart.png b/advanced_pos_reports/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/pie-chart.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/right-arrow.png b/advanced_pos_reports/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/right-arrow.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/star (1) 2.svg b/advanced_pos_reports/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/star.png b/advanced_pos_reports/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/star.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/support (1) 1.svg b/advanced_pos_reports/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/support-email.svg b/advanced_pos_reports/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/support.png b/advanced_pos_reports/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/support.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/tick-mark.svg b/advanced_pos_reports/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/whatsapp 1.svg b/advanced_pos_reports/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/misc/whatsapp.png b/advanced_pos_reports/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/misc/whatsapp.png differ diff --git a/advanced_pos_reports/static/description/assets/misc/whatsapp.svg b/advanced_pos_reports/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/advanced_pos_reports/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/advanced_pos_reports/static/description/assets/modules/1.gif b/advanced_pos_reports/static/description/assets/modules/1.gif new file mode 100755 index 000000000..ae3a880a2 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/1.gif differ diff --git a/advanced_pos_reports/static/description/assets/modules/2.gif b/advanced_pos_reports/static/description/assets/modules/2.gif new file mode 100755 index 000000000..d19e2b352 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/2.gif differ diff --git a/advanced_pos_reports/static/description/assets/modules/3.png b/advanced_pos_reports/static/description/assets/modules/3.png new file mode 100755 index 000000000..8513873ea Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/3.png differ diff --git a/advanced_pos_reports/static/description/assets/modules/4.png b/advanced_pos_reports/static/description/assets/modules/4.png new file mode 100755 index 000000000..3bedf7981 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/4.png differ diff --git a/advanced_pos_reports/static/description/assets/modules/5.png b/advanced_pos_reports/static/description/assets/modules/5.png new file mode 100755 index 000000000..0e311ca87 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/5.png differ diff --git a/advanced_pos_reports/static/description/assets/modules/6.jpg b/advanced_pos_reports/static/description/assets/modules/6.jpg new file mode 100755 index 000000000..67c7f7062 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/modules/6.jpg differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/categ1.png b/advanced_pos_reports/static/description/assets/screenshots/categ1.png new file mode 100644 index 000000000..68cb95caa Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/categ1.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/categ2.png b/advanced_pos_reports/static/description/assets/screenshots/categ2.png new file mode 100644 index 000000000..4b4c105ef Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/categ2.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/categ3.png b/advanced_pos_reports/static/description/assets/screenshots/categ3.png new file mode 100644 index 000000000..9521c2156 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/categ3.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/categ4.png b/advanced_pos_reports/static/description/assets/screenshots/categ4.png new file mode 100644 index 000000000..d230f7a3b Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/categ4.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/categ5.png b/advanced_pos_reports/static/description/assets/screenshots/categ5.png new file mode 100644 index 000000000..968ea78a6 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/categ5.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/hero.gif b/advanced_pos_reports/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9130d4ef6 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/hero.gif differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/hero.png b/advanced_pos_reports/static/description/assets/screenshots/hero.png new file mode 100644 index 000000000..0d2314779 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/hero.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos1.png b/advanced_pos_reports/static/description/assets/screenshots/pos1.png new file mode 100644 index 000000000..1619d5abb Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos1.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos10.png b/advanced_pos_reports/static/description/assets/screenshots/pos10.png new file mode 100644 index 000000000..518278563 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos10.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos11.png b/advanced_pos_reports/static/description/assets/screenshots/pos11.png new file mode 100644 index 000000000..ab443322b Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos11.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos12.png b/advanced_pos_reports/static/description/assets/screenshots/pos12.png new file mode 100644 index 000000000..5b4c8f825 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos12.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos13.png b/advanced_pos_reports/static/description/assets/screenshots/pos13.png new file mode 100644 index 000000000..e59ea9d87 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos13.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos14.png b/advanced_pos_reports/static/description/assets/screenshots/pos14.png new file mode 100644 index 000000000..6629af5cd Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos14.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos15.png b/advanced_pos_reports/static/description/assets/screenshots/pos15.png new file mode 100644 index 000000000..027b31161 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos15.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos16.png b/advanced_pos_reports/static/description/assets/screenshots/pos16.png new file mode 100644 index 000000000..02a5617b9 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos16.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos17.png b/advanced_pos_reports/static/description/assets/screenshots/pos17.png new file mode 100644 index 000000000..2a5c6f530 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos17.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos18.png b/advanced_pos_reports/static/description/assets/screenshots/pos18.png new file mode 100644 index 000000000..36aebb242 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos18.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos19.png b/advanced_pos_reports/static/description/assets/screenshots/pos19.png new file mode 100644 index 000000000..35a47a31b Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos19.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos2.png b/advanced_pos_reports/static/description/assets/screenshots/pos2.png new file mode 100644 index 000000000..ec8a5ee7c Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos2.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos20.png b/advanced_pos_reports/static/description/assets/screenshots/pos20.png new file mode 100644 index 000000000..ecdb6d328 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos20.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos21.png b/advanced_pos_reports/static/description/assets/screenshots/pos21.png new file mode 100644 index 000000000..28737b1bb Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos21.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos22.png b/advanced_pos_reports/static/description/assets/screenshots/pos22.png new file mode 100644 index 000000000..c7a583a3f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos22.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos23.png b/advanced_pos_reports/static/description/assets/screenshots/pos23.png new file mode 100644 index 000000000..6e9f0cd78 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos23.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos24.png b/advanced_pos_reports/static/description/assets/screenshots/pos24.png new file mode 100644 index 000000000..dff17a76c Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos24.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos25.png b/advanced_pos_reports/static/description/assets/screenshots/pos25.png new file mode 100644 index 000000000..7e4ec6808 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos25.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos26.png b/advanced_pos_reports/static/description/assets/screenshots/pos26.png new file mode 100644 index 000000000..3f742220f Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos26.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos27.png b/advanced_pos_reports/static/description/assets/screenshots/pos27.png new file mode 100644 index 000000000..4d10c8011 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos27.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos3.png b/advanced_pos_reports/static/description/assets/screenshots/pos3.png new file mode 100644 index 000000000..f8601eb13 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos3.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos4.png b/advanced_pos_reports/static/description/assets/screenshots/pos4.png new file mode 100644 index 000000000..60e87beff Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos4.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos5.png b/advanced_pos_reports/static/description/assets/screenshots/pos5.png new file mode 100644 index 000000000..22f6d2013 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos5.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos6.png b/advanced_pos_reports/static/description/assets/screenshots/pos6.png new file mode 100644 index 000000000..6ca8bcf73 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos6.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos7.png b/advanced_pos_reports/static/description/assets/screenshots/pos7.png new file mode 100644 index 000000000..687d4d91d Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos7.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos8.png b/advanced_pos_reports/static/description/assets/screenshots/pos8.png new file mode 100644 index 000000000..399efe9b8 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos8.png differ diff --git a/advanced_pos_reports/static/description/assets/screenshots/pos9.png b/advanced_pos_reports/static/description/assets/screenshots/pos9.png new file mode 100644 index 000000000..e60f18808 Binary files /dev/null and b/advanced_pos_reports/static/description/assets/screenshots/pos9.png differ diff --git a/advanced_pos_reports/static/description/banner.jpg b/advanced_pos_reports/static/description/banner.jpg new file mode 100644 index 000000000..fc53e7fe2 Binary files /dev/null and b/advanced_pos_reports/static/description/banner.jpg differ diff --git a/advanced_pos_reports/static/description/icon.png b/advanced_pos_reports/static/description/icon.png new file mode 100644 index 000000000..98ba9382e Binary files /dev/null and b/advanced_pos_reports/static/description/icon.png differ diff --git a/advanced_pos_reports/static/description/index.html b/advanced_pos_reports/static/description/index.html new file mode 100644 index 000000000..2d1b635bb --- /dev/null +++ b/advanced_pos_reports/static/description/index.html @@ -0,0 +1,1572 @@ + + + + + + Advanced POS Reports + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+
+

+ A Module for Printing Various POS Reports. +

+

Advanced POS Reports +

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

Key + Highlights

+
+
+
+
+ +
+
+ Top selling Report +
+ +
+
+
+
+
+ +
+
+ Ongoing Session Report +
+ +
+
+
+
+
+ +
+
+ Payment Summary Report +
+ +
+
+
+
+
+ +
+
+ Order Summary Report +
+ +
+
+
+
+
+ +
+
+ Category Summary Report +
+ +
+
+
+
+
+ +
+
+ Location Summary Report +
+ +
+
+
+
+ +
+
+
+ Advanced POS Reports +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ From Point of Sale --> Reporting, user can access the custom Reports like Top Selling and Ongoing Sessions. + +

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

+ Select the "Products" option + from Top Selling field to get + Top Selling Products Report. + +

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

+ Top Selling Products Report. +

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

+ Select the "Categories" option + from Top Selling field to get + Top Selling Categories Report. +

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

+ Top Selling Categories + Report.

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

+ Select the "Customers" option + from Top Selling field to get + Top Selling Customers + Report.

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

+ Top Selling Customers + Report.

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

+ Ongoing Sessions Report.

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

+ We can see the Pdf Report of + Ongoing Sessions.

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

+ Click Payment Summary from POS + Screen.

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

+ Condition for Getting Payment + Summary Report.

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

+ Payment Summary of Selected + dates.

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

+ Payment Summary of current + session.

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

+ Click Category Summary from POS + Screen.

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

+ Condition for Getting Category + Summary Report. +

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

+ Category Summary of Selected + dates. +

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

+ Category Summary of Current + Session.

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

+ Click Product Summary from POS + Screen.

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

+ Condition for Getting Product Summary Report.

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

+ Product Summary of Selected dates.

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

+ Product Summary of Current Session.

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

+ Click Order Summary from POS Screen.

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

+ Condition for Getting Order Summary Report.

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

+ Order Summary of Selected Dates.

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

+ Order Summary of Current Session.

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

+ Click Location Summary from POS Screen.

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

+ Condition for Getting Location Summary Report.

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

+ Ongoing Session Report gives a summary of Ongoing Sessions

+
+ +
+
+
+
+
+
+ +
+

+ Top selling Products / Categories / Customers Reports

+
+
+
+
+
+
+
+ +
+

+ Payment Summary from POS Screen to get payment details of current session/ All sessions within a period

+
+ +
+
+
+
+
+
+ +
+

+ Order Summary from POS Screen to get all order details of current session/ All sessions within a period +

+
+
+
+
+
+
+ +
+

+ Category Summary from POS Screen to get category wise sale details current session/ All sessions within a period

+
+
+
+
+
+
+
+ +
+

+ Location Summary from POS Screen to get location wise details

+
+
+
+
+
+
+
+ +
+

+ Notify User On Success And + Failure Of Backup + Generation.

+
+
+
+
+
+
+ +
+
+

+ Latest Release 18.0.1.0.0 +

+ + 25th October, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + +
+

+ Related Products +

+ +
+ + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + diff --git a/advanced_pos_reports/static/src/js/Category.js b/advanced_pos_reports/static/src/js/Category.js new file mode 100644 index 000000000..dff0b64b7 --- /dev/null +++ b/advanced_pos_reports/static/src/js/Category.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { CategorySummaryPopup } from "./CategoryPopup"; + +patch(ControlButtons.prototype, { + setup() { + super.setup(); + this.pos = usePos(); + this.dialog = useService("dialog"); + }, + async onClick() { + // Show category summary popup + const { confirmed } = await this.dialog.add(CategorySummaryPopup, {}); + }, + +}); + + + diff --git a/advanced_pos_reports/static/src/js/CategoryPopup.js b/advanced_pos_reports/static/src/js/CategoryPopup.js new file mode 100644 index 000000000..fa2c3fff7 --- /dev/null +++ b/advanced_pos_reports/static/src/js/CategoryPopup.js @@ -0,0 +1,83 @@ +/** @odoo-module **/ +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +import { ConfirmationDialog, AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { CategorySummaryReceiptScreen } from "./CategoryReceiptPopup"; + + export class CategorySummaryPopup extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static components = { Dialog }; + static template = 'CategorySummaryPopup'; + static props = { + close: "Cancel", + } + setup() { + super.setup(); + this.pos = usePos(); + this.is_session = useRef("isSession") + this.date_section = useRef("dateSection") + this.dialog = useService("dialog"); + this.orm = useService("orm"); + this.state = useState({ + current_session: false, + start_date: "", + end_date: "", + }); + } + async click_is_session(){ + //Check the current session is enabled or not + var is_session = this.is_session.el; + var date_section = this.date_section.el; + if(is_session.checked){ + date_section.style.display = "none"; + } + else{ + date_section.style.display = "block"; + } + } + async confirm(event) { + // Filter category summary + var is_session = this.state.current_session; + var start_date = this.state.start_date || ''; + var end_date = this.state.end_date || ''; + var order = this.pos.get_order()['sequence_number'] + var domain = [] + if(is_session){ + domain = [['session_id', '=', this.pos.config.current_session_id.id]] + } + else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } + if (start_date > end_date) { + this.dialog.add(AlertDialog, { + title: "Error", + body: "Start Date Greater than End Date .", + }); + return; + } + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59']] + } + var orders = await this.orm.call('pos.order', 'search', [domain]) + var order_ids = [] + orders.forEach(function(value, index) { + order_ids.push(value); + }); + + var categories = await this.orm.call('pos.order','get_category_summary',[order, order_ids]); + if (categories.length != 0) { + const { confirmed } = await this.dialog.add(CategorySummaryReceiptScreen, + {categories: categories, start_date: start_date, end_date: end_date, data: this.pos} + ); + }else { + await this.dialog.add(AlertDialog, { + title: "No Data", + body: "No Data Available .", + }); + } + } + } diff --git a/advanced_pos_reports/static/src/js/CategoryReceipt.js b/advanced_pos_reports/static/src/js/CategoryReceipt.js new file mode 100644 index 000000000..d57f790f2 --- /dev/null +++ b/advanced_pos_reports/static/src/js/CategoryReceipt.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; + + + export class CategorySummaryReceipt extends Component { + // Extending Component and Adding Class CategorySummaryReceipt + static template = 'CategorySummaryReceipt'; + static props = { + data:{ type: Object }, + } + + setup() { + super.setup(); + } + } diff --git a/advanced_pos_reports/static/src/js/CategoryReceiptPopup.js b/advanced_pos_reports/static/src/js/CategoryReceiptPopup.js new file mode 100644 index 000000000..790fd7506 --- /dev/null +++ b/advanced_pos_reports/static/src/js/CategoryReceiptPopup.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { CategorySummaryReceipt } from "./CategoryReceipt"; + + + export class CategorySummaryReceiptScreen extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static template = 'CategorySummaryReceiptScreen'; + static components = { Dialog }; + static props = { + categories:{ type: Object }, + start_date:{ type: String }, + end_date:{ type: String }, + data:{ type: Object }, + close: "Cancel", + } + setup() { + super.setup(); + this.printer = useService("printer"); + } + async printSummary() { + //Method to print the receipt + await this.printer.print(CategorySummaryReceipt , {data: this.props}, + { webPrintFallback: true }); + } + } diff --git a/advanced_pos_reports/static/src/js/Location.js b/advanced_pos_reports/static/src/js/Location.js new file mode 100644 index 000000000..ac891598b --- /dev/null +++ b/advanced_pos_reports/static/src/js/Location.js @@ -0,0 +1,26 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductScreen } from "@point_of_sale/app/screens/product_screen/product_screen"; +import { useService } from "@web/core/utils/hooks"; +import { LocationSummaryPopup } from "./LocationPopup"; + +patch(ControlButtons.prototype, { +// Extending Component and Adding Class LocationSummaryButton + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.dialog = useService("dialog"); + + }, + async onClickLocation() { + // Show popup with locations + const { confirmed } = await this.dialog.add(LocationSummaryPopup, { + title: 'Location Summary', + }); + }, + +}); diff --git a/advanced_pos_reports/static/src/js/LocationPopup.js b/advanced_pos_reports/static/src/js/LocationPopup.js new file mode 100644 index 000000000..90e723231 --- /dev/null +++ b/advanced_pos_reports/static/src/js/LocationPopup.js @@ -0,0 +1,47 @@ +/** @odoo-module **/ +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; + +import { useService } from "@web/core/utils/hooks"; +import { ConfirmationDialog, AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { LocationSummaryReceiptScreen } from "./LocationReceiptPopup"; + +export class LocationSummaryPopup extends Component { +// Extending AbstractAwaitablePopup And Adding A Popup + static components = { Dialog }; + static template = 'LocationSummaryPopup'; + static props = { + title: 'Location Summary', + close: "Cancel", + } + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.dialog = useService("dialog"); + this.state = useState({ + selected_value: '' + }); + } + async confirm() { + // Get location summary + var location = this.state.selected_value; + if (location) { + var locations = await this.orm.call('pos.config','get_location_summary', [this.config_id, location]); + if (locations) { + const { confirmed } = await this.dialog.add(LocationSummaryReceiptScreen, + {title: 'Location Receipt',locations: locations, data: this.pos} + ); + } + else { + await this.dialog.add(AlertDialog, { + title: "No Data", + body: "No Data Available .", + }); + } + + } + } +} diff --git a/advanced_pos_reports/static/src/js/LocationReceipt.js b/advanced_pos_reports/static/src/js/LocationReceipt.js new file mode 100644 index 000000000..3b67aeaff --- /dev/null +++ b/advanced_pos_reports/static/src/js/LocationReceipt.js @@ -0,0 +1,16 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; + + + export class LocationSummaryReceipt extends Component{ + // Extending Component and Adding Class LocationSummaryReceipt + static template = 'LocationSummaryReceipt'; + static props = { + data:{ type: Object }, + } + + setup() { + super.setup(); + } + } diff --git a/advanced_pos_reports/static/src/js/LocationReceiptPopup.js b/advanced_pos_reports/static/src/js/LocationReceiptPopup.js new file mode 100644 index 000000000..cc596f8b1 --- /dev/null +++ b/advanced_pos_reports/static/src/js/LocationReceiptPopup.js @@ -0,0 +1,27 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Dialog } from "@web/core/dialog/dialog"; +import { Component } from "@odoo/owl"; + +import { LocationSummaryReceipt } from "./LocationReceipt"; + +export class LocationSummaryReceiptScreen extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static template = 'LocationSummaryReceiptScreen'; + static components = { Dialog }; + static props = { + title:{ type: String }, + locations:{ type: Object }, + data:{ type: Object }, + close: "Cancel", + } + setup() { + super.setup(); + this.printer = useService("printer"); + } + async printSummary() { + //Method to print the receipt + await this.printer.print(LocationSummaryReceipt , {data: this.props}, + { webPrintFallback: true }); + } + } diff --git a/advanced_pos_reports/static/src/js/Order.js b/advanced_pos_reports/static/src/js/Order.js new file mode 100644 index 000000000..cbad6bb98 --- /dev/null +++ b/advanced_pos_reports/static/src/js/Order.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { OrderSummaryPopup } from "./OrderPopup"; + +patch(ControlButtons.prototype, { +// Extending Component and Adding Class OrderSummaryButton + setup() { + super.setup(); + this.pos = usePos(); + this.dialog = useService("dialog"); + + }, + async onClickOrderSummary() { + //Show order summary popup + const { confirmed } = await this.dialog.add(OrderSummaryPopup, + { title: 'Order Summary',} + ); + }, +}); diff --git a/advanced_pos_reports/static/src/js/OrderPopup.js b/advanced_pos_reports/static/src/js/OrderPopup.js new file mode 100644 index 000000000..7fb4c8457 --- /dev/null +++ b/advanced_pos_reports/static/src/js/OrderPopup.js @@ -0,0 +1,97 @@ +/** @odoo-module **/ +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +import { ConfirmationDialog, AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { OrderSummaryReceiptScreen } from "./OrderReceiptPopup"; + + export class OrderSummaryPopup extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static components = { Dialog }; + static template = 'OrderSummaryPopup'; + static props = { + title:{ type: String} , + close: "Cancel", + } + + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.is_session = useRef("isSession"); + this.dialog = useService("dialog"); + this.date_section = useRef("dateSection"); + this.state = useState({ + current_session: false, + start_date: "", + end_date: "", + status: '' || 'draft' || 'paid' || 'done' || 'invoiced' || 'cancel', + }); + } + async click_is_session(){ + // Check if the session is enabled or not + var is_session = this.is_session.el; + var date_section = this.date_section.el; + if(is_session.checked){ + date_section.style.display = "none"; + } + else{ + date_section.style.display = "block"; + } + } + async confirm(event) { + // Get order summary + var is_session = this.state.current_session; + var start_date = this.state.start_date || ''; + var end_date = this.state.end_date || ''; + var status = this.state.status; + var self = this; + var order = this.pos.get_order()['sequence_number'] + var domain = [] + if(is_session){ + domain = [['session_id', '=', this.pos.config.current_session_id.id]] + if(status){ + domain = [['session_id', '=', this.pos.config.current_session_id.id], ['state', '=', status]] + } + } + else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } + if (start_date > end_date) { + this.dialog.add(AlertDialog, { + title: "Error", + body: "Start Date Greater than End Date .", + }); + return; + } + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59']] + if(status){ + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59'], + ['state', '=', status]] + } + } + var orders_ids = await this.orm.call('pos.order','search', [domain]); + var order_ids = [] + orders_ids.forEach(function(value, index) { + order_ids.push(value); + }); + var orders = await this.orm.call('pos.order', 'get_order_summary', [order, order_ids]); + if (orders.length != 0){ + const { confirmed } = await this.dialog.add(OrderSummaryReceiptScreen, + {orders: orders, start_date: start_date, end_date: end_date, data: this.pos} + ); + } + else { + await this.dialog.add(AlertDialog, { + title: "No Data", + body: "No Data Available .", + }); + } + + } + } diff --git a/advanced_pos_reports/static/src/js/OrderReceipt.js b/advanced_pos_reports/static/src/js/OrderReceipt.js new file mode 100644 index 000000000..f9ab02d65 --- /dev/null +++ b/advanced_pos_reports/static/src/js/OrderReceipt.js @@ -0,0 +1,15 @@ +/** @odoo-module */ +import { Component } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; + + + export class OrderSummaryReceipt extends Component { + // Extending Component and Adding Class OrderSummaryReceipt + static template = 'OrderSummaryReceipt'; + static props = { + data:{ type: Object }, + } + setup() { + super.setup(); + } + } diff --git a/advanced_pos_reports/static/src/js/OrderReceiptPopup.js b/advanced_pos_reports/static/src/js/OrderReceiptPopup.js new file mode 100644 index 000000000..0f3f5faa8 --- /dev/null +++ b/advanced_pos_reports/static/src/js/OrderReceiptPopup.js @@ -0,0 +1,27 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { OrderSummaryReceipt } from "./OrderReceipt"; + + export class OrderSummaryReceiptScreen extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static template = 'OrderSummaryReceiptScreen'; + static components = { Dialog }; + static props = { + start_date:{ type: String }, + end_date:{ type: String }, + orders:{ type: Object }, + data:{ type: Object }, + close: "Cancel", + } + setup() { + super.setup(); + this.printer = useService("printer"); + } + async printSummary() { + await this.printer.print(OrderSummaryReceipt , {data: this.props}, + { webPrintFallback: true }); + + } + } diff --git a/advanced_pos_reports/static/src/js/Payment.js b/advanced_pos_reports/static/src/js/Payment.js new file mode 100644 index 000000000..de55da733 --- /dev/null +++ b/advanced_pos_reports/static/src/js/Payment.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { PaymentSummaryPopup } from "./PaymentPopup"; + +patch(ControlButtons.prototype, { +// Extending Component and Adding Class CategorySummaryButton + setup() { + super.setup(); + this.pos = usePos(); + this.dialog = useService("dialog"); + + }, + async onClickPaymentSummary() { + //Show payment summary popup + const { confirmed } = await this.dialog.add(PaymentSummaryPopup, + { title: 'Payment Summary',} + ); + }, +}); diff --git a/advanced_pos_reports/static/src/js/PaymentPopup.js b/advanced_pos_reports/static/src/js/PaymentPopup.js new file mode 100644 index 000000000..a123d4390 --- /dev/null +++ b/advanced_pos_reports/static/src/js/PaymentPopup.js @@ -0,0 +1,98 @@ +/** @odoo-module **/ +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +import { ConfirmationDialog, AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { PaymentSummaryReceiptScreen } from "./PaymentReceiptPopup"; + + export class PaymentSummaryPopup extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static components = { Dialog }; + static template = 'PaymentSummaryPopup'; + static props = { + title:{ type: String} , + close: "Cancel", + } + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.is_session = useRef("isSession") + this.dialog = useService("dialog"); + this.date_section = useRef("dateSection") + this.state = useState({ + current_session: false, + start_date: "", + end_date: "", + summary: '' || 'sales_person' || 'journal', + }); + } + async click_is_session(){ + //Check if the current session is enabled or not + var is_session = this.is_session.el; + var date_section = this.date_section.el; + if(is_session.checked){ + date_section.style.display = "none"; + } + else{ + date_section.style.display = "block"; + } + } + async confirm(event) { + // Get payment summary + var is_session = this.state.current_session; + var start_date = this.state.start_date || ''; + var end_date = this.state.end_date || ''; + var summary_type = this.state.summary; + var order = this.pos.get_order()['sequence_number'] + var is_user = false; + if(summary_type === 'sales_person'){ + is_user = true + } + var domain = [] + if(is_session){ + domain = [['session_id', '=', this.pos.config.current_session_id.id]] + if(summary_type == 'sales_person'){ + domain = [['session_id', '=', this.pos.config.current_session_id.id], ['user_id', '=', this.pos.user.id]] + } + } + else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } + if (start_date > end_date) { + this.dialog.add(AlertDialog, { + title: "Error", + body: "Start Date Greater than End Date .", + }); + return; + } + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59']] + if(summary_type == 'sales_person'){ + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59'], + ['user_id', '=', this.pos.user.id]] + } + } + var orders = await this.orm.call('pos.order', 'search', [domain]); + var order_ids = [] + orders.forEach(function(value, index) { + order_ids.push(value); + }); + var payment_summary = await this.orm.call('pos.payment', 'get_payment_summary', [order, order_ids]); + if (payment_summary.length != 0){ + const { confirmed } = await this.dialog.add(PaymentSummaryReceiptScreen, + {payment_summary: payment_summary, start_date: start_date, end_date: end_date, is_user: is_user, data: this.pos} + ); + } + else { + await this.dialog.add(AlertDialog, { + title: "No Data", + body: "No Data Available .", + }); + } + } + } diff --git a/advanced_pos_reports/static/src/js/PaymentReceipt.js b/advanced_pos_reports/static/src/js/PaymentReceipt.js new file mode 100644 index 000000000..29427344a --- /dev/null +++ b/advanced_pos_reports/static/src/js/PaymentReceipt.js @@ -0,0 +1,16 @@ +/** @odoo-module */ +import { Component } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; + + + export class PaymentSummaryReceipt extends Component { + // Extending Component and Adding Class PaymentSummaryReceipt + static template = 'PaymentSummaryReceipt'; + static props = { + data:{ type: Object }, + } + setup() { + super.setup(); + } + + } diff --git a/advanced_pos_reports/static/src/js/PaymentReceiptPopup.js b/advanced_pos_reports/static/src/js/PaymentReceiptPopup.js new file mode 100644 index 000000000..a6455954f --- /dev/null +++ b/advanced_pos_reports/static/src/js/PaymentReceiptPopup.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { PaymentSummaryReceipt } from "./PaymentReceipt"; + + export class PaymentSummaryReceiptScreen extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static template = 'PaymentSummaryReceiptScreen'; + static components = { Dialog }; + static props = { + payment_summary:{ type: Object }, + start_date: { type: String }, + end_date: { type: String }, + is_user:{ type: Boolean }, + data:{ type: Object }, + close: "Cancel", + } + setup() { + super.setup(); + this.printer = useService("printer"); + } + async printSummary() { + //Method to print the receipt + await this.printer.print(PaymentSummaryReceipt , {data: this.props},{ webPrintFallback: true } + ); + } + } diff --git a/advanced_pos_reports/static/src/js/Product.js b/advanced_pos_reports/static/src/js/Product.js new file mode 100644 index 000000000..5eda34945 --- /dev/null +++ b/advanced_pos_reports/static/src/js/Product.js @@ -0,0 +1,23 @@ +/** @odoo-module **/ +import { Component } from "@odoo/owl"; +import { ControlButtons } from "@point_of_sale/app/screens/product_screen/control_buttons/control_buttons"; +import { patch } from "@web/core/utils/patch"; +import { useService } from "@web/core/utils/hooks"; +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { ProductSummaryPopup } from "./ProductPopup"; + +patch(ControlButtons.prototype, { +// Extending Component and Adding Class ProductSummaryButton + setup() { + super.setup(); + this.pos = usePos(); + this.dialog = useService("dialog"); + + }, + async onClickProductSummary() { + //Show payment summary popup + const { confirmed } = await this.dialog.add(ProductSummaryPopup, + { title: 'Product Summary',} + ); + }, +}); \ No newline at end of file diff --git a/advanced_pos_reports/static/src/js/ProductPopup.js b/advanced_pos_reports/static/src/js/ProductPopup.js new file mode 100644 index 000000000..febe42e82 --- /dev/null +++ b/advanced_pos_reports/static/src/js/ProductPopup.js @@ -0,0 +1,84 @@ +/** @odoo-module **/ +import { usePos } from "@point_of_sale/app/store/pos_hook"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { _t } from "@web/core/l10n/translation"; +import { useService } from "@web/core/utils/hooks"; +import { ConfirmationDialog, AlertDialog } from "@web/core/confirmation_dialog/confirmation_dialog"; +import { ProductSummaryReceiptScreen } from "./ProductReceiptPopup"; + + export class ProductSummaryPopup extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static components = { Dialog }; + static template = 'ProductSummaryPopup'; + static props = { + title:{ type: String} , + close: "Cancel", + } + setup() { + super.setup(); + this.pos = usePos(); + this.orm = useService("orm"); + this.is_session = useRef("isSession") + this.date_section = useRef("dateSection") + this.dialog = useService("dialog"); + this.state = useState({ + current_session: false, + start_date: "", + end_date: "" + }); + } + async click_is_session(){ + //Check if the current session is enabled or not + var is_session = this.is_session.el; + var date_section = this.date_section.el; + if(is_session.checked){ + date_section.style.display = "none"; + } + else{ + date_section.style.display = "block"; + } + } + async confirm(event) { + // Get product summary + var is_session = this.state.current_session; + var start_date = this.state.start_date || ''; + var end_date = this.state.end_date || ''; + var order = this.pos.get_order()['sequence_number'] + var domain = [] + if(is_session){ + domain = [['session_id', '=', this.pos.config.current_session_id.id]] + } + else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } + if (start_date > end_date) { + this.dialog.add(AlertDialog, { + title: "Error", + body: "Start Date Greater than End Date .", + }); + return; + } + domain = [['date_order', '>=', start_date + ' 00:00:00'], + ['date_order', '<=', end_date + ' 23:59:59']] + } + var orders = await this.orm.call('pos.order', 'search', [domain],); + var order_ids = [] + orders.forEach(function(value, index) { + order_ids.push(value); + }); + var products = await this.orm.call('pos.order', 'get_product_summary', [order, order_ids]); + if (products.length != 0){ + const { confirmed } = await this.dialog.add(ProductSummaryReceiptScreen, + {products: products, start_date: start_date, end_date: end_date, data: this.pos} + ); + } + else { + await this.dialog.add(AlertDialog, { + title: "No Data", + body: "No Data Available .", + }); + } + } + } diff --git a/advanced_pos_reports/static/src/js/ProductReceipt.js b/advanced_pos_reports/static/src/js/ProductReceipt.js new file mode 100644 index 000000000..3fe97075a --- /dev/null +++ b/advanced_pos_reports/static/src/js/ProductReceipt.js @@ -0,0 +1,16 @@ +/** @odoo-module */ +import { Component } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; + + + export class ProductSummaryReceipt extends Component { + // Extending Component and Adding Class CategorySummaryReceipt + static template = 'ProductSummaryReceipt'; + static props = { + data:{ type: Object }, + } + setup() { + super.setup(); + } + + } diff --git a/advanced_pos_reports/static/src/js/ProductReceiptPopup.js b/advanced_pos_reports/static/src/js/ProductReceiptPopup.js new file mode 100644 index 000000000..f1d0eff26 --- /dev/null +++ b/advanced_pos_reports/static/src/js/ProductReceiptPopup.js @@ -0,0 +1,28 @@ +/** @odoo-module **/ +import { useService } from "@web/core/utils/hooks"; +import { Component, useState, useRef } from "@odoo/owl"; +import { Dialog } from "@web/core/dialog/dialog"; +import { ProductSummaryReceipt } from "./ProductReceipt"; + + export class ProductSummaryReceiptScreen extends Component { + // Extending AbstractAwaitablePopup And Adding A Popup + static template = 'ProductSummaryReceiptScreen'; + static components = { Dialog }; + static props = { + products:{ type: Object }, + start_date: { type: String }, + end_date: { type: String }, + data:{ type: Object }, + close: "Cancel", + } + setup() { + super.setup(); + this.printer = useService("printer"); + } + async printSummary() { + //Method to print the receipt + await this.printer.print(ProductSummaryReceipt , {data: this.props}, + { webPrintFallback: true }); + } + + } diff --git a/advanced_pos_reports/static/src/xml/CategoryPopup_templates.xml b/advanced_pos_reports/static/src/xml/CategoryPopup_templates.xml new file mode 100644 index 000000000..ca44babb5 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/CategoryPopup_templates.xml @@ -0,0 +1,57 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/CategoryReceiptPopup_templates.xml b/advanced_pos_reports/static/src/xml/CategoryReceiptPopup_templates.xml new file mode 100644 index 000000000..5ce015943 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/CategoryReceiptPopup_templates.xml @@ -0,0 +1,109 @@ + + + + + +
+
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Category Summary +

+ + + + + + + + + +
Start Date:
End Date:
+ + + + + + + + + + + + + + + + + + +
+ + + + + + +
CategoryQuantityTotal
+ + + + + +
Total: + + + +
+
+
+
+ + Print Category Summary +
+
+ Cancel +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/CategoryReceipt_templates.xml b/advanced_pos_reports/static/src/xml/CategoryReceipt_templates.xml new file mode 100644 index 000000000..52811b4d3 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/CategoryReceipt_templates.xml @@ -0,0 +1,96 @@ + + + + +
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Category Summary +

+ + + + + + + + + +
Start Date:
End Date:
+ + + + + + + + + + + + + + + + + + +
+ + + + + + +
CategoryQuantityTotal
+ + + + + +
Total: + + + +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/Category_templates.xml b/advanced_pos_reports/static/src/xml/Category_templates.xml new file mode 100644 index 000000000..aed7a00ad --- /dev/null +++ b/advanced_pos_reports/static/src/xml/Category_templates.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/LocationPopup_templates.xml b/advanced_pos_reports/static/src/xml/LocationPopup_templates.xml new file mode 100644 index 000000000..a01b4e76d --- /dev/null +++ b/advanced_pos_reports/static/src/xml/LocationPopup_templates.xml @@ -0,0 +1,37 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/LocationReceiptPopup_templates.xml b/advanced_pos_reports/static/src/xml/LocationReceiptPopup_templates.xml new file mode 100644 index 000000000..7483b1a1d --- /dev/null +++ b/advanced_pos_reports/static/src/xml/LocationReceiptPopup_templates.xml @@ -0,0 +1,84 @@ + + + + + + +
+
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Location Summary +

+
+ + + + + + + + + + + + + + +
+ + + + + +
ProductQuantity
+ + + +
Total: + +
+
+
+
+
+ Print Location Summary +
+
+ Cancel +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/LocationReceipt_templates.xml b/advanced_pos_reports/static/src/xml/LocationReceipt_templates.xml new file mode 100644 index 000000000..bf5afd1ff --- /dev/null +++ b/advanced_pos_reports/static/src/xml/LocationReceipt_templates.xml @@ -0,0 +1,70 @@ + + + + +
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Location Summary +

+ + + + + + + + + + + + + + +
+ + + + + +
ProductQuantity
+ + + +
Total: + +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/Location_templates.xml b/advanced_pos_reports/static/src/xml/Location_templates.xml new file mode 100644 index 000000000..868b7cf1d --- /dev/null +++ b/advanced_pos_reports/static/src/xml/Location_templates.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/OrderPopup_templates.xml b/advanced_pos_reports/static/src/xml/OrderPopup_templates.xml new file mode 100644 index 000000000..9fcc8be0f --- /dev/null +++ b/advanced_pos_reports/static/src/xml/OrderPopup_templates.xml @@ -0,0 +1,71 @@ + + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/OrderReceiptPopup_templates.xml b/advanced_pos_reports/static/src/xml/OrderReceiptPopup_templates.xml new file mode 100644 index 000000000..1dbc6962b --- /dev/null +++ b/advanced_pos_reports/static/src/xml/OrderReceiptPopup_templates.xml @@ -0,0 +1,104 @@ + + + + + +
+
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Order Summary +

+ + + + + + + + + +
Start Date:
End Date:
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + +
Order RefStatusDateTotal
+ + + + +
+
+ +
Total: + + + +
+
+
+
+
+ Print Order Summary +
+
+ Cancel +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/OrderReceipt_templates.xml b/advanced_pos_reports/static/src/xml/OrderReceipt_templates.xml new file mode 100644 index 000000000..dbb291f78 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/OrderReceipt_templates.xml @@ -0,0 +1,91 @@ + + + + +
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Order Summary +

+ + + + + + + + + +
Start Date:
End Date:
+ + + + + + + + + + + + + + + + + + +
+ + + + + +
Order RefStatusDateTotal
+ + + + +
+
+ +
Total: + + + +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/Order_templates.xml b/advanced_pos_reports/static/src/xml/Order_templates.xml new file mode 100644 index 000000000..779047743 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/Order_templates.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/PaymentPopup_templates.xml b/advanced_pos_reports/static/src/xml/PaymentPopup_templates.xml new file mode 100644 index 000000000..a5de89a96 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/PaymentPopup_templates.xml @@ -0,0 +1,64 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/PaymentReceiptPopup_templates.xml b/advanced_pos_reports/static/src/xml/PaymentReceiptPopup_templates.xml new file mode 100644 index 000000000..4b1e8b694 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/PaymentReceiptPopup_templates.xml @@ -0,0 +1,110 @@ + + + + + +
+
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Payment Summary +

+ +
+
Salesperson:
+
+
+ + + + + + + + + +
Start Date:
End Date:
+
+ + + + + + + + + + + + + + + + + +
+
+ + + + + +
Payment MethodAmount
+ + + +
Total: + +
+
+
+
+
+ + Print Payment Summary +
+
+ Cancel +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/PaymentReceipt_templates.xml b/advanced_pos_reports/static/src/xml/PaymentReceipt_templates.xml new file mode 100644 index 000000000..9a456a6e4 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/PaymentReceipt_templates.xml @@ -0,0 +1,95 @@ + + + + +
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Payment Summary +

+ +
+
Salesperson:
+
+
+ + + + + + + + + +
Start Date:
End Date:
+ + + + + + + + + + + + + + + + + +
+
+ + + + + +
Payment MethodAmount
+ + + +
Total: + +
+ +
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/Payment_templates.xml b/advanced_pos_reports/static/src/xml/Payment_templates.xml new file mode 100644 index 000000000..5d8093b30 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/Payment_templates.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/ProductPopup_templates.xml b/advanced_pos_reports/static/src/xml/ProductPopup_templates.xml new file mode 100644 index 000000000..ecb1325d3 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/ProductPopup_templates.xml @@ -0,0 +1,57 @@ + + + + + + + + + diff --git a/advanced_pos_reports/static/src/xml/ProductReceiptPopup_templates.xml b/advanced_pos_reports/static/src/xml/ProductReceiptPopup_templates.xml new file mode 100644 index 000000000..e5cf55b9c --- /dev/null +++ b/advanced_pos_reports/static/src/xml/ProductReceiptPopup_templates.xml @@ -0,0 +1,110 @@ + + + + + +
+
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Product Summary +

+ + + + + + + + + + +
Start Date:
End Date:
+
+ + + + + + + + + + + + + + + + + + +
+ + + + + +
ProductQuantity
+ [] + + + +
Total: + +
+
+ +
+
+
+ + Print Product Summary +
+ +
+ Cancel +
+
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/ProductReceipt_templates.xml b/advanced_pos_reports/static/src/xml/ProductReceipt_templates.xml new file mode 100644 index 000000000..7c4b3f24d --- /dev/null +++ b/advanced_pos_reports/static/src/xml/ProductReceipt_templates.xml @@ -0,0 +1,92 @@ + + + + +
+
+ + +
+
+ +

+ +

+
+
+
+ +
Tel:
+
+ +
+
+ +
+
+ +
+
--------------------------------
+
Served by
+
+
+
+
+

+ Product Summary +

+ + + + + + + + + +
Start Date:
End Date:
+ + + + + + + + + + + + + + + + + + +
+ + + + + +
ProductQuantity
+ [] + + + +
Total: + +
+ +
+
+
+
diff --git a/advanced_pos_reports/static/src/xml/Product_templates.xml b/advanced_pos_reports/static/src/xml/Product_templates.xml new file mode 100644 index 000000000..fa008a768 --- /dev/null +++ b/advanced_pos_reports/static/src/xml/Product_templates.xml @@ -0,0 +1,14 @@ + + + + + + + + + diff --git a/advanced_pos_reports/wizard/__init__.py b/advanced_pos_reports/wizard/__init__.py new file mode 100644 index 000000000..06a427154 --- /dev/null +++ b/advanced_pos_reports/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from . import pos_sale_ongoing +from . import pos_sale_top_selling diff --git a/advanced_pos_reports/wizard/advanced_pos_reports_wizard.xml b/advanced_pos_reports/wizard/advanced_pos_reports_wizard.xml new file mode 100644 index 000000000..0f7211ddd --- /dev/null +++ b/advanced_pos_reports/wizard/advanced_pos_reports_wizard.xml @@ -0,0 +1,23 @@ + + + + + Top Selling + pos.sale.top.selling + form + new + + + + Ongoing Sessions Report + pos.sale.ongoing + form + new + + + + diff --git a/advanced_pos_reports/wizard/pos_sale_ongoing.py b/advanced_pos_reports/wizard/pos_sale_ongoing.py new file mode 100644 index 000000000..d4f2edbd1 --- /dev/null +++ b/advanced_pos_reports/wizard/pos_sale_ongoing.py @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models + + +class PosSaleOngoing(models.TransientModel): + """Generate wizard for generate ongoing session report""" + _name = 'pos.sale.ongoing' + _description = 'Point of Sale Ongoing Session Report' + + session_ids = fields.Many2many('pos.session', + string='POS Ongoing Sessions', + required=True, + help="Currently ongoing sessions", + domain=[('state', '=', 'opened')]) + + def action_generate_report(self): + """Function to generate ongoing session report""" + data = {'session_ids': self.session_ids.ids} + return self.env.ref( + 'advanced_pos_reports.pos_ongoing_session_report').report_action( + [], data=data) diff --git a/advanced_pos_reports/wizard/pos_sale_ongoing_views.xml b/advanced_pos_reports/wizard/pos_sale_ongoing_views.xml new file mode 100644 index 000000000..1254674db --- /dev/null +++ b/advanced_pos_reports/wizard/pos_sale_ongoing_views.xml @@ -0,0 +1,23 @@ + + + + + pos.sale.ongoing.view.form + pos.sale.ongoing + +
+ + + +
+
+
+
+
+
diff --git a/advanced_pos_reports/wizard/pos_sale_top_selling.py b/advanced_pos_reports/wizard/pos_sale_top_selling.py new file mode 100644 index 000000000..22de0d41f --- /dev/null +++ b/advanced_pos_reports/wizard/pos_sale_top_selling.py @@ -0,0 +1,72 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Cybrosys Techno Solutions() +# +# You can modify it under the terms of the GNU LESSER +# GENERAL PUBLIC LICENSE (LGPL 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 LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. +# +# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE +# (LGPL v3) along with this program. +# If not, see . +# +############################################################################# +from odoo import fields, models, _ +from odoo.exceptions import ValidationError + + +class PosSaleTopSelling(models.TransientModel): + """Get top_selling product,category,customer from pos""" + _name = 'pos.sale.top.selling' + _description = 'Point of Sale Top Selling Product/Category/Customer Report' + + start_date = fields.Datetime(string="Start Date", + required=True, + help="Starting date") + end_date = fields.Datetime(string="End Date", + required=True, + help="Ending date") + top_selling = fields.Selection( + [('products', 'Products'), ('category', 'Categories'), + ('customers', 'Customers')], + string='Top Selling', default='products', + help="Select Top selling categories, products and customers") + no_of_products = fields.Integer(string="Number of Products", + help="Number of products") + no_of_categories = fields.Integer(string="No of Categories", + help="Number of categories") + no_of_customers = fields.Integer(string="Number of Customers", + help="Number of customers") + + def action_generate_report(self): + """Generate top_selling product,category,customer report from pos""" + if self.start_date > self.end_date: + raise ValidationError(_("The End Date must be greater than the " + "Start Date")) + data = { + 'start_date': self.start_date, 'end_date': self.end_date, + 'top_selling': self.top_selling + } + if self.top_selling == 'products': + data['no_of_products'] = self.no_of_products + return self.env.ref( + 'advanced_pos_reports.pos_top_selling_products_report' + ).report_action([], data=data) + elif self.top_selling == 'category': + data['no_of_categories'] = self.no_of_categories + return self.env.ref( + 'advanced_pos_reports.pos_top_selling_category_report' + ).report_action([], data=data) + elif self.top_selling == 'customers': + data['no_of_customers'] = self.no_of_customers + return self.env.ref( + 'advanced_pos_reports.pos_top_selling_customer_report' + ).report_action([], data=data) diff --git a/advanced_pos_reports/wizard/pos_sale_top_selling_views.xml b/advanced_pos_reports/wizard/pos_sale_top_selling_views.xml new file mode 100644 index 000000000..1044d0ead --- /dev/null +++ b/advanced_pos_reports/wizard/pos_sale_top_selling_views.xml @@ -0,0 +1,31 @@ + + + + + pos.sale.top.selling.view.form + pos.sale.top.selling + +
+ + + + + + + + + + + + + +
+
+
+