Locale - Default UoM

Locale - Default UoM

by Contaura LLC · original work by LasLabs, OCA
base_locale_uom_default
$ 29.00

This provides settings to select default UoMs at the language level.

1.0

One purchase covers every version. Already bought it? Sign in.

Locale - Default UoM

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.

Table of contents

Configuration

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

Usage

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'),
    )
Technical namebase_locale_uom_default
Module version12.0.1.0.1
Tulio versions1.0
CategoryTools
PublisherContaura LLC
Ported to Tulio, tested and supported by Contaura LLC.
Original authorsLasLabs, OCA
LicenseLGPL-3
Open source: you may use, change and share this module under its license. The price covers the Tulio port, its testing on Tulio 1.0 and the download.
Requires (Tulio core)product
Lines of code141
Downloads0
Released12/06/2026
12.0.1.0.1 Tulio 1.0 · 12/06/2026