fix: add type hints to make_request_for_quotation

This commit is contained in:
Shllokkk
2026-08-28 20:02:59 +05:30
parent 5adcb28b3c
commit 4435f166ea

View File

@@ -10,6 +10,7 @@ import json
import frappe
import frappe.defaults
from frappe import _, msgprint
from frappe.model.document import Document
from frappe.model.mapper import get_mapped_doc
from frappe.query_builder import Order
from frappe.query_builder.functions import Sum
@@ -763,7 +764,7 @@ def make_purchase_orders_by_supplier(source_name: str, item_suppliers: str | lis
@frappe.whitelist()
def make_request_for_quotation(source_name, target_doc=None):
def make_request_for_quotation(source_name: str, target_doc: str | dict | Document | None = None):
def update_item(obj, target, source_parent):
qty = obj.ordered_qty or obj.received_qty
target.qty = flt(flt(obj.stock_qty) - flt(qty)) / target.conversion_factor