Skip to content

Commit

Permalink
fix: added validation for UOM must be whole number (#43710)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4fd4a37)

# Conflicts:
#	erpnext/controllers/accounts_controller.py
  • Loading branch information
rohitwaghchaure authored and mergify[bot] committed Oct 17, 2024
1 parent 2e6ead3 commit f4f3287
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -3305,6 +3305,25 @@ def should_update_supplied_items(doc) -> bool:
parent.update_billing_percentage()
parent.set_status()

<<<<<<< HEAD
=======
parent.validate_uom_is_integer("uom", "qty")
parent.validate_uom_is_integer("stock_uom", "stock_qty")

# Cancel and Recreate Stock Reservation Entries.
if parent_doctype == "Sales Order":
from erpnext.stock.doctype.stock_reservation_entry.stock_reservation_entry import (
cancel_stock_reservation_entries,
has_reserved_stock,
)

if has_reserved_stock(parent.doctype, parent.name):
cancel_stock_reservation_entries(parent.doctype, parent.name)

if parent.per_picked == 0:
parent.create_stock_reservation_entries()

>>>>>>> 4fd4a37dc9 (fix: added validation for UOM must be whole number (#43710))

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"]
Expand Down

0 comments on commit f4f3287

Please sign in to comment.