From 4192a0d370ef48e60342712eeda6cec83396df57 Mon Sep 17 00:00:00 2001 From: ruthra kumar Date: Tue, 21 Apr 2026 13:52:59 +0530 Subject: [PATCH] fix: incorrect type hint (cherry picked from commit 1995fcfdd81bb91a0c798befd0ae6809600379e8) # Conflicts: # erpnext/accounts/doctype/pos_invoice/pos_invoice.py # erpnext/stock/get_item_details.py --- erpnext/accounts/doctype/pos_invoice/pos_invoice.py | 8 ++++++++ erpnext/stock/get_item_details.py | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py index 503c19c7ff8..f2ca142467b 100644 --- a/erpnext/accounts/doctype/pos_invoice/pos_invoice.py +++ b/erpnext/accounts/doctype/pos_invoice/pos_invoice.py @@ -753,7 +753,11 @@ class POSInvoice(SalesInvoice): return profile @frappe.whitelist() +<<<<<<< HEAD def set_missing_values(self, for_validate=False): +======= + def set_missing_values(self, for_validate: bool | None = False): +>>>>>>> 1995fcfdd8 (fix: incorrect type hint) profile = self.set_pos_fields(for_validate) if not self.debit_to: @@ -1020,7 +1024,11 @@ def get_pos_reserved_qty_from_table(child_table, item_code, warehouse): @frappe.whitelist() +<<<<<<< HEAD def make_sales_return(source_name, target_doc=None): +======= +def make_sales_return(source_name: str, target_doc: Document | str | None = None): +>>>>>>> 1995fcfdd8 (fix: incorrect type hint) from erpnext.controllers.sales_and_purchase_return import make_return_doc return make_return_doc("POS Invoice", source_name, target_doc) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index c02018b2d1c..2b069c9e996 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -58,7 +58,16 @@ def _preprocess_ctx(ctx): @frappe.whitelist() @erpnext.normalize_ctx_input(ItemDetailsCtx) +<<<<<<< HEAD def get_item_details(ctx, doc=None, for_validate=False, overwrite_warehouse=True) -> ItemDetails: +======= +def get_item_details( + ctx: ItemDetailsCtx | str, + doc: Document | str | None = None, + for_validate: bool | None = False, + overwrite_warehouse: bool = True, +): +>>>>>>> 1995fcfdd8 (fix: incorrect type hint) """ ctx = { "item_code": "",