fix: incorrect type hint

(cherry picked from commit 1995fcfdd8)

# Conflicts:
#	erpnext/accounts/doctype/pos_invoice/pos_invoice.py
#	erpnext/stock/get_item_details.py
This commit is contained in:
ruthra kumar
2026-04-21 13:52:59 +05:30
committed by Mergify
parent 5397b7da25
commit 4192a0d370
2 changed files with 17 additions and 0 deletions

View File

@@ -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)

View File

@@ -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": "",