From 64c758d0c0d2dcc168f5eabb5e3d90f19a0e4c47 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 15:45:43 +0530 Subject: [PATCH] fix: Default sales team not getting set (#34284) fix: Default sales team not getting set (#34284) (cherry picked from commit 7d0199d743c7861e883cadd582c036cc8d9b0a62) Co-authored-by: Deepesh Garg --- erpnext/controllers/selling_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py index 590e00fb11e..1a81158b366 100644 --- a/erpnext/controllers/selling_controller.py +++ b/erpnext/controllers/selling_controller.py @@ -87,6 +87,9 @@ class SellingController(StockController): ) if not self.meta.get_field("sales_team"): party_details.pop("sales_team") + else: + self.set("sales_team", party_details.get("sales_team")) + self.update_if_missing(party_details) elif lead: