fix: Replace asset.schedules with asset.get('schedules')

This commit is contained in:
GangaManoj 2021-09-27 22:14:16 +05:30
parent 796ed947ce
commit fdd9e6cc3c

View File

@ -187,7 +187,7 @@ class Asset(AccountsController):
d.precision("rate_of_depreciation"))
def make_depreciation_schedule(self, date_of_sale):
if 'Manual' not in [d.depreciation_method for d in self.finance_books] and not self.schedules:
if 'Manual' not in [d.depreciation_method for d in self.finance_books] and not self.get('schedules'):
self.schedules = []
if not self.available_for_use_date: