Controller init args fix (#11015)
* Controller init args fix
* cleanup useless code
diff --git a/erpnext/controllers/selling_controller.py b/erpnext/controllers/selling_controller.py
index d881f18..c1028a5 100644
--- a/erpnext/controllers/selling_controller.py
+++ b/erpnext/controllers/selling_controller.py
@@ -49,7 +49,8 @@
if getattr(self, "customer", None):
from erpnext.accounts.party import _get_party_details
party_details = _get_party_details(self.customer,
- ignore_permissions=self.flags.ignore_permissions)
+ ignore_permissions=self.flags.ignore_permissions,
+ doctype=self.doctype, company=self.company)
if not self.meta.get_field("sales_team"):
party_details.pop("sales_team")