mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-31 10:49:09 +00:00
[feature] Ability to set UOM as Integer-only and related validations.
This commit is contained in:
@@ -43,6 +43,10 @@ class DocType:
|
||||
def validate(self):
|
||||
self.clear_operations()
|
||||
self.validate_main_item()
|
||||
|
||||
from utilities.transaction_base import validate_uom_is_integer
|
||||
validate_uom_is_integer(self.doclist, "stock_uom", "qty")
|
||||
|
||||
self.validate_operations()
|
||||
self.validate_materials()
|
||||
self.set_bom_material_details()
|
||||
|
||||
@@ -36,7 +36,7 @@ test_records = [
|
||||
"qty": 1.0,
|
||||
"rate": 5000.0,
|
||||
"amount": 5000.0,
|
||||
"stock_uom": "No."
|
||||
"stock_uom": "_Test UOM"
|
||||
},
|
||||
{
|
||||
"doctype": "BOM Item",
|
||||
@@ -45,7 +45,7 @@ test_records = [
|
||||
"qty": 2.0,
|
||||
"rate": 1000.0,
|
||||
"amount": 2000.0,
|
||||
"stock_uom": "No."
|
||||
"stock_uom": "_Test UOM"
|
||||
}
|
||||
]
|
||||
]
|
||||
Reference in New Issue
Block a user