fix(stock): point standalone returns to the incoming rate field

Standalone returns do not fall back to the Item master, so the Valuation Rate Missing error now tells the user to enter the Incoming Rate (Costing) on the row.
This commit is contained in:
Mihir Kandoi
2026-10-28 13:21:52 +05:30
parent f22277adbf
commit fe3fc5feb7
+8 -1
View File
@@ -2455,7 +2455,14 @@ def get_valuation_rate(
+ "</li>"
)
sub_solutions = "<ul><li>" + _("Create an incoming stock transaction for the Item.") + "</li>"
sub_solutions += "<li>" + _("Mention Valuation Rate in the Item master.") + "</li></ul>"
if fallbacks:
sub_solutions += "<li>" + _("Mention Valuation Rate in the Item master.") + "</li></ul>"
else:
sub_solutions += (
"<li>"
+ _("Enter the Incoming Rate (Costing) in the {0} Item table.").format(voucher_type)
+ "</li></ul>"
)
msg = message + solutions + sub_solutions + "</li>"
frappe.throw(msg=msg, title=_("Valuation Rate Missing"))