OdooWiki OCA HUB

Locale - Default UoM

base_locale_uom_default folder_open OCA/server-tools open_in_new
Extra Tools License: LGPL-3

This module adds a concept of a default unit of measure on languages, unique by unit category type.

It also provides a method that can be used in fields to work from said defaults.

auto_awesome What this module does

AI-generated from the code · Odoo 12.0

Lets you set default units of measure per language, so each language can have its own preferred unit for each unit category (e.g. weight, length).

This module adds a new field called Default Units on the language form. You can open any language (for example English or French) and choose which units of measure should be the default for that language. The rule is simple: you may pick only one default unit per unit category, so you cannot set two different weight units as defaults for the same language. If you try, Odoo shows a validation error and blocks the change.

The module also provides a helper that other parts of Odoo can use to look up the default unit for a given unit category and language. If no language is given, it uses the language of the current user. This makes it possible for other modules to automatically suggest or fill in the right unit of measure based on the user's language.

Where it appears: - On the language form, right after the Translatable field, you will see the new Default Units field.

It touches the language settings and the units of measure used by products. No new menus or reports are added.

Depends on

product
Models and fields (1)
  • res.lang · extends an existing modeldefault_uom_ids (Default Units)

Text generated by AI (DeepSeek) from reading the Odoo 12.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 1 confirmed, 8 with no information of 9 versions.

Sources · Odoo 12.0

Confirmed on 2026-11-03 in branch 12.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 12.0

Set default unit of measures in the Languages menu in settings.

Fields that want to implement the language default should use the provided method,such as in the below example:

class MyModel(models.Model):
    _name = 'my.model'
    time_uom_id = fields.Many2one(
        string='Time Units',
        comodel_name='product.uom',
        default=lambda s: s.env['res.lang'].default_uom_by_category('Time'),
    )

No verified information in OCA: Installation.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.