fix: Qty and UOM not fetched when adding Item in Material Request (backport #58118) (#58266)

This commit is contained in:
mergify[bot]
2026-08-18 15:25:21 +05:30
committed by GitHub
parent 5412ea0b8c
commit f01f7415e1

View File

@@ -177,7 +177,12 @@ def normalize_ctx_input(T: type) -> callable:
def decorator(func: callable):
# conserve annotations for frappe.utils.typing_validations
@functools.wraps(func, assigned=(a for a in functools.WRAPPER_ASSIGNMENTS if a != "__annotations__"))
@functools.wraps(
func,
assigned=(
a for a in functools.WRAPPER_ASSIGNMENTS if a not in ("__annotations__", "__annotate__")
),
)
def wrapper(ctx: T | Document | dict | str, *args, **kwargs):
if isinstance(ctx, Document):
ctx = T(**ctx.as_dict())