Merge pull request #40663 from barredterra/uom-data
diff --git a/babel_extractors.csv b/babel_extractors.csv
new file mode 100644
index 0000000..a8ae8a7
--- /dev/null
+++ b/babel_extractors.csv
@@ -0,0 +1 @@
+**/setup/setup_wizard/data/uom_data.json,erpnext.gettext.extractors.uom_data.extract
diff --git a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
index acd9933..e71d322 100644
--- a/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
+++ b/erpnext/accounts/doctype/opening_invoice_creation_tool/opening_invoice_creation_tool.py
@@ -172,7 +172,7 @@
income_expense_account_field = (
"income_account" if row.party_type == "Customer" else "expense_account"
)
- default_uom = frappe.db.get_single_value("Stock Settings", "stock_uom") or _("Nos")
+ default_uom = frappe.db.get_single_value("Stock Settings", "stock_uom") or "Nos"
rate = flt(row.outstanding_amount) / flt(row.qty)
item_dict = frappe._dict(
diff --git a/erpnext/gettext/__init__.py b/erpnext/gettext/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/gettext/__init__.py
diff --git a/erpnext/gettext/extractors/__init__.py b/erpnext/gettext/extractors/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/erpnext/gettext/extractors/__init__.py
diff --git a/erpnext/gettext/extractors/uom_data.py b/erpnext/gettext/extractors/uom_data.py
new file mode 100644
index 0000000..d279c92
--- /dev/null
+++ b/erpnext/gettext/extractors/uom_data.py
@@ -0,0 +1,17 @@
+import json
+
+
+def extract(fileobj, *args, **kwargs):
+ """
+ Extract messages from a JSON file with standard UOM data. To be used by the Babel extractor.
+
+ :param fileobj: the file-like object the messages should be extracted from
+ :rtype: `iterator`
+ """
+ uom_list = json.load(fileobj)
+
+ if not isinstance(uom_list, list):
+ return
+
+ for uom_data in uom_list:
+ yield None, "_", uom_data.get("uom_name"), ["Name of a UOM"]
diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py
index f5b2e2d..9106d09 100644
--- a/erpnext/regional/italy/utils.py
+++ b/erpnext/regional/italy/utils.py
@@ -159,7 +159,7 @@
rate=reference_row.tax_amount,
qty=1.0,
amount=reference_row.tax_amount,
- stock_uom=frappe.db.get_single_value("Stock Settings", "stock_uom") or _("Nos"),
+ stock_uom=frappe.db.get_single_value("Stock Settings", "stock_uom") or "Nos",
tax_rate=tax.rate,
tax_amount=(reference_row.tax_amount * tax.rate) / 100,
net_amount=reference_row.tax_amount,
diff --git a/erpnext/setup/doctype/uom/uom.json b/erpnext/setup/doctype/uom/uom.json
index afd2312..35d7cf3 100644
--- a/erpnext/setup/doctype/uom/uom.json
+++ b/erpnext/setup/doctype/uom/uom.json
@@ -65,7 +65,7 @@
"icon": "fa fa-compass",
"idx": 1,
"links": [],
- "modified": "2024-03-21 14:46:48.422406",
+ "modified": "2024-03-25 22:59:03.975975",
"modified_by": "Administrator",
"module": "Setup",
"name": "UOM",
@@ -104,5 +104,6 @@
"show_name_in_global_search": 1,
"sort_field": "modified",
"sort_order": "ASC",
- "states": []
+ "states": [],
+ "translated_doctype": 1
}
\ No newline at end of file
diff --git a/erpnext/setup/setup_wizard/data/uom_data.json b/erpnext/setup/setup_wizard/data/uom_data.json
index e7f2f84..12f11ce 100644
--- a/erpnext/setup/setup_wizard/data/uom_data.json
+++ b/erpnext/setup/setup_wizard/data/uom_data.json
@@ -1,171 +1,6 @@
[
{
- "uom_name": "Unit",
- "must_be_whole_number": 1
- },
- {
- "uom_name": "Box",
- "must_be_whole_number": 1
- }, {
- "uom_name": "Nos",
- "must_be_whole_number": 1
- }, {
- "uom_name": "Pair",
- "must_be_whole_number": 1
- }, {
- "uom_name": "Set",
- "must_be_whole_number": 1
- },
- {
- "uom_name": "Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Barleycorn",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calibre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cable Length (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cable Length (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cable Length",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Chain",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Decimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ells (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ems(Pica)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Fathom",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Furlong",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hand",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hectometer",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Inch",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilometer",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Link",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Micrometer",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Mile",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Mile (Nautical)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Nanometer",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Rod",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Vara",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Versta",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Arshin",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Sazhen",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Medio Metro",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Centiarea",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Area",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Manzana",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Caballeria",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Kilometer",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Are",
+ "uom_name": "Abampere",
"must_be_whole_number": 0
},
{
@@ -177,695 +12,7 @@
"must_be_whole_number": 0
},
{
- "uom_name": "Hectare",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Inch",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Square Mile",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Meter/Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Inch/Minute",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Foot/Minute",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Inch/Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilometer/Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Foot/Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Mile/Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Knot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Mile/Minute",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Mile/Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Carat",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cental",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Dram",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Grain",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hundredweight (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hundredweight (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Quintal",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kg",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Microgram",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milligram",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pood",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Slug",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Stone",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Tonne",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kip",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Barrel(Beer)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Barrel (Oil)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Bushel (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Bushel (US Dry Level)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Centilitre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Decimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Inch",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Millimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cubic Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cup",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Decilitre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Fluid Ounce (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Fluid Ounce (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gallon (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gallon Dry (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gallon Liquid (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millilitre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Peck",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pint (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pint, Dry (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pint, Liquid (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Quart (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Quart Dry (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Quart Liquid (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Tablespoon (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Teaspoon",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Day",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Minute",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millisecond",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Microsecond",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Nanosecond",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Week",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Atmosphere",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pascal",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Bar",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Foot Of Water",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hectopascal",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Iches Of Water",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Inches Of Mercury",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilopascal",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Meter Of Water",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Microbar",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milibar",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millimeter Of Mercury",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millimeter Of Water",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Technical Atmosphere",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Torr",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Dyne",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Joule/Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilogram-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilopond",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilopound-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Newton",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pond",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Poundal",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Tonne-Force(Metric)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ton-Force (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ton-Force (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu (It)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu (Th)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu (Mean)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calorie (It)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calorie (Th)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calorie (Mean)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calorie (Food)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Erg",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Horsepower-Hours",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Inch Pound-Force",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Joule",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilojoule",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilocalorie",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilowatt-Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Litre-Atmosphere",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Megajoule",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Watt-Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu/Hour",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu/Minutes",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Btu/Seconds",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Calorie/Seconds",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Horsepower",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilowatt",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Megawatt",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Volt-Ampere",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Watt",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Centigram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Decigram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Dekagram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hectogram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram/Cubic Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram/Cubic Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram/Cubic Millimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Gram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Grain/Gallon (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Grain/Gallon (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Grain/Cubic Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilogram/Cubic Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilogram/Cubic Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilogram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milligram/Cubic Meter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milligram/Cubic Centimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milligram/Cubic Millimeter",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Megagram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Milligram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Microgram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Nanogram/Litre",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce/Cubic Inch",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce/Cubic Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce/Gallon (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ounce/Gallon (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound/Cubic Inch",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound/Cubic Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound/Cubic Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound/Gallon (US)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Pound/Gallon (UK)",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Psi/1000 Feet",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Slug/Cubic Foot",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ton (Short)/Cubic Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Ton (Long)/Cubic Yard",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Celsius",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Fahrenheit",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kelvin",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Cycle/Second",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Nanohertz",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Millihertz",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Hertz",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Kilohertz",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Megahertz",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Wavelength In Gigametres",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Wavelength In Megametres",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Wavelength In Kilometres",
+ "uom_name": "Ampere",
"must_be_whole_number": 0
},
{
@@ -881,39 +28,35 @@
"must_be_whole_number": 0
},
{
- "uom_name": "Coulomb",
+ "uom_name": "Are",
"must_be_whole_number": 0
},
{
- "uom_name": "EMU Of Charge",
+ "uom_name": "Area",
"must_be_whole_number": 0
},
{
- "uom_name": "Faraday",
+ "uom_name": "Arshin",
"must_be_whole_number": 0
},
{
- "uom_name": "Kilocoulomb",
+ "uom_name": "Atmosphere",
"must_be_whole_number": 0
},
{
- "uom_name": "Megacoulomb",
+ "uom_name": "Bar",
"must_be_whole_number": 0
},
{
- "uom_name": "Millicoulomb",
+ "uom_name": "Barleycorn",
"must_be_whole_number": 0
},
{
- "uom_name": "Nanocoulomb",
+ "uom_name": "Barrel (Oil)",
"must_be_whole_number": 0
},
{
- "uom_name": "Ampere",
- "must_be_whole_number": 0
- },
- {
- "uom_name": "Abampere",
+ "uom_name": "Barrel(Beer)",
"must_be_whole_number": 0
},
{
@@ -921,15 +64,270 @@
"must_be_whole_number": 0
},
{
+ "uom_name": "Box",
+ "must_be_whole_number": 1,
+ "common_code": "BX"
+ },
+ {
+ "uom_name": "Btu (It)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Btu (Mean)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Btu (Th)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Btu/Hour",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Btu/Minutes",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Btu/Seconds",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Bushel (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Bushel (US Dry Level)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Caballeria",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cable Length",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cable Length (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cable Length (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calibre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calorie (Food)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calorie (It)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calorie (Mean)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calorie (Th)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Calorie/Seconds",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Carat",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Celsius",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cental",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Centiarea",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Centigram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Centilitre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Centimeter",
+ "must_be_whole_number": 0,
+ "common_code": "CMT",
+ "symbol": "cm"
+ },
+ {
+ "uom_name": "Chain",
+ "must_be_whole_number": 0,
+ "common_code": "M49",
+ "symbol": "ch (US survey)"
+ },
+ {
+ "uom_name": "Coulomb",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cubic Centimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cubic Decimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cubic Foot",
+ "must_be_whole_number": 0,
+ "common_code": "FTQ",
+ "symbol": "ft³"
+ },
+ {
+ "uom_name": "Cubic Inch",
+ "must_be_whole_number": 0,
+ "common_code": "INQ",
+ "symbol": "in³"
+ },
+ {
+ "uom_name": "Cubic Meter",
+ "must_be_whole_number": 0,
+ "common_code": "MTQ",
+ "symbol": "m³"
+ },
+ {
+ "uom_name": "Cubic Millimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cubic Yard",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cup",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Cycle/Second",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Day",
+ "must_be_whole_number": 0,
+ "common_code": "DAY",
+ "symbol": "d"
+ },
+ {
+ "uom_name": "Decigram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Decilitre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Decimeter",
+ "must_be_whole_number": 0,
+ "common_code": "DMT",
+ "symbol": "dm"
+ },
+ {
+ "uom_name": "Dekagram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Dram",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Dyne",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "EMU Of Charge",
+ "must_be_whole_number": 0
+ },
+ {
"uom_name": "EMU of current",
"must_be_whole_number": 0
},
{
- "uom_name": "Kiloampere",
+ "uom_name": "Ells (UK)",
"must_be_whole_number": 0
},
{
- "uom_name": "Milliampere",
+ "uom_name": "Ems(Pica)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Erg",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Fahrenheit",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Faraday",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Fathom",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Fluid Ounce (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Fluid Ounce (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Foot",
+ "must_be_whole_number": 0,
+ "common_code": "FOT",
+ "symbol": "ft"
+ },
+ {
+ "uom_name": "Foot Of Water",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Foot/Minute",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Foot/Second",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Furlong",
+ "must_be_whole_number": 0,
+ "common_code": "M50",
+ "symbol": "fur"
+ },
+ {
+ "uom_name": "Gallon (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gallon Dry (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gallon Liquid (US)",
"must_be_whole_number": 0
},
{
@@ -941,16 +339,718 @@
"must_be_whole_number": 0
},
{
- "uom_name": "Tesla",
+ "uom_name": "Grain",
"must_be_whole_number": 0
},
{
+ "uom_name": "Grain/Cubic Foot",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Grain/Gallon (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Grain/Gallon (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gram",
+ "must_be_whole_number": 0,
+ "common_code": "GRM",
+ "symbol": "g"
+ },
+ {
+ "uom_name": "Gram-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gram/Cubic Centimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gram/Cubic Meter",
+ "must_be_whole_number": 0,
+ "common_code": "A93",
+ "symbol": "g/m³"
+ },
+ {
+ "uom_name": "Gram/Cubic Millimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Gram/Litre",
+ "must_be_whole_number": 0,
+ "common_code": "GL",
+ "symbol": "g/l"
+ },
+ {
+ "uom_name": "Hand",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hectare",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hectogram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hectometer",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hectopascal",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hertz",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Horsepower",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Horsepower-Hours",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hour",
+ "must_be_whole_number": 0,
+ "common_code": "HUR"
+ },
+ {
+ "uom_name": "Hundredweight (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Hundredweight (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Iches Of Water",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Inch",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Inch Pound-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Inch/Minute",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Inch/Second",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Inches Of Mercury",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Joule",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Joule/Meter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kelvin",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kg",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kiloampere",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilocalorie",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilocoulomb",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilogram-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilogram/Cubic Centimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilogram/Cubic Meter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilogram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilohertz",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilojoule",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilometer",
+ "must_be_whole_number": 0,
+ "common_code": "KMT",
+ "symbol": "km"
+ },
+ {
+ "uom_name": "Kilometer/Hour",
+ "must_be_whole_number": 0,
+ "common_code": "KMH",
+ "symbol": "km/h"
+ },
+ {
+ "uom_name": "Kilopascal",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilopond",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilopound-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilowatt",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kilowatt-Hour",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Kip",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Knot",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Link",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Litre",
+ "must_be_whole_number": 0,
+ "common_code": "LTR",
+ "symbol": "l"
+ },
+ {
+ "uom_name": "Litre-Atmosphere",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Megacoulomb",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Megagram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Megahertz",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Megajoule",
+ "must_be_whole_number": 0,
+ "common_code": "3B",
+ "symbol": "MJ"
+ },
+ {
+ "uom_name": "Megawatt",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Meter",
+ "must_be_whole_number": 0,
+ "common_code": "MTR"
+ },
+ {
+ "uom_name": "Meter Of Water",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Meter/Second",
+ "must_be_whole_number": 0,
+ "common_code": "MTS",
+ "symbol": "m/s"
+ },
+ {
+ "uom_name": "Microbar",
+ "must_be_whole_number": 0,
+ "common_code": "B85",
+ "symbol": "µbar"
+ },
+ {
+ "uom_name": "Microgram",
+ "must_be_whole_number": 0,
+ "common_code": "MC",
+ "symbol": "µg"
+ },
+ {
+ "uom_name": "Microgram/Litre",
+ "must_be_whole_number": 0,
+ "common_code": "H29",
+ "symbol": "µg/l"
+ },
+ {
+ "uom_name": "Micrometer",
+ "must_be_whole_number": 0,
+ "common_code": "4H",
+ "symbol": "µm"
+ },
+ {
+ "uom_name": "Microsecond",
+ "must_be_whole_number": 0,
+ "common_code": "B98",
+ "symbol": "µs"
+ },
+ {
+ "uom_name": "Mile",
+ "must_be_whole_number": 0,
+ "common_code": "SMI",
+ "symbol": "mile"
+ },
+ {
+ "uom_name": "Mile (Nautical)",
+ "must_be_whole_number": 0,
+ "common_code": "NMI",
+ "symbol": "n mile"
+ },
+ {
+ "uom_name": "Mile/Hour",
+ "must_be_whole_number": 0,
+ "common_code": "HM",
+ "symbol": "mile/h"
+ },
+ {
+ "uom_name": "Mile/Minute",
+ "must_be_whole_number": 0,
+ "common_code": "M57",
+ "symbol": "mi/min"
+ },
+ {
+ "uom_name": "Mile/Second",
+ "must_be_whole_number": 0,
+ "common_code": "M58",
+ "symbol": "mi/s"
+ },
+ {
+ "uom_name": "Milibar",
+ "must_be_whole_number": 0,
+ "common_code": "MBR",
+ "symbol": "mbar"
+ },
+ {
+ "uom_name": "Milliampere",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millicoulomb",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Milligram",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Milligram/Cubic Centimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Milligram/Cubic Meter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Milligram/Cubic Millimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Milligram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millihertz",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millilitre",
+ "must_be_whole_number": 0,
+ "common_code": "MLT",
+ "symbol": "ml"
+ },
+ {
+ "uom_name": "Millimeter",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millimeter Of Mercury",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millimeter Of Water",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Millisecond",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Minute",
+ "must_be_whole_number": 0,
+ "common_code": "MIN"
+ },
+ {
+ "uom_name": "Nanocoulomb",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Nanogram/Litre",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Nanohertz",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Nanometer",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Nanosecond",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Newton",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Nos",
+ "must_be_whole_number": 1,
+ "common_code": "C62"
+ },
+ {
+ "uom_name": "Ounce",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ounce-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ounce/Cubic Foot",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ounce/Cubic Inch",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ounce/Gallon (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ounce/Gallon (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pair",
+ "must_be_whole_number": 1
+ },
+ {
+ "uom_name": "Parts Per Million",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pascal",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Peck (UK)",
+ "must_be_whole_number": 0,
+ "common_code": "L43",
+ "symbol": "pk (UK)"
+ },
+ {
+ "uom_name": "Peck (US)",
+ "must_be_whole_number": 0,
+ "common_code": "G23",
+ "symbol": "pk (US)"
+ },
+ {
"uom_name": "Percent",
"must_be_whole_number": 0
},
{
- "uom_name": "Parts Per Million",
+ "uom_name": "Pint (UK)",
+ "must_be_whole_number": 0,
+ "common_code": "PTI",
+ "symbol": "pt (UK)"
+ },
+ {
+ "uom_name": "Pint (US)",
+ "must_be_whole_number": 0,
+ "common_code": "PT",
+ "symbol": "pt (US)"
+ },
+ {
+ "uom_name": "Pint, Dry (US)",
+ "must_be_whole_number": 0,
+ "common_code": "L61",
+ "symbol": "pt (US dry)"
+ },
+ {
+ "uom_name": "Pint, Liquid (US)",
"must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pond",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pood",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound",
+ "must_be_whole_number": 0,
+ "common_code": "LBR",
+ "symbol": "lb"
+ },
+ {
+ "uom_name": "Pound-Force",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound/Cubic Foot",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound/Cubic Inch",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound/Cubic Yard",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound/Gallon (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Pound/Gallon (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Poundal",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Psi/1000 Feet",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Quart (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Quart Dry (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Quart Liquid (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Quintal",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Rod",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Sazhen",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Second",
+ "must_be_whole_number": 0,
+ "common_code": "SEC"
+ },
+ {
+ "uom_name": "Set",
+ "must_be_whole_number": 1,
+ "common_code": "SX"
+ },
+ {
+ "uom_name": "Slug",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Slug/Cubic Foot",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Square Centimeter",
+ "must_be_whole_number": 0,
+ "common_code": "CMK",
+ "symbol": "cm²"
+ },
+ {
+ "uom_name": "Square Foot",
+ "must_be_whole_number": 0,
+ "common_code": "FTK",
+ "symbol": "ft²"
+ },
+ {
+ "uom_name": "Square Inch",
+ "must_be_whole_number": 0,
+ "common_code": "INK",
+ "symbol": "in²"
+ },
+ {
+ "uom_name": "Square Kilometer",
+ "must_be_whole_number": 0,
+ "common_code": "KMK",
+ "symbol": "km²"
+ },
+ {
+ "uom_name": "Square Meter",
+ "must_be_whole_number": 0,
+ "common_code": "MTK",
+ "symbol": "m²"
+ },
+ {
+ "uom_name": "Square Mile",
+ "must_be_whole_number": 0,
+ "common_code": "MIK",
+ "symbol": "mi²"
+ },
+ {
+ "uom_name": "Square Yard",
+ "must_be_whole_number": 0,
+ "common_code": "YDK",
+ "symbol": "yd²"
+ },
+ {
+ "uom_name": "Stone",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Tablespoon (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Teaspoon",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Technical Atmosphere",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Tesla",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ton (Long)/Cubic Yard",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ton (Short)/Cubic Yard",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ton-Force (UK)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Ton-Force (US)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Tonne",
+ "must_be_whole_number": 0,
+ "common_code": "TNE",
+ "symbol": "t"
+ },
+ {
+ "uom_name": "Tonne-Force(Metric)",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Torr",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Unit",
+ "must_be_whole_number": 1,
+ "common_code": "C62"
+ },
+ {
+ "uom_name": "Vara",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Versta",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Volt-Ampere",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Watt",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Watt-Hour",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Wavelength In Gigametres",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Wavelength In Kilometres",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Wavelength In Megametres",
+ "must_be_whole_number": 0
+ },
+ {
+ "uom_name": "Week",
+ "must_be_whole_number": 0,
+ "common_code": "WEE",
+ "symbol": "wk"
+ },
+ {
+ "uom_name": "Yard",
+ "must_be_whole_number": 0,
+ "common_code": "YRD",
+ "symbol": "yd"
}
-
-]
\ No newline at end of file
+]
diff --git a/erpnext/setup/setup_wizard/operations/defaults_setup.py b/erpnext/setup/setup_wizard/operations/defaults_setup.py
index 756409b..29314a2 100644
--- a/erpnext/setup/setup_wizard/operations/defaults_setup.py
+++ b/erpnext/setup/setup_wizard/operations/defaults_setup.py
@@ -33,7 +33,7 @@
stock_settings.default_warehouse = frappe.db.get_value(
"Warehouse", {"warehouse_name": _("Stores")}
)
- stock_settings.stock_uom = _("Nos")
+ stock_settings.stock_uom = "Nos"
stock_settings.auto_indent = 1
stock_settings.auto_insert_price_list_rate_if_missing = 1
stock_settings.set_qty_in_transactions_based_on_serial_no_input = 1
diff --git a/erpnext/setup/setup_wizard/operations/install_fixtures.py b/erpnext/setup/setup_wizard/operations/install_fixtures.py
index 2205924..8f11424 100644
--- a/erpnext/setup/setup_wizard/operations/install_fixtures.py
+++ b/erpnext/setup/setup_wizard/operations/install_fixtures.py
@@ -336,16 +336,10 @@
open(frappe.get_app_path("erpnext", "setup", "setup_wizard", "data", "uom_data.json")).read()
)
for d in uoms:
- if not frappe.db.exists("UOM", _(d.get("uom_name"))):
- frappe.get_doc(
- {
- "doctype": "UOM",
- "uom_name": _(d.get("uom_name")),
- "name": _(d.get("uom_name")),
- "must_be_whole_number": d.get("must_be_whole_number"),
- "enabled": 1,
- }
- ).db_insert()
+ if not frappe.db.exists("UOM", d.get("uom_name")):
+ doc = frappe.new_doc("UOM")
+ doc.update(d)
+ doc.save()
# bootstrap uom conversion factors
uom_conversions = json.loads(
@@ -359,14 +353,14 @@
if not frappe.db.exists(
"UOM Conversion Factor",
- {"from_uom": _(d.get("from_uom")), "to_uom": _(d.get("to_uom"))},
+ {"from_uom": d.get("from_uom"), "to_uom": d.get("to_uom")},
):
frappe.get_doc(
{
"doctype": "UOM Conversion Factor",
"category": _(d.get("category")),
- "from_uom": _(d.get("from_uom")),
- "to_uom": _(d.get("to_uom")),
+ "from_uom": d.get("from_uom"),
+ "to_uom": d.get("to_uom"),
"value": d.get("value"),
}
).db_insert()
@@ -480,7 +474,7 @@
stock_settings.default_warehouse = frappe.db.get_value(
"Warehouse", {"warehouse_name": _("Stores")}
)
- stock_settings.stock_uom = _("Nos")
+ stock_settings.stock_uom = "Nos"
stock_settings.auto_indent = 1
stock_settings.auto_insert_price_list_rate_if_missing = 1
stock_settings.set_qty_in_transactions_based_on_serial_no_input = 1