Currently Tryton offers :
• a storage unit (Default UOM)
• a purchasing unit in the same category as the Purchase UOM
• a sales unit in the same category as the storage unit (Sales UOM)
• a unit price expressed in the storage unit
• a unit conversion mechanism in the same category (intra conversion category)
We manage several hundred steel ball products.
We store the products in UNIT by default.
We have the option to use multiple suppliers for the same product.
Some suppliers deliver in KG and others in UNIT,
For suppliers who deliver to us in KG we will need to perform a unit conversion between 2 differents categories (WEIGHT → UNIT)
We therefore need to introduce a concept of inter-category conversion by product when buying (the WEIGHT -> UNIT factor is different by product)
We have the same situation as for the purchase. Customers order us products in UNIT and others in KG.
All moves must be performed in the product’s storage unit (Default UOM)
Purchase and sales invoices must be made in the unit defined with the supplier or the customer.
Note: The concept of inter-category unit conversion for a product should not to be confused with the concept of packaging a product for sale or purchase.
Example: selling a product in 10kg or 25kg bags for a product stored in the KG is not a unit conversion but a definition of a packaging for sale that may be part of the selling price. The concept of unit conversion does not change the price but only the quantity.
- ONETOMANY conversion factors at the product level for a different category unit than the storage unit and one unit per family for conversion.
example: Product A stored in UNIT → added conversion for KG, we can not add a conversion for GRAM. The conversion between KG and GRAM is already present in the WEIGHT category.
- Provide protection against changing conversion factors at the product level. To guarantee a constant conversion factor.
- provide protection against the removal of a conversion factor used in SALE LINE, PURCHASE LINE, MOVE LINE, INVOICE_LINE
- Extend the unit category range that can be used on the SALE LINE, PURCHASE LINE, and INVOICE LINE models. Resume the category of the storage unit + the categories of the conversion unit of the article.
To avoid having to duplicate all the fields of the line in the different screens, we propose to use the existing fields with the different units. This value is added in the FORM view of the line for information.
What is important for the user is to view the information in the unit defined with the client or the provider (and not the storage unit).
- Create an additional field that represents the quantity of the product in its storage unit using the product conversion factor. This field will be the one used for creating the moves because it is in the storage unit.
- copy the conversion factor on the moves to facilitate the possible recalculation of the quantity or the price expressed in Default UOM
- On the MOVE duplicate the fields QUANTITY, UNIT. Synchronize these fields with an on_change event.
The shipment must be allowed to express the value shipped to the secondary selling unit and recalculate the quantity in the stock unit.
The MOVE unit domain can not be changed to allow conversion units because it makes it difficult to calculate inventory and cost. Mainly for the treatment of BACKORDER.
example: a sale for 3kg of the product A (stored in UNIT), we can only ship 2KG. It must be possible to modify the shipping MOVE by directly indicating 2KG and recalculate the value in UNIT for the MOVE.
- When creating the INVOICE LINE (Purchase and Sale) take the unit from the PURCHASE or SALE line and use the shipped quantity expressed in this unit.