From 4bb63cca105f2e9fcaffcd07bdfd7be98fb7f11a Mon Sep 17 00:00:00 2001 From: Mihir Kandoi Date: Thu, 23 Jul 2026 12:26:59 +0530 Subject: [PATCH] test: probe permlevel visibility via a value field only get_permitted_fieldnames never lists Table fields, so allowed_companies cannot be asserted through it; the write-reset assertions already cover that field. --- .../doctype/company_restriction/test_company_restriction.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/erpnext/stock/doctype/company_restriction/test_company_restriction.py b/erpnext/stock/doctype/company_restriction/test_company_restriction.py index 719860c1f0b..52c7da50101 100644 --- a/erpnext/stock/doctype/company_restriction/test_company_restriction.py +++ b/erpnext/stock/doctype/company_restriction/test_company_restriction.py @@ -103,11 +103,9 @@ class TestCompanyRestriction(ERPNextTestSuite): permitted = frappe.get_meta("Customer").get_permitted_fieldnames(user=sales_user) self.assertNotIn("restrict_to_companies", permitted) - self.assertNotIn("allowed_companies", permitted) permitted = frappe.get_meta("Customer").get_permitted_fieldnames(user=manager) self.assertIn("restrict_to_companies", permitted) - self.assertIn("allowed_companies", permitted) frappe.set_user(sales_user) self.addCleanup(frappe.set_user, "Administrator")