mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-14 04:15:10 +00:00
fix: set value for asset owner company field
(cherry picked from commit a24f1d056b)
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user