refactor: use frappe._dict in importers of ItemDetailsCtx

Extend the boundary rule to callers: non-decorated code that built or
annotated with ItemDetailsCtx now uses frappe._dict directly, and drops
the now-unused import. asset_capitalization keeps ItemDetailsCtx for its
own normalize_ctx_input-decorated functions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Mihir Kandoi
2026-07-01 16:30:16 +05:30
parent 9406ec49de
commit e6f8f8f7e9
17 changed files with 40 additions and 45 deletions

View File

@@ -500,7 +500,7 @@ def get_target_item_details(item_code: str | None = None, company: str | None =
item_group_defaults = get_item_group_defaults(item.name, company)
brand_defaults = get_brand_defaults(item.name, company)
out.cost_center = get_default_cost_center(
ItemDetailsCtx({"item_code": item.name, "company": company}),
frappe._dict({"item_code": item.name, "company": company}),
item_defaults,
item_group_defaults,
brand_defaults,