Site Overlay

Tryton Units of Measure

Categories for Units of Measure

Each Unit of Measure (UoM) in Tryton belongs to one and only one pre-defined Category which normally tells us what the UoM is supposed to measure (e.g. time, energy, units).

You can find a list of the pre-defined categories by selecting Products / Configuration / Units of Measure from the menu.

UoM conversion

Within each category measurements can be converted from one UoM to another. Keep in mind that conversion is impossible if two UoM do not belong to the same category. If you have one UoM that measures length (e.g. meter) and another one that measures weight (e.g. kilogram) there is no way to convert from meter to kilogram.

On the other hand, inside a category, conversion can be done: if you have two UoM that both belong to the category volume – say litres and gallons – you can convert liters to US gallons by multiplying with 3.78541178.

Understanding Factor and Rate fields

Let’s have a look at volume conversions in Tryton. Here’s a liter UoM:

Tryton has Liter as the base unit for its volume UoM category

Note that the fields factor and rate are both populated with the value 1. This is similar to the forex setup, where the base currency is the currency that has a conversion rate of 1 and the exchange rate of any currency other then the base currency is the amount of currency that you have to give for one unit of base currency.

Likewise, for UoM, there is a base unit for each category and

  • the Factor value tells you how many base units of the UoM category are contained in the non-base UoM you are setting up
  • the Rate tells you how many of the new UoM are needed to complete one base unit in the category.

Let’s check that with cubic meters. We know that cubic meters also belong to the Volume category, so the Factor should tell us how many liters are in 1 cubic meter, which is 1’000. Looking the other way round, we know 1 liter is 1/1000 = 0.001 cubic meters, which should be the Rate in Tryton’s terminology. Does it work out? – Seems it does:

Factor and Rate fields for a non-base unit of measurement

Example

Imagine we have the following situation:

  • Our Product are barrels of 250l of ethanol. That puts us into some kind of dilemma first when we have to decide into which Category these barrels fit: is it Volume or Unit? As we want to sell by whole barrels and not by liter we will choose units. The appropriate category hinges on the business context: As long as we simply want to sell barrels without further processing them, we can treat a barrel as a unit. a producer who purchases the barrels for processing the ethanol to liquor which will later be sold in single bottles will certainly go for the volume unit. He could then set up a production process with a recipe that models how many bottles of liquor can be produced from one barrel.
  • For our trading purposes, we buy the barrels container-wise. There are 134 barrels in a container. So we set up a new UoM in the Unit Category as follows:

The Factor is the number of base units (single barrels) that make one of the UoM we are just creating (container of barrels). Once Tryton has got a value for the Factor field, it immediatly populates the Rate field with the reciprocal value.

After having clicked the Save button, we can still update the translations as shown in an earlier post on localization.

Setting the translations for the UoM we just created