From eac68eb8887692a2bf6d60168e3ab89948057a30 Mon Sep 17 00:00:00 2001 From: AjmalCybro Date: Wed, 12 Jul 2023 12:07:58 +0530 Subject: [PATCH] Jul 12 : [UPDT] Updated 'advanced_pos_reports' --- advanced_pos_reports/static/description/index.html | 2 +- .../static/src/js/Popups/CategorySummaryPopup.js | 5 +++++ .../static/src/js/Popups/OrderSummaryPopup.js | 3 +++ .../static/src/js/Popups/PaymentSummaryPopup.js | 3 +++ .../static/src/js/Popups/ProductSummaryPopup.js | 3 +++ 5 files changed, 15 insertions(+), 1 deletion(-) diff --git a/advanced_pos_reports/static/description/index.html b/advanced_pos_reports/static/description/index.html index 64da9c7ea..b681362c4 100644 --- a/advanced_pos_reports/static/description/index.html +++ b/advanced_pos_reports/static/description/index.html @@ -155,7 +155,7 @@

- Posted session report summarizes the posted sessions de + Posted session report summarizes the posted sessions details

diff --git a/advanced_pos_reports/static/src/js/Popups/CategorySummaryPopup.js b/advanced_pos_reports/static/src/js/Popups/CategorySummaryPopup.js index d152dff72..e74614e58 100644 --- a/advanced_pos_reports/static/src/js/Popups/CategorySummaryPopup.js +++ b/advanced_pos_reports/static/src/js/Popups/CategorySummaryPopup.js @@ -5,6 +5,8 @@ odoo.define('advanced_pos_reports.CategorySummaryPopup', function(require) { const AbstractAwaitablePopup = require('point_of_sale.AbstractAwaitablePopup'); const Registries = require('point_of_sale.Registries'); const { _lt } = require('@web/core/l10n/translation'); + var core = require('web.core'); + var _t = core._t; class CategorySummaryPopup extends AbstractAwaitablePopup { constructor() { @@ -34,6 +36,9 @@ odoo.define('advanced_pos_reports.CategorySummaryPopup', function(require) { domain = [['session_id', '=', this.env.pos.pos_session.id]] } else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } domain = [['date_order', '>=', start_date + ' 00:00:00'], ['date_order', '<=', end_date + ' 23:59:59']] } var orders = await this.rpc({ diff --git a/advanced_pos_reports/static/src/js/Popups/OrderSummaryPopup.js b/advanced_pos_reports/static/src/js/Popups/OrderSummaryPopup.js index 31a761b4f..3c410b325 100644 --- a/advanced_pos_reports/static/src/js/Popups/OrderSummaryPopup.js +++ b/advanced_pos_reports/static/src/js/Popups/OrderSummaryPopup.js @@ -39,6 +39,9 @@ odoo.define('advanced_pos_reports.OrderSummaryPopup', function(require) { } } else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } domain = [['date_order', '>=', start_date + ' 00:00:00'], ['date_order', '<=', end_date + ' 23:59:59']] if(status){ diff --git a/advanced_pos_reports/static/src/js/Popups/PaymentSummaryPopup.js b/advanced_pos_reports/static/src/js/Popups/PaymentSummaryPopup.js index 01a286fe5..818e605e3 100644 --- a/advanced_pos_reports/static/src/js/Popups/PaymentSummaryPopup.js +++ b/advanced_pos_reports/static/src/js/Popups/PaymentSummaryPopup.js @@ -44,6 +44,9 @@ odoo.define('advanced_pos_reports.PaymentSummaryPopup', function(require) { } } else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } domain = [['date_order', '>=', start_date + ' 00:00:00'], ['date_order', '<=', end_date + ' 23:59:59']] if(summary_type == 'sales_person'){ diff --git a/advanced_pos_reports/static/src/js/Popups/ProductSummaryPopup.js b/advanced_pos_reports/static/src/js/Popups/ProductSummaryPopup.js index 1af845d0c..041e52245 100644 --- a/advanced_pos_reports/static/src/js/Popups/ProductSummaryPopup.js +++ b/advanced_pos_reports/static/src/js/Popups/ProductSummaryPopup.js @@ -34,6 +34,9 @@ odoo.define('advanced_pos_reports.ProductSummaryPopup', function(require) { domain = [['session_id', '=', this.env.pos.pos_session.id]] } else{ + if (start_date.trim() === '' || end_date.trim() === '') { + return; + } domain = [['date_order', '>=', start_date + ' 00:00:00'], ['date_order', '<=', end_date + ' 23:59:59']] }