Repository
odoo/odoo · module folder
Module version
1.0
Category
Sales/Sales
Folder size
0.69 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
None
Last tracking update
2026-08-15 22:44:21
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Raphael Collet, Odoo Translation Bot, Julien Castiaux, Victor Feyens, Anh Thao Pham (pta), svs-odoo, Rémy Voet (ryv), Tiffany Chang (tic), Gorash, Victor Piryns (pivi), Dylan Kiss (dyki), Nguyễn Đại Dương, omra-odoo, lase@odoo.com, Julien Carion (juca), Lina (liew), Agustin Castro Bugallo, aamo-odoo, Mohammad Abdulmoneim (abdu), djameltouati, Bastien PIERRE, Michaël Mattiello, Krzysztof Magusiak (krma), Ester Andreetto, path-odoo, Joe Wesnofske, saurabh, Mathias Mathy
Odoo dependencies
odoo/odoo:
Python dependencies
None
System dependencies
None
Required by
analytic, barcodes_gs1_nomenclature, fieldservice_size, hr_timesheet, l10n_cl, lims, partner_uom_mapping, product, report_qweb_field_option, sale_blanket_order, tms, uom_alias, uom_unece
Description
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.list uom.uom list New
uom_uom_view_search uom.uom.view.search uom.uom search New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (1)

New fields (9)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • factor Float
    compute='_compute_factor' digits=0 recursive=True store=True args: 'Absolute Quantity'
  • name Char
    required=True translate=True args: 'Unit Name'
  • parent_path Char
    index=True
  • related_uom_ids One2many → uom.uom
    args: 'uom.uom', 'relative_uom_id', 'Related UoMs'
  • relative_factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference UoM for this unit' required=True args: 'Contains'
  • relative_uom_id Many2one → uom.uom
    index='btree_not_null' ondelete='cascade' args: 'uom.uom', 'Reference Unit'
  • rounding Float
    compute='_compute_rounding' args: 'Rounding Precision'
  • sequence Integer
    compute='_compute_sequence' precompute=True readonly=False store=True
Public methods (3)
  • compare(self, value1: float, value2: float) -> <expr>
    Compare two measures after rounding them with the 'Product Unit' precision :param value1: origin value to compare :param value2: value to compare to :return: -1, 0 or 1, if ``value1`` is lower than, equal to, or greater than ``value2``.
  • is_zero(self, value: float) -> bool
    Check if the value is zero after rounding with the 'Product Unit' precision
  • round(self, value: float, rounding_method: RoundingMethod='HALF-UP') -> float
    Round the value using the 'Product Unit' precision

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…