How to change item UOM after i made transaction ?!
Hello,
Default Unit of Measure for Item cannot be changed after transactions are made, you will need to create a new Item to use a different Default UOM.
If it’s only a couple of transactions, best bet may be to delete them, change the UoM, and then redo the transactions
Cheers!
I made 150 Purchase transaction entries and now found out that UOM selected in the item master was wrong.
I have 266 more purchase entries to be made.
How to change the UOM of the item now? I can’t delete and start the process again. Please let me know any ways of changing the UOM?
You wont be able to change the UOM once you have done a transaction against that item. One solution is that you can create a new item with the required UOM. Do a stock entry where you will remove the existing item and received UOM. You can change the item name and item code of the existing item. Disable the old item once the process is completed. Please check with your accounts team also on the same as the one account will be debited and credited with same amount when you do this transaction.
Dont know if this will work for you - Try changing the UOM name? We edited the UOM name (changed Nos to Unid - spanish requirement) and it worked as system thinks it still the old UOM. Can create the old UOM again after that??? Off course we did not have any transactions in Unid before and all old Nos transactions now became Unid.
Step 1: first update items in purchase order or another doctype
Step 2: update price list of item
Step 3: update Bin stock uom
Step 4: item UOM update
This is query of update BIN stock UOM
item_code = “any” # Replace with your item code
new_stock_uom = “any” # Replace with your desired Stock UOM
Fetch all Bin records for the given item
bins = frappe.get_all(“Bin”, filters={“item_code”: item_code}, fields=[“name”])
for bin_record in bins:
# Load the Bin document
bin_doc = frappe.get_doc(“Bin”, bin_record.name)
# Update the stock_uom field
bin_doc.stock_uom = new_stock_uom
# Save the changes
bin_doc.save()
frappe.db.commit()
Confirmation message
frappe.msgprint(f"Stock UOM for item {item_code} updated to {new_stock_uom} in all related Bin records.")