Merge pull request #54403 from aerele/fix/support-#64052

fix(stock): ignore fetching warehouse account for asset items
This commit is contained in:
rohitwaghchaure
2026-05-15 13:15:11 +05:30
committed by GitHub
3 changed files with 149 additions and 7 deletions

View File

@@ -269,14 +269,15 @@ class StockController(AccountsController):
)
is_asset_pr = any(d.get("is_fixed_asset") for d in self.get("items"))
if (
need_inventory_map = (self.get_stock_items() or self.get("packed_items")) and (
cint(erpnext.is_perpetual_inventory_enabled(self.company))
or provisional_accounting_for_non_stock_items
or is_asset_pr
):
)
inventory_account_map = frappe._dict()
if need_inventory_map:
inventory_account_map = self.get_inventory_account_map()
if need_inventory_map or provisional_accounting_for_non_stock_items or is_asset_pr:
if self.docstatus == 1:
if not gl_entries:
gl_entries = (