fix: add company and is_group filter to "default_gst_expense_account" search query#3784
Conversation
WalkthroughA new custom query configuration for Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
india_compliance/gst_india/client_scripts/company.js(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: ljain112
Repo: resilient-tech/india-compliance PR: 3693
File: india_compliance/gst_india/doctype/gst_invoice_management_system/gst_invoice_management_system.js:32-33
Timestamp: 2025-09-29T05:06:10.320Z
Learning: GST-related tool doctypes (like GST Invoice Management System, Purchase Reconciliation Tool, GSTR-1) use unconditional assignment of session default company in their setup() method: `frm.doc.company = frappe.defaults.get_user_default("Company");`. This is appropriate for these utility tools as they are meant to always start with the user's default company on each load, unlike regular documents that preserve saved company values.
📚 Learning: 2025-09-29T05:06:10.320Z
Learnt from: ljain112
Repo: resilient-tech/india-compliance PR: 3693
File: india_compliance/gst_india/doctype/gst_invoice_management_system/gst_invoice_management_system.js:32-33
Timestamp: 2025-09-29T05:06:10.320Z
Learning: GST-related tool doctypes (like GST Invoice Management System, Purchase Reconciliation Tool, GSTR-1) use unconditional assignment of session default company in their setup() method: `frm.doc.company = frappe.defaults.get_user_default("Company");`. This is appropriate for these utility tools as they are meant to always start with the user's default company on each load, unlike regular documents that preserve saved company values.
Applied to files:
india_compliance/gst_india/client_scripts/company.js
📚 Learning: 2025-09-24T06:52:03.847Z
Learnt from: ljain112
Repo: resilient-tech/india-compliance PR: 3691
File: india_compliance/gst_india/report/gst_balance/gst_balance.js:46-67
Timestamp: 2025-09-24T06:52:03.847Z
Learning: In India Compliance GST reports, the get_accounting_dimensions() function does not include project and cost_center by default, so these filters need to be explicitly added when required in report configurations.
Applied to files:
india_compliance/gst_india/client_scripts/company.js
📚 Learning: 2025-04-25T11:12:59.799Z
Learnt from: Ninad1306
Repo: resilient-tech/india-compliance PR: 3344
File: india_compliance/gst_india/report/gst_account_wise_summary/gst_account_wise_summary.py:18-20
Timestamp: 2025-04-25T11:12:59.799Z
Learning: In India Compliance GST reports, date_range is defined as a mandatory filter in the report configuration, making additional defensive coding for its presence unnecessary as the Frappe framework enforces required filters before calling the execute function.
Applied to files:
india_compliance/gst_india/client_scripts/company.js
📚 Learning: 2025-05-26T03:16:30.230Z
Learnt from: vorasmit
Repo: resilient-tech/india-compliance PR: 3344
File: india_compliance/gst_india/report/gst_account_wise_summary/gst_account_wise_summary.py:0-0
Timestamp: 2025-05-26T03:16:30.230Z
Learning: In GST account-wise summary reports, the filtering logic `doc.company_gstin != IfNull(doc[counterparty_gstin_field], "")` is intentionally designed to exclude internal transfers (where company GSTIN equals party GSTIN) while including transactions with unregistered parties (empty GSTIN). Internal transfers are excluded as they are only for internal reporting purposes like stock transfers between branches.
Applied to files:
india_compliance/gst_india/client_scripts/company.js
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Codacy Static Code Analysis
- GitHub Check: Mergify Merge Protections
- GitHub Check: Summary
…tfix/pr-3784 fix: add company and is_group filter to "default_gst_expense_account" search query (backport #3784)
…tfix/pr-3784 fix: add company and is_group filter to "default_gst_expense_account" search query (backport #3784)
Summary by CodeRabbit