From aaae81f7e872f6e6fb475ed751212d025c6c6709 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:12:16 +0530 Subject: [PATCH] fix: added validation for UOM must be whole number (backport #43710) (#43711) * fix: added validation for UOM must be whole number (#43710) (cherry picked from commit 4fd4a37dc931b48526a5e00b0a905a735b435778) # Conflicts: # erpnext/controllers/accounts_controller.py * chore: fix conflicts * chore: fix linters issue --------- Co-authored-by: rohitwaghchaure --- erpnext/controllers/accounts_controller.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index bcdc788df47..ebd6594a2a8 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -3308,6 +3308,9 @@ def update_child_qty_rate(parent_doctype, trans_items, parent_doctype_name, chil parent.update_billing_percentage() parent.set_status() + parent.validate_uom_is_integer("uom", "qty") + parent.validate_uom_is_integer("stock_uom", "stock_qty") + def check_if_child_table_updated(child_table_before_update, child_table_after_update, fields_to_check): accounting_dimensions = [*get_accounting_dimensions(), "cost_center", "project"]