Secondary Unit of Measure, Dual Units and Catch Weight: count in pieces, bill by kg
by Aerya IT Solutions https://aerya.net$ 54.79
Odoo 17, 18, 19 and 20, Community and Enterprise · Developed in the European Union by Aerya IT Solutions
Secondary Unit of Measure, Dual Units and Catch Weight: count in pieces, bill by kg
A secondary unit of measure (secondary UoM) next to the main one on every sales, purchase, stock and invoice line: count in pieces or boxes, sell, stock and invoice by weight, with a fixed ratio or catch weight. Valuation stays on the main unit.
Fixed ratio, or catch weight with the measured weight
Follows the order to the delivery and the invoice
Stock valuation stays on the main unit
Runs on Odoo.sh and on-premise, not on Odoo Online (SaaS), where Odoo does not allow modules with Python code. Please buy the version that matches your database.
Screenshots of Odoo 19 Enterprise with the data of a fictitious company.
on Odoo 19
no warnings
The problem
A ham is counted in pieces and sold by the kilo. A cheese wheel, a fish, a roll of fabric, a drum of oil: the warehouse counts one thing and the invoice says another. Odoo has one unit per line, so the company picks one and loses the other. Either the invoice shows kilos and nobody knows how many pieces left the dock, or the stock is in pieces and the price has to be worked out by hand.
The customer's delivery note says 6 hams. The invoice says 15 kg. Both are right, and the customer wants to see both.
What the module does
It gives a product a second unit of measure. The product keeps its main unit (kg, litre, metre) for stock, prices, invoicing and valuation, and gets a counted unit (piece, box, roll). Every sales, purchase, stock and invoice line then carries two quantities, the main one and the counted one. The ratio between them is either fixed, or it is an average and the real weight is recorded on its own (catch weight).
Stock quantities, delivered and received quantities, invoice quantities, prices, taxes, subtotals and stock valuation all keep using the main quantity. The counted quantity is informative and printed: it never changes a total.
How it works, step by step
- Set the product up. On the product form tick Dual units. Choose the Counted unit, for example Units. It does not have to belong to the category of the main unit.
- Choose the ratio type. Fixed ratio: the counted quantity always follows the main quantity. Catch weight (variable ratio): the ratio is only an average, and the counted quantity and the measured weight are recorded on their own.
- Give the ratio. Main units per counted unit, for example 2.5 kg per piece.
- Sell or buy. On the line of a quotation or a purchase order the counted quantity is typed or estimated from the main quantity. With catch weight, typing a count re-estimates the weight, and typing a weight leaves the count alone.
- Deliver or receive. The stock move takes the counted quantity from the order line in proportion to the quantity moved. In the detailed operations there is one counted quantity per line: with a fixed ratio it follows the done quantity, and with catch weight you enter the pieces and weigh on the same line.
- Invoice. The invoice carries the counted quantity delivered (or ordered, according to the invoicing policy) and not invoiced yet, so two partial invoices add up to the delivered count. A credit note copies it from the invoice.
- Print. The quotation, order, invoice, purchase order and delivery slip show the counted quantity under the main quantity. The delivery slip adds a table of counted quantities by product.
A worked example
A ham is stocked in kg at 2.5 kg per piece, with a fixed ratio. A customer orders 10 kg, and the line shows 4 pieces. If the salesperson types 6 pieces, the line shows 15 kg. With a catch weight product, such as a cheese wheel, the ratio is only an average: the line starts with the estimate, and at the dock the picker enters the pieces and weighs them on the same line. The delivery slip prints both. The invoice bills the real weight at the price per kilo and shows the pieces under it. The product shows Counted on hand: the counted quantity of the done moves in and out of the internal locations.
Features
Two quantities on the order
A quotation with the counted and the main quantity on each line.

Dual units on the product
Counted unit, ratio type and ratio, in one place on the product form.

A delivery to prepare
The demand and the counted demand come from the order.

Pieces and weights at the dock
A done delivery with the counted pieces and the weighed quantities.

Receipts the same way
Pieces counted at the dock, weights from the scale.

The invoice
Counted quantities on the invoice, delivered and not yet invoiced.

Printed documents
The printed invoice shows the counted quantity under the weight, and the delivery slip adds a table of counted quantities.

The delivery slip
A table of counted quantities by product.

Settings and options
| Dual units | Ticked on the product form. |
| Counted unit | Any unit. It does not have to be in the category of the main unit. |
| Ratio type | Fixed ratio, or catch weight (variable ratio). |
| Main units per counted unit | The ratio, for example 2.5 kg per piece. |
| Counted on hand | On the product: counted quantity of the done moves in and out of internal locations. |
What it does not do
- Manufacturing (a bill of materials consumes the main unit only), point of sale and the website shop do not read or write the counted quantity.
- A counted quantity cannot exist without a main quantity. Services and consumables that are not stocked can be given a counted unit, but nothing documents it beyond the line itself.
- Inventory adjustments of a catch weight product record the estimate (main quantity divided by the ratio) as the counted quantity, because the adjustment does not ask for the count.
- The counted unit is never converted with the unit rules of the main unit, so it is not offered in the unit column of the lines.
- The counted quantity never changes a price, a tax, a total or a valuation.
Requirements
| Odoo versions | 17, 18, 19 and 20 |
| Editions | Community and Enterprise |
| Odoo apps | Sales, Purchase and Inventory with accounting (sale_stock, purchase_stock, stock_account) |
| Modules of ours | None |
| Languages | English, Spanish and Romanian |
Questions
Which quantity does the invoice charge?
The main quantity, at the price per main unit. The counted quantity is printed beside it.
What is the difference between fixed ratio and catch weight?
With a fixed ratio the counted quantity always follows the main quantity. With catch weight the ratio is an average: the count and the measured weight are recorded on their own.
Does it work with lots and serial numbers?
Yes. The counted quantity is kept per move line.
Does the stock valuation change?
No. Valuation stays on the main unit.
Does it work in manufacturing or the point of sale?
No. They do not read or write the counted quantity.
Explore our other apps
More modules by Aerya IT Solutions for Odoo 19, built to work together.
Questions or a custom quote?
Write to info@aerya.ro for questions about the module, its installation or custom development.
Aerya IT Solutions · Developed in the European Union · aerya.net
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Purchase (purchase)
• Invoicing (account) • Discuss (mail) • Inventory (stock) |
| Lines of code | 860 |
| Technical Name |
aerya_uom_dual |
| License | OPL-1 |
| Website | https://aerya.net |
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module