fix: resolve version-16 backport conflicts

Keep validate_warehouses() alongside the new
validate_over_delivery_receipt_allowance() call.

Drop test_blanket_order_over_order_aggregated_across_rows: it is develop-only
context the cherry-pick swallowed into the conflict, not part of #57725.

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:55:08 +05:30
parent 6cbf73a326
commit 697f68d1d2
3 changed files with 1 additions and 34 deletions

View File

@@ -91,8 +91,6 @@ class TestBlanketOrder(ERPNextTestSuite):
frappe.db.set_single_value("Buying Settings", "blanket_order_allowance", 10)
po.submit()
<<<<<<< HEAD
=======
@ERPNextTestSuite.change_settings("Selling Settings", {"blanket_order_allowance": 0})
@ERPNextTestSuite.change_settings("Buying Settings", {"blanket_order_allowance": 0})
@ERPNextTestSuite.change_settings(
@@ -119,30 +117,6 @@ class TestBlanketOrder(ERPNextTestSuite):
order.flags.ignore_permissions = True
self.assertRaises(frappe.ValidationError, order.submit)
def test_blanket_order_over_order_aggregated_across_rows(self):
# the over-order check should sum the same item across multiple order rows
frappe.db.set_single_value("Selling Settings", "blanket_order_allowance", 0)
bo = make_blanket_order(blanket_order_type="Selling", quantity=100)
frappe.flags.args.doctype = "Sales Order"
so = make_order(bo.name)
so.currency = get_company_currency(so.company)
so.delivery_date = today()
so.items[0].qty = 60
so.append(
"items",
{
"item_code": so.items[0].item_code,
"qty": 50, # 60 + 50 = 110 > 100 blanket qty
"rate": so.items[0].rate,
"delivery_date": today(),
"against_blanket_order": 1,
"blanket_order": bo.name,
},
)
self.assertRaises(frappe.ValidationError, so.submit)
>>>>>>> 0b271e24b6 (test(stock): add test cases verifying stock over delivery role does not bypass order allowance)
def test_party_item_code(self):
item_doc = make_item("_Test Item 1 for Blanket Order")
item_code = item_doc.name

View File

@@ -605,11 +605,7 @@
"index_web_pages_for_search": 1,
"issingle": 1,
"links": [],
<<<<<<< HEAD
"modified": "2026-06-13 12:38:02.202183",
=======
"modified": "2026-08-01 23:35:02.896836",
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
"modified_by": "Administrator",
"module": "Stock",
"name": "Stock Settings",

View File

@@ -70,7 +70,7 @@ class StockSettings(Document):
use_naming_series: DF.Check
use_serial_batch_fields: DF.Check
validate_material_transfer_warehouses: DF.Check
valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO", "Standard Cost"]
valuation_method: DF.Literal["FIFO", "Moving Average", "LIFO"]
# end: auto-generated types
def validate(self):
@@ -104,11 +104,8 @@ class StockSettings(Document):
validate_fields_for_doctype=False,
)
<<<<<<< HEAD
self.validate_warehouses()
=======
self.validate_over_delivery_receipt_allowance()
>>>>>>> 446ec6030a (fix(stock): validate over delivery/receipt allowance in stock settings)
self.validate_serial_and_batch_no_settings()
self.cant_change_valuation_method()
self.validate_clean_description_html()