fix: type hint in stock

This commit is contained in:
Nishka Gosalia
2026-02-25 12:10:39 +05:30
parent 1e297a0e5f
commit dd0bcf4dbd
2 changed files with 3 additions and 3 deletions

View File

@@ -1991,7 +1991,7 @@ def get_reference_serial_and_batch_bundle(child_row):
def add_serial_batch_ledgers(
entries: list | str,
child_row: PurchaseReceiptItem | dict | str,
doc: Document,
doc: Document | str,
warehouse: str | None = None,
do_not_save: bool = False,
):

View File

@@ -56,7 +56,7 @@ def _preprocess_ctx(ctx):
@frappe.whitelist()
@erpnext.normalize_ctx_input(ItemDetailsCtx)
def get_item_details(
ctx: ItemDetailsCtx,
ctx: ItemDetailsCtx | str,
doc: Document | str | None = None,
for_validate: bool = False,
overwrite_warehouse: bool = True,
@@ -1495,7 +1495,7 @@ def get_batch_qty(batch_no: str, warehouse: str, item_code: str):
@frappe.whitelist()
@erpnext.normalize_ctx_input(ItemDetailsCtx)
def apply_price_list(ctx: ItemDetailsCtx, as_doc: bool = False, doc: Document | None = None):
def apply_price_list(ctx: ItemDetailsCtx | str, as_doc: bool = False, doc: Document | str | None = None):
"""Apply pricelist on a document-like dict object and return as
{'parent': dict, 'children': list}