Skip to main content
EN 16931 · code lists

Error BR-CL-23: the line's unit of measure is not a UN/ECE code

Every line of an e-invoice carries its quantity with a unit, written as a code from UN/ECE Recommendation 20: C62 for one unit, for example. BR-CL-23 checks the code is on the list, BR-23 that there is one, and PEPPOL-EN16931-R130 that the price unit matches the quantity unit.

FlexigoTech · Editor in charge: Víctor Gómez · Updated 4 November 2026

Key facts

Versions
Odoo 17, 18, 19 and 20
Checked
in the module's source code, version 17.0 and 20.0 · against the sources linked at the end
Reading time
3 min
  1. BR-23, fatal “An Invoice line (BG-25) shall have an Invoiced quantity unit of measure code (BT-130).” The line must carry a unit.
  2. BR-CL-23, fatal “Unit code MUST be coded according to the UN/ECE Recommendation 20 with Rec 21 extension” The unit must be a code from the list.
  3. PEPPOL-EN16931-R130, fatal “Unit code of price base quantity MUST be same as invoiced quantity.” If the price is per base quantity, its unit is the same as the line's.

The first two come from EN 16931 (Schematron validation-1.3.17). The third is from Peppol BIS (3.0.22) and XRechnung applies it too.

Card for the unit of measure rules
BR-CL-23, BR-23 and PEPPOL-EN16931-R130 on BT-130 and the unitCode attribute.

Where Odoo takes the code from

The code Odoo writes into the file comes from a different place depending on the version:

  • Odoo 17, 18 and 19: a table maps Odoo units (by external identifier) to UN/ECE codes. A unit you created yourself is not in the table and goes out as C62, one unit.
  • Odoo 20: each unit of measure has its own UN/ECE code field, and that code is what goes into the file. Odoo turns it into capitals, but does not compare it with the list.

BR-CL-23 fires when the code in the file is not on the list. On Odoo 20 a mistyped code on the unit of measure is enough. On Odoo 17 to 19 the table always gives a code from the list, so the rule only fires if the code arrives some other way, such as a module that changes it.

There is also a problem no rule sees: a custom unit (“pallet”, “box of twelve”) that Odoo 17 to 19 turns into C62 without warning. The file passes BR-CL-23, because C62 is on the list, but your customer receives “units” where you sold boxes.

For whoever receives the invoice, the code matters: their software reads it to match the line with their order and with the goods received. If they ordered boxes and the invoice says units, the quantity does not match what they received even though the amount is the same, and the invoice gets stuck in their review.

With our XRechnung and ZUGFeRD module

The module ships its own editable table from Odoo units to UN/ECE codes, so each of your units gets its code in BT-130. A unit missing from that table goes out as C62, just as in Odoo 17 to 19, and the only warning lands in the server log, which you cannot see from the invoice. A line without a unit also goes out as C62.

XRechnung module table mapping Odoo units to UN/ECE codes in Odoo 20
Minutes, units, hours, square metres, kilowatt hours and more, with their code for BT-130. Odoo 20 screenshot with demo data.

On Odoo 18, 19 and 20, with the FlexigoTech Cloud subscription, each XRechnung and each ZUGFeRD EN 16931 is validated against the KoSIT rules and a code off the list shows as BR-CL-23 under Validation Errors. On Odoo 17 the published version does not validate.

What to check

  1. See which unit the line carries in the XML (unitCode attribute).
  2. On Odoo 20, open the unit of measure and set its UN/ECE code.
  3. On Odoo 17, 18 and 19, if you use custom units, bear in mind they go out as C62. With our module, on any version, add each one to its table: the missing ones also go out as C62.
  4. If the price is per base quantity (for instance, per hundred units), its unit must be the same as the line's.
  5. Generate the file again and check each line's unitCode attribute before sending it.

Keep reading

Error UBL-SR-48: an invoice line with two taxes or noneUBL-SR-48 and BR-CO-04 require one VAT category, and only one, on every e-invoice line. The Odoo 17, 18, 19 and 20 message, together with BR-25 and BR-16.Error BR-CO-15 in an e-invoice: total with VAT is not net plus VATBR-CO-15, BR-CO-14, BR-CO-16 and BR-CO-17 check that e-invoice totals add up. What each one sums and which ones fail over a single cent.Errors BR-09 and BR-11: seller or buyer address without a country codeBR-09 and BR-11 require the country code in the seller and buyer addresses; BR-08 and BR-10, the address itself. The Odoo 17, 18, 19 and 20 message and what to fill in.
Checked in the module's source code (version 17.0 and 20.0) and the linked sources

Sources