From d2745f3ec907b7b7b95fc6a3d634389c0ca4fb16 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 05:32:11 +0000 Subject: [PATCH] fix(selling): enable selling_settings creation through fixtures (backport #54177) (#54215) Co-authored-by: mgicking-bmi Fix(selling): enable selling_settings creation through fixtures (#54177) --- erpnext/selling/doctype/selling_settings/selling_settings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/doctype/selling_settings/selling_settings.py b/erpnext/selling/doctype/selling_settings/selling_settings.py index c13d4ce0a6c..bf8750cc1b8 100644 --- a/erpnext/selling/doctype/selling_settings/selling_settings.py +++ b/erpnext/selling/doctype/selling_settings/selling_settings.py @@ -93,10 +93,10 @@ class SellingSettings(Document): self.validate_fallback_to_default_price_list() - if old_doc.enable_tracking_sales_commissions != self.enable_tracking_sales_commissions: + if old_doc and old_doc.enable_tracking_sales_commissions != self.enable_tracking_sales_commissions: toggle_tracking_sales_commissions_section(not self.enable_tracking_sales_commissions) - if old_doc.enable_utm != self.enable_utm: + if old_doc and old_doc.enable_utm != self.enable_utm: toggle_utm_analytics_section(not self.enable_utm) def validate_fallback_to_default_price_list(self):