How to setup UoM to convert from Weight to Pieces

I am trying to setup UoM for converting between Kg and Pieces.

For example 1 kg of material contains 148 pieces.

I checked UoM Conversion Factor but could not find anything that will allow me to convert weight (mass) to pieces (nos).

How to set this up?

Is there any detailed tutorial showing how to setup UoM?


1 Like


How is the material being used? For example, is it used manufacture an item or is each piece then sold as an item ?

The material then actually passed through 12 processes and at the end it is packed in boxes. Each box can hold 2 kg of material (pieces).

So this might be a bit awkword and not work well too I think :sweat_smile:

in conversion factor you’re supposed to add conversion rate to stock UOM. So in your case it would be 1/148 which quite likely won’t work well AFAIK :thinking:

Can you try it on a transaction and raise a issue: create a new ticket

Personally I can’t believe that ERPNext does not have such basic functionality of UoM conversion working properly in a fool proof manner.

No ERP can be complete without this functionality.

I am sure many users here will have had the need to convert from Kg to Units/Nos in many occasions.

Expert community members please help here.


In this case it appears that the material is a component of an item that is being manufactured for sale or to be used in another process. So the final product could have a Bill of Materials, and a operation resulting in a finished item. Perhaps this somewhat similar question will help:

Perhaps I’m misunderstanding, but I don’t see why this could not be done.

In a development environment, I created 2 UOM Conversion factors. Screenshot below. Showing how to convert from Pieces to Kilograms, or vice versa.

Next, I created an Item that has a Stocking UOM of Kg.

I wrote a PO for 1,000 Pieces. The conversion seems okay. :man_shrugging:

We have already set Conversion Factor but still when we create a Work Order for manufacturing it is converting on one to one basis meaning if we set the Quantity to 1000 pieces it is issuing 1000 Kg from store instead of 6.76 Kg.

After looking at your sample it seems we are making some mistake somewhere.

I need to experiment a bit more.


Within the manufacturing process, the UOM would be Stock UOM in ERPNext. If you need to convert between steps then you may need to customize or build a solution for it. If your requirement is to convert UOMs of Purchase Order etc then that would work. I agree with you that some industries do have the requirement to convert within processes.

Thanks for your input. I will try my hand at customizing it.

But actually I am surprised that even after more then a decade ERPNext has not solved this flaw in UoM. Or it is only me who has such a typical requirement.

Just recently I read a blog about MultliColor Steel converting from SAP to ERPNext. Such a company would surely require such a feature. It would be interesting to see how they have managed this short coming of ERPNext.


There are work arounds with different types of Stock Entries available in the system. However, I do not have enough visibility into your manufacturing processes to suggest anything tangible at this point.