From eb638d8f3ae32ac9d3471005730300f4c5218bb1 Mon Sep 17 00:00:00 2001 From: Loic Oberle Date: Fri, 29 May 2026 10:28:51 +0200 Subject: [PATCH] refactor(sales_invoice): Replace SQL with orm in get_company_abbr (#55384) --- erpnext/accounts/doctype/sales_invoice/sales_invoice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py index 9e161e42bd1..1dd15bf5f9a 100644 --- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.py +++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.py @@ -994,7 +994,7 @@ class SalesInvoice(SellingController): return pos def get_company_abbr(self): - return frappe.db.sql("select abbr from tabCompany where name=%s", self.company)[0][0] + return frappe.db.get_value("Company", self.company, "abbr") def validate_debit_to_acc(self): if not self.debit_to: