From 516b3ae1bcd9a1e1b18d4f2004a8580de3fe9e27 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Tue, 9 Feb 2021 16:47:55 +0530 Subject: [PATCH] fix: get company attribute --- erpnext/accounts/doctype/subscription/subscription.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/accounts/doctype/subscription/subscription.py b/erpnext/accounts/doctype/subscription/subscription.py index 0f1502b8ce..826044a407 100644 --- a/erpnext/accounts/doctype/subscription/subscription.py +++ b/erpnext/accounts/doctype/subscription/subscription.py @@ -245,7 +245,7 @@ class Subscription(Document): self.validate_plans_billing_cycle(self.get_billing_cycle_and_interval()) self.validate_end_date() self.validate_to_follow_calendar_months() - self.cost_center = erpnext.get_default_cost_center(self.company) + self.cost_center = erpnext.get_default_cost_center(self.get('company')) def validate_trial_period(self): """