fix: add missing type hints due to failing test case

This commit is contained in:
Shllokkk
2026-02-19 21:22:09 +05:30
parent 2504f0fc0c
commit d3911cd7d8
3 changed files with 10 additions and 3 deletions

View File

@@ -356,7 +356,9 @@ def get_list_context(context=None):
@frappe.whitelist()
def make_sales_order(source_name: str, target_doc: Document | None = None, args: str | dict | None = None):
def make_sales_order(
source_name: str, target_doc: str | Document | None = None, args: str | dict | None = None
):
if not frappe.db.get_singles_value(
"Selling Settings", "allow_sales_order_creation_for_expired_quotation"
):

View File

@@ -133,7 +133,12 @@ def get_parent_item_group(pos_profile: str):
@frappe.whitelist()
def get_items(
start: str, page_length: str, price_list: str, item_group: str, pos_profile: str, search_term: str = ""
start: str | int,
page_length: str | int,
price_list: str | None,
item_group: str,
pos_profile: str,
search_term: str = "",
):
warehouse, hide_unavailable_items = frappe.db.get_value(
"POS Profile", pos_profile, ["warehouse", "hide_unavailable_items"]

View File

@@ -94,7 +94,7 @@ def get_descendants_of(doctype, group_name):
@frappe.whitelist()
@frappe.validate_and_sanitize_search_inputs
def get_customers_or_items(
doctype: str, txt: str, searchfield: str, start: int, page_len: int, filters: list
doctype: str, txt: str, searchfield: str, start: int, page_len: int, filters: list | None
):
filter_list = []
if isinstance(filters, list):