From 67dad765dc2add4a2d7368e5a108ffb6188c443b Mon Sep 17 00:00:00 2001 From: MochaMind Date: Mon, 11 Aug 2025 11:50:29 +0530 Subject: [PATCH] chore: release v14 (#49057) * fix: timeout while submitting purchase receipt (cherry picked from commit c433943c466f91486aba333947c05be3ccd1795c) # Conflicts: # erpnext/stock/doctype/purchase_receipt/purchase_receipt.json * chore: fix conflicts * fix: nonetype error on applying presentation_currency filter on financial statements and trial balance report (cherry picked from commit d7e22de44c23582a606144a258d82d2931c8c157) * fix(purchase invoice): filter only enabled account (cherry picked from commit c3111db6e2d9135c01f93d6f94c1c459b1ee7b37) * fix: add condition to fetch active accounts (cherry picked from commit 7c8dd86a35ee3029404943542358ec66430edec1) * chore: add back filter (cherry picked from commit 23308f6d10e1e804c969cca928ca110de03c52b2) --------- Co-authored-by: Rohit Waghchaure Co-authored-by: diptanilsaha Co-authored-by: mithili Co-authored-by: Mihir Kandoi --- .../accounts/doctype/purchase_invoice/purchase_invoice.js | 5 ++++- erpnext/accounts/report/utils.py | 2 +- erpnext/controllers/queries.py | 2 +- erpnext/stock/doctype/purchase_receipt/purchase_receipt.json | 5 +++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js index 11bfc5e8dde..c14b8528f38 100644 --- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js +++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js @@ -29,7 +29,10 @@ erpnext.accounts.PurchaseInvoice = class PurchaseInvoice extends erpnext.buying. this.frm.set_query("expense_account", "items", function () { return { query: "erpnext.controllers.queries.get_expense_account", - filters: { company: doc.company }, + filters: { + company: doc.company, + disabled: 0, + }, }; }); } diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 92c305e6cd8..337beaa701b 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -118,7 +118,7 @@ def convert_to_presentation_currency(gl_entries, currency_info, filters=None): len(account_currencies) == 1 and account_currency == presentation_currency and not exchange_gain_or_loss - ) and not filters.get("show_amount_in_company_currency"): + ) and not (filters and filters.get("show_amount_in_company_currency")): entry["debit"] = debit_in_account_currency entry["credit"] = credit_in_account_currency else: diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py index be965e41b3e..1e0e01211e6 100644 --- a/erpnext/controllers/queries.py +++ b/erpnext/controllers/queries.py @@ -646,7 +646,7 @@ def get_expense_account(doctype, txt, searchfield, start, page_len, filters): where (tabAccount.report_type = "Profit and Loss" or tabAccount.account_type in ("Expense Account", "Fixed Asset", "Temporary", "Asset Received But Not Billed", "Capital Work in Progress")) and tabAccount.is_group=0 - and tabAccount.docstatus!=2 + and tabAccount.disabled = 0 and tabAccount.{searchfield} LIKE %(txt)s {condition} {get_match_cond(doctype)}""", {"company": filters.get("company", ""), "txt": "%" + txt + "%"}, diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json index fabeb74462f..e2eec2e5085 100755 --- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json +++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.json @@ -1077,7 +1077,8 @@ "no_copy": 1, "options": "Delivery Note", "print_hide": 1, - "read_only": 1 + "read_only": 1, + "search_index": 1 }, { "fieldname": "scan_barcode", @@ -1242,7 +1243,7 @@ "idx": 261, "is_submittable": 1, "links": [], - "modified": "2024-11-13 16:55:14.129055", + "modified": "2025-08-06 16:41:02.690658", "modified_by": "Administrator", "module": "Stock", "name": "Purchase Receipt",