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

(cherry picked from commit fdd9e6cc3c)
This commit is contained in:
GangaManoj
2021-09-27 22:14:16 +05:30
committed by mergify-bot
parent 46c0e349f6
commit 7c114c0bc5

View File

@@ -180,7 +180,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: