Skip to Content
Odoo Menu
  • Sign in
  • Try it free
  • Apps
    Finance
    • Accounting
    • Invoicing
    • Expenses
    • Spreadsheet (BI)
    • Documents
    • Sign
    Sales
    • CRM
    • Sales
    • POS Shop
    • POS Restaurant
    • Subscriptions
    • Rental
    Websites
    • Website Builder
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Supply Chain
    • Inventory
    • Manufacturing
    • PLM
    • Purchase
    • Maintenance
    • Quality
    Human Resources
    • Employees
    • Recruitment
    • Time Off
    • Appraisals
    • Referrals
    • Fleet
    Marketing
    • Social Marketing
    • Email Marketing
    • SMS Marketing
    • Events
    • Marketing Automation
    • Surveys
    Services
    • Project
    • Timesheets
    • Field Service
    • Helpdesk
    • Planning
    • Appointments
    Productivity
    • Discuss
    • Artificial Intelligence
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industries
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage Distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Property Management
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Manufacturing
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries ⟶
  • Community
    Learn
    • Tutorials
    • Documentation
    • Certifications
    • Training
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Download
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Events
    • Translations
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    • Affiliate Program
    Get Services
    • Find a Partner
    • Find an Accountant
      • Get a Tailored Demo
    • Implementation Services
    • Customer References
    • Support
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +32 2 290 34 90
    • Get a Tailored Demo
  • Pricing
  • Help
  1. APPS
  2. Administration
  3. UoM UNECE Codes v 19.0
  4. Sales Conditions FAQ

UoM UNECE Codes

by Terrabit https://www.terrabit.ro , Dorin Hongu https://www.terrabit.ro
Odoo
v 19.0 Third Party 9
Download for v 19.0 Deploy on Odoo.sh
Apps purchases are linked to your Odoo account, please sign in or sign up first.
Versions 19.0 20.0
You bought this module and need support? Click here!
Versions 19.0 20.0
  • Description
  • Manifest
  • License
UoM UNECE Codes

UoM UNECE Codes

Correct units in electronic documents

Odoo 19.0 Administration Odoo.sh • On-premise OPL-1
✓ 21 automated tests
93% code coverage
★ Did this module help you? It is free, built and maintained by the Terrabit developers. If it saved you time, a rating on this page is the best way to say thanks — and it helps other Odoo users find it too. Thank you for your support!
★ Leave a rating ↓
  • Overview
  • Configuration
  • Usage
  • Versions
Overview

Lets you set the UN/ECE code sent as the unit of measure in electronic documents (e-invoice, eTransport) on each unit, instead of relying on the fixed mapping built into Odoo.

Odoo matches a unit to its code exclusively through the XML ID, against a dictionary of 28 entries, and returns C62 — one piece — for anything it does not recognise, without raising an error. That has two consequences, both silent:

  • Every unit you create is declared as a piece. A reception of 10 boxes of 13 kg leaves for the tax authority as C62, whatever it actually measures. There is no data fix: a unit like "Box of 13 kg" has no entry in the built-in dictionary to point at.
  • Some units shipped by Odoo are declared as pieces too. The dictionary looks for uom.uom_square_meter and uom.uom_square_foot, while the data defines uom.product_uom_square_meter and uom.product_uom_square_foot; the millilitre is missing altogether. Square metres, square feet and millilitres all travel as C62. This module corrects the three of them on install.

The codes come from the nomenclature ANAF publishes with the SAF-T schema, at https://static.anaf.ro/static/10/Anaf/Informatii_R/RO_SAFT_SchemaDefCod_16.02.2026.xlsx (sheet Unitati_masura): over two thousand entries from UN/ECE Recommendation 20 (units) and 21 (packaging), with the English name and ANAF's Romanian translation. Both names load from the same data file, using the name@ro column syntax Odoo also uses for the Romanian chart of accounts. They go into a model of their own rather than a selection field, so a consultant can add or correct an entry from the interface when ANAF republishes the list, with no code change and no deployment.

Both paths that build electronic documents are covered: eTransport reads the code through uom.uom._get_unece_code(), while UBL and CII invoices reach it through a separate method of their own, on account.edi.common. Overriding only the first would have fixed eTransport and silently left invoices unchanged.

Leaving the field empty keeps exactly the behaviour you have today, which is what makes the module safe to install on a running database.

Configuration

The codes are in Settings → UNECE Codes, a menu of its own in the Settings top bar, filterable by source: Recommendation 20 for units, Recommendation 21 for packaging (the codes prefixed with X). Both are accepted by UBL/Peppol BIS 3, by CIUS-RO and by the eTransport schema. The menu and the field are visible to administrators (Settings group) only.

The full nomenclature is loaded on install from the SAF-T schema published by ANAF, English and Romanian names together, so you should not need to add anything. When ANAF republishes the list, regenerate the data with scripts/import_unece_from_saft.py.

One caveat on code length: the nomenclature holds XLTR, four characters, while eTransport's own CodUMType accepts only two or three. Such a code is reportable in SAF-T but will be rejected on a transport declaration.

The code itself goes on the unit, in the Units & Packagings list (from Invoicing → Configuration → Settings, block Units & Packagings, once Units of Measure & Packagings is ticked; also under Configuration in Sales and Inventory), field UNECE Code. The field is also available as an optional column in the list view, which is the quicker way to fill it in for many units at once.

A code set on a unit takes precedence over Odoo's built-in mapping. That is deliberate: correcting a wrong built-in mapping is half the point of the module.

Usage

Nothing to do day to day: once a unit carries a code, every electronic document built from it uses that code. The work is a one-off check of the units, at go-live.

1. Open the list of units. In Invoicing → Configuration → Settings, block Units & Packagings, tick Units of Measure & Packagings and save; the Units & Packagings link below it opens the list of units. With Sales or Inventory installed, the same list is also in their Configuration menu.

Invoicing settings scrolled to the Units & Packagings block: Units of Measure & Packagings is ticked (1) and the Units & Packagings link (2) opens the list of units
1 Invoicing settings scrolled to the Units & Packagings block: Units of Measure & Packagings is ticked (1) and the Units & Packagings link (2) opens the list of units

2. Find the right code. The nomenclature is in Settings → UNECE Codes, a menu of its own in the Settings top bar. Code is the value sent in the XML, Source tells a unit of measure (Rec 20) from a packaging (Rec 21, codes prefixed with X). Use Packaging (Rec 21) for units that pack a quantity (box XBX, bag XBG, pallet XPX; search by code or by the ANAF name) and Units (Rec 20) for actual units of measure (KGM, MTR, MTK).

UNECE Codes list opened from the Settings top bar (1), filtered on Packaging (Rec 21) (2): 377 codes with their Code, Name and Source, such as X4A Box, steel and X4H Box, plastic
2 UNECE Codes list opened from the Settings top bar (1), filtered on Packaging (Rec 21) (2): 377 codes with their Code, Name and Source, such as X4A Box, steel and X4H Box, plastic

3. Check the units. In the units list, show the optional UNECE Code column from the optional-columns icon at the right of the header. Every unit of your own needs a code. An empty cell means Odoo's built-in mapping applies — C62 (one piece) for any unit the standard does not recognise. Square metres and millilitres already carry MTK and MLT, set by the module on install.

Units & Packagings list with the UNECE Code column shown: m² has MTK - square metre, ml has MLT - millilitre and the custom unit Box of 13 kg has XBX - Box (1); standard units such as Units, kg or L are left empty
3 Units & Packagings list with the UNECE Code column shown: m² has MTK - square metre, ml has MLT - millilitre and the custom unit Box of 13 kg has XBX - Box (1); standard units such as Units, kg or L are left empty

4. Set the code on the unit. Open the unit and pick the value in UNECE Code. Nothing changes on products or invoices.

Form of the unit Box of 13 kg, 13 kg, with UNECE Code (1) set to XBX - Box
4 Form of the unit Box of 13 kg, 13 kg, with UNECE Code (1) set to XBX - Box

5. Invoice as usual. Without the Sales app, the Quantity and Unit columns of invoice lines are hidden by default; show them from the optional-columns icon of the lines. In the e-invoice XML, the line's cbc:InvoicedQuantity now carries unitCode="XBX" instead of C62.

Posted customer invoice INV/2026/00001: the line is 10.00 of Box of 13 kg (1) at 245.00, VAT 21%
5 Posted customer invoice INV/2026/00001: the line is 10.00 of Box of 13 kg (1) at 245.00, VAT 21%
<cbc:InvoicedQuantity unitCode="XBX">10.0</cbc:InvoicedQuantity>

The code applies to both paths that build electronic documents: eTransport, through uom.uom._get_unece_code(), and UBL/CII invoices (CIUS-RO included), which reach the same value through a separate method of their own.

Versions

19.0.1.0.1 (2026-09-29)

  • Own module icon, instead of the generic gears it had.
800+
Modules published on Odoo Apps
Odoo
Silver PartnerImplementation & Support

Need help getting started?

Our 800+ apps on the Odoo Apps Store are used in Odoo implementations across Europe, the Americas, Asia and Africa — by companies we have never even met. That is the advantage of building modules that simply work.

Questions about this module? Write to us — the developers who build it will answer.

Terrabit support →

More apps by Terrabit

Other modules from the same publisher, built to work together. All apps →

BA Backup Attachments Administration

Backup attachments for selected file type

CP Contact Personal Data Administration

Personal data on contacts: CNP with validation, ID card, birthdate, gender

CS Credentials Store Administration

Manage credentials for external services

PD Product Data Sheet Administration

Attach technical and safety data sheets (PDF) to products

PD Product Data Sheet Website Administration

Show data sheet and safety sheet download buttons on the eCommerce product page

PG Partner GLN Administration

Partner Global Location Number

IO Image Optimizer Administration

Recompress oversized image attachments, remove duplicated product images, product image backgrounds and watermarks

DE Deltatech Tools

Shared base for the Deltatech suite: common technical extensions used by all modules

Availability
Odoo Online
Odoo.sh
On Premise
Odoo Apps Dependencies • Invoicing (account)
• Discuss (mail)
Lines of code 133
Technical Name deltatech_uom_unece
LicenseOPL-1
Websitehttps://www.terrabit.ro
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

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Community
  • Tutorials
  • Documentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Translations
Services
  • Odoo.sh Hosting
  • Support
  • Upgrade
  • Custom Developments
  • Education
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Brand Assets
  • Contact us
  • Jobs
  • Events
  • Podcast
  • Blog
  • Customers
  • Legal • Privacy
  • Security

Odoo is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

Website made with