fix: resolve version-15 backport conflicts

Keep validate_warehouses() and add validate_over_delivery_receipt_allowance();
validate_serial_and_batch_no_settings() does not exist on this branch.

Keep this branch's field labels and add only the non_negative flag the
backported commit introduced.

Drop test_over_order_allowance_against_material_request and
test_blanket_order_over_order_aggregated_across_rows: both are develop-only
context the cherry-pick swallowed into the conflicts, and Buying Settings has
no over_order_allowance field here.

Use frappe.tests.utils.change_settings instead of ERPNextTestSuite, which this
branch does not have.

Revert the valuation_method literal to the three options this branch offers -
Standard Cost rode along from a regenerated develop type block.
This commit is contained in:
Mihir Kandoi
2026-08-03 12:58:57 +05:30
committed by Sudharsanan11
parent 21c3e07f48
commit b25a2f2cdf
5 changed files with 9 additions and 121 deletions

View File

@@ -312,22 +312,12 @@ class StatusUpdater(Document):
qty_or_amount,
)
<<<<<<< HEAD
role_allowed_to_over_deliver_receive = frappe.db.get_single_value(
"Stock Settings", "role_allowed_to_over_deliver_receive"
)
role_allowed_to_over_bill = frappe.db.get_single_value(
"Accounts Settings", "role_allowed_to_over_bill"
)
role = role_allowed_to_over_deliver_receive if qty_or_amount == "qty" else role_allowed_to_over_bill
=======
role = None
if qty_or_amount == "qty":
if args.get("overflow_type") in ("delivery", "receipt"):
role = frappe.get_single_value("Stock Settings", "role_allowed_to_over_deliver_receive")
else:
role = frappe.get_single_value("Accounts Settings", "role_allowed_to_over_bill")
>>>>>>> 248873034d (fix(stock): scope over deliver/receive role check to delivery and receipt overflow)
overflow_percent = (
(item[args["target_field"]] - item[args["target_ref_field"]]) / item[args["target_ref_field"]]