fix: set value for asset owner company field

(cherry picked from commit a24f1d056b)
This commit is contained in:
khushi8112
2025-08-26 12:35:37 +05:30
committed by Mergify
parent bd40106c7d
commit 94cd4549c6

View File

@@ -322,6 +322,9 @@ class Asset(AccountsController):
finance_books = get_item_details(self.item_code, self.asset_category, self.gross_purchase_amount) finance_books = get_item_details(self.item_code, self.asset_category, self.gross_purchase_amount)
self.set("finance_books", finance_books) self.set("finance_books", finance_books)
if self.asset_owner == "Company" and not self.asset_owner_company:
self.asset_owner_company = self.company
def validate_finance_books(self): def validate_finance_books(self):
if not self.calculate_depreciation or len(self.finance_books) == 1: if not self.calculate_depreciation or len(self.finance_books) == 1:
return return