From 8bd9784fcff8574f04b68a1c522e1d33650ade7f Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Tue, 11 Mar 2025 11:53:37 +0100 Subject: [PATCH 1/2] fix: correctly initialize domains on new sites --- erpnext/setup/install.py | 2 ++ erpnext/setup/setup_wizard/operations/install_fixtures.py | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/erpnext/setup/install.py b/erpnext/setup/install.py index 69702676e8..0b57aa072f 100644 --- a/erpnext/setup/install.py +++ b/erpnext/setup/install.py @@ -4,6 +4,7 @@ import click import frappe from frappe import _ +from frappe.core.doctype.domain_settings.domain_settings import update_domains from frappe.custom.doctype.custom_field.custom_field import create_custom_fields from frappe.desk.page.setup_wizard.setup_wizard import add_all_roles_to from frappe.modules.utils import sync_customizations_for_doctype @@ -37,6 +38,7 @@ def after_install(): hide_workspaces() update_roles() make_default_operations() + update_domains() frappe.db.commit() diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py index 23ca929e41..0442cb8cd1 100644 --- a/erpnext/setup/setup_wizard/operations/install_fixtures.py +++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py @@ -25,12 +25,6 @@ def read_lines(filename: str) -> list[str]: def install(country=None): records = [ - # domains - {"doctype": "Domain", "domain": "Accounting"}, - {"doctype": "Domain", "domain": "Manufacturing"}, - {"doctype": "Domain", "domain": "Stocks"}, - {"doctype": "Domain", "domain": "Assets"}, - {"doctype": "Domain", "domain": "Quality"}, # ensure at least an empty Address Template exists for this Country {"doctype": "Address Template", "country": country}, # item group -- GitLab From 5a30f9a0d451f9da2811427309941742aa45a3e5 Mon Sep 17 00:00:00 2001 From: Charles-Henri Decultot Date: Fri, 21 Mar 2025 14:24:59 +0100 Subject: [PATCH 2/2] fix: change property to disabled property --- erpnext/domains/stocks.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/domains/stocks.yaml b/erpnext/domains/stocks.yaml index cc26f7c872..09f3696a5e 100644 --- a/erpnext/domains/stocks.yaml +++ b/erpnext/domains/stocks.yaml @@ -25,7 +25,7 @@ restricted_fields: - default_warehouse -properties: +disabled_properties: - doctype: "Sales Invoice Item" fieldname: "conversion_factor" property: "default" -- GitLab