From 363129bcd4d674df9762933ec2642330bc862e50 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:11:53 +0530 Subject: [PATCH] fix(workspace): enable is_query_report on purchase reports (backport #46249) (#46306) fix(workspace): enable is_query_report on purchase reports (#46249) * fix(workspace): enable is_query_report on purchase reports * fix: resolved conflict --------- Co-authored-by: venkat102 (cherry picked from commit 5513e24b001cce2e4011e711cf2474150b77e5ef) Co-authored-by: Nabin Hait --- .../accounts/workspace/payables/payables.json | 14 +++++------ erpnext/patches.txt | 1 + erpnext/patches/v15_0/update_query_report.py | 25 +++++++++++++++++++ 3 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 erpnext/patches/v15_0/update_query_report.py diff --git a/erpnext/accounts/workspace/payables/payables.json b/erpnext/accounts/workspace/payables/payables.json index f8c85648756..96c626c7291 100644 --- a/erpnext/accounts/workspace/payables/payables.json +++ b/erpnext/accounts/workspace/payables/payables.json @@ -93,7 +93,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Accounts Payable", "link_count": 0, "link_to": "Accounts Payable", @@ -103,7 +103,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Accounts Payable Summary", "link_count": 0, "link_to": "Accounts Payable Summary", @@ -113,7 +113,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Purchase Register", "link_count": 0, "link_to": "Purchase Register", @@ -123,7 +123,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Item-wise Purchase Register", "link_count": 0, "link_to": "Item-wise Purchase Register", @@ -133,7 +133,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Purchase Order Analysis", "link_count": 0, "link_to": "Purchase Order Analysis", @@ -143,7 +143,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Received Items To Be Billed", "link_count": 0, "link_to": "Received Items To Be Billed", @@ -153,7 +153,7 @@ }, { "hidden": 0, - "is_query_report": 0, + "is_query_report": 1, "label": "Supplier Ledger Summary", "link_count": 0, "link_to": "Supplier Ledger Summary", diff --git a/erpnext/patches.txt b/erpnext/patches.txt index df1b885ad18..f292abfd50a 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -395,3 +395,4 @@ erpnext.patches.v14_0.disable_add_row_in_gross_profit erpnext.patches.v15_0.set_difference_amount_in_asset_value_adjustment erpnext.patches.v14_0.update_posting_datetime erpnext.stock.doctype.stock_ledger_entry.patches.ensure_sle_indexes +erpnext.patches.v15_0.update_query_report diff --git a/erpnext/patches/v15_0/update_query_report.py b/erpnext/patches/v15_0/update_query_report.py new file mode 100644 index 00000000000..0efdf8af2c3 --- /dev/null +++ b/erpnext/patches/v15_0/update_query_report.py @@ -0,0 +1,25 @@ +import frappe + + +def execute(): + reports = [ + "Accounts Payable", + "Accounts Payable Summary", + "Purchase Register", + "Item-wise Purchase Register", + "Purchase Order Analysis", + "Received Items To Be Billed", + "Supplier Ledger Summary", + ] + frappe.db.set_value( + "Workspace Link", + { + "parent": "Payables", + "link_type": "Report", + "type": "Link", + "link_to": ["in", reports], + "is_query_report": 0, + }, + "is_query_report", + 1, + )