fix: Do not validate accounting dimensions if from repost (#20043)

* fix: Do not check for accounting dimensions in case of repost

* fix: Do not validate accounting dimensions if from repost
This commit is contained in:
Deepesh Garg
2019-12-23 17:58:44 +05:30
committed by Nabin Hait
parent 7b926f228f
commit 15c8caac57

View File

@@ -29,7 +29,6 @@ class GLEntry(Document):
self.validate_and_set_fiscal_year()
self.pl_must_have_cost_center()
self.validate_cost_center()
self.validate_dimensions_for_pl_and_bs()
if not self.flags.from_repost:
self.check_pl_account()
@@ -39,6 +38,7 @@ class GLEntry(Document):
def on_update_with_args(self, adv_adj, update_outstanding = 'Yes', from_repost=False):
if not from_repost:
self.validate_account_details(adv_adj)
self.validate_dimensions_for_pl_and_bs()
check_freezing_date(self.posting_date, adv_adj)
validate_frozen_account(self.account, adv_adj)