$ 29.00
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 name | base_locale_uom_default |
|---|---|
| Module version | 12.0.1.0.1 |
| Tulio versions | 1.0 |
| Category | Tools |
| Publisher | Contaura LLC
Ported to Tulio, tested and supported by Contaura LLC. |
| Original authors | LasLabs, OCA |
| License | LGPL-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 code | 141 |
| Downloads | 0 |
| Released | 12/06/2026 |