Units of measure

uom
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/19.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo S.A.
MAINTAINERS
MAINTAINERSOdoo S.A.
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Julien Castiaux, Victor Feyens, Anh Thao Pham (pta), svs-odoo, Tiffany Chang (tic), Rémy Voet (ryv), 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, Michaël Mattiello, Bastien PIERRE, Krzysztof Magusiak (krma), Ester Andreetto, path-odoo, Joe Wesnofske, saurabh, Mathias Mathy
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:51:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/18.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Odoo Online, Anh Thao Pham (pta), Tiffany Chang (tic), Gorash, Louis Baudoux, Mathieu Walravens, Vincent Larcin, Louis Wicket (wil), Antoine Boonen, Dylan Kiss (dyki), Nguyễn Đại Dương, Louis (wil), Mohammad Abdulmoneim (abdu)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:25:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.list uom.category list New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.list uom.uom list New
uom_categ_view_search uom.category.view.search uom.category search 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 (2)

New fields (3)
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
  • reference_uom_id Many2one → uom.uom
    store=False args: 'uom.uom', 'Reference UoM'
  • uom_ids One2many → uom.uom
    args: 'uom.uom', 'category_id'
Public methods (0)

No public methods.

New fields (9)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='restrict' required=True args: 'uom.category', 'Category'
  • color Integer
    compute='_compute_color' args: 'Color'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • ratio Float
    compute='_compute_ratio' inverse='_set_ratio' store=False args: 'Combined Ratio'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=True args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/17.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Xavier Morel, Odoo Online, Victor Feyens, Anh Thao Pham (pta), Tiffany Chang (tic), Rémy Voet (ryv), Gorash, Mathieu Walravens, Louis Wicket (wil), Dylan Kiss (dyki), Mohit Beniwal, Nguyễn Đại Dương, Louis (wil), Mohammad Abdulmoneim (abdu)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 01:02:10
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.tree uom.category tree New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree New
uom_categ_view_search uom.category.view.search uom.category search 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 (2)

New fields (3)
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
  • reference_uom_id Many2one → uom.uom
    store=False args: 'uom.uom', 'Reference UoM'
  • uom_ids One2many → uom.uom
    args: 'uom.uom', 'category_id'
Public methods (0)

No public methods.

New fields (9)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='restrict' required=True args: 'uom.category', 'Category'
  • color Integer
    compute='_compute_color' args: 'Color'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • ratio Float
    compute='_compute_ratio' inverse='_set_ratio' store=False args: 'Combined Ratio'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=True args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/16.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Fabien Pinckaers, Victor Feyens, svs-odoo, Touati Djamel (otd), Tiffany Chang (tic), Mathieu Walravens, Mohit Beniwal, Nguyễn Đại Dương, Mohammad Abdulmoneim (abdu)
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:54
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.tree uom.category tree New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree New
uom_categ_view_search uom.category.view.search uom.category search 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 (2)

New fields (3)
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
  • reference_uom_id Many2one → uom.uom
    store=False args: 'uom.uom', 'Reference UoM'
  • uom_ids One2many → uom.uom
    args: 'uom.uom', 'category_id'
Public methods (0)

No public methods.

New fields (9)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='restrict' required=True args: 'uom.category', 'Category'
  • color Integer
    compute='_compute_color' args: 'Color'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • ratio Float
    compute='_compute_ratio' inverse='_set_ratio' store=False args: 'Combined Ratio'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=True args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/15.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, GitHub, Christophe Monniez, Arnold Moyaux, Xavier-Do, Victor Feyens, svs-odoo, Ivan Yelizariev, Touati Djamel (otd), Pratima Gupta, yhu-odoo, Mathieu Walravens, Mohit Beniwal
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:25:30
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.tree uom.category tree New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree New
uom_categ_view_search uom.category.view.search uom.category search 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 (2)

New fields (3)
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
  • reference_uom_id Many2one → uom.uom
    help='Dummy field to keep track of reference uom change' store=False args: 'uom.uom', 'Reference UoM'
  • uom_ids One2many → uom.uom
    args: 'uom.uom', 'category_id'
Public methods (0)

No public methods.

New fields (9)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='restrict' required=True args: 'uom.category', 'Category'
  • color Integer
    compute='_compute_color' args: 'Color'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • ratio Float
    compute='_compute_ratio' inverse='_set_ratio' store=False args: 'Combined Ratio'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=True args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/14.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Olivier Dony, Christophe Simonis, Simon Lejeune, GitHub, Barad Mahendra, Yannick Tivisse, Pierre Masereel, Arnold Moyaux, Julien Castiaux, Xavier-Do, Victor Feyens, Ivan Yelizariev, nie, yhu-odoo
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:14:31
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.tree uom.category tree New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree 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 (2)

New fields (1)
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
Public methods (1)
  • unlink(self)

New fields (7)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='cascade' required=True args: 'uom.category', 'Category'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=1 args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/13.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales/Sales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSOdoo Translation Bot, Martin Trigaux, Christophe Simonis, Xavier Morel, Simon Lejeune, Damien Bouvy, Yannick Tivisse, jem-odoo, Adrian Torres, Xavier-Do, Ivan Yelizariev, Kevin Baptiste
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:06:44
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_categ_tree_view uom.category.tree uom.category tree New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree 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 (2)

New fields (2)
  • measure_type Selection
    string='Type of Measure' args: [('unit', 'Default Units'), ('weight', 'Default Weight'), ('working_time', 'Default Working Time'), ('length', 'Default Length'), ('volume', 'Default Volume')]
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
Public methods (1)
  • unlink(self)

New fields (8)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='cascade' required=True args: 'uom.category', 'Category'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • measure_type Selection
    readonly=True related='category_id.measure_type' store=True string='Type of measurement category'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=1 args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • unlink(self)
  • write(self, values)
REPOSITORY
REPOSITORYodoo/odoo
GIT
GIThttps://github.com/odoo/odoo.git
GIT FOLDER
GIT FOLDERhttps://github.com/odoo/odoo/tree/12.0/uom
VERSION
VERSION 1.0
CATEGORY
CATEGORYSales
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORS
MAINTAINERS
MAINTAINERS
COMMITTERS
COMMITTERSRaphael Collet, Odoo Translation Bot, Martin Trigaux, Christophe Simonis, Yannick Tivisse, Pierre Masereel, jem-odoo, Nans Lefebvre, XavierDo, Xavier-Do, Fanny He, William Henrotin, Ivan Yelizariev
WEBSITE
WEBSITE
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-05 23:57:02
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This is the base module for managing Units of measure.
========================================================================
    

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_uom_categ_form_view uom.category.form uom.category form New
product_uom_form_view uom.uom.form uom.uom form New
product_uom_tree_view uom.uom.tree uom.uom tree New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (2)

New fields (2)
  • measure_type Selection
    string='Type of Measure' args: [('unit', 'Units'), ('weight', 'Weight'), ('time', 'Time'), ('length', 'Length'), ('volume', 'Volume')]
  • name Char
    required=True translate=True args: 'Unit of Measure Category'
Public methods (1)
  • unlink(self)
    @api.multi

New fields (8)
  • active Boolean
    default=True help='Uncheck the active field to disable a unit of measure without deleting it.' args: 'Active'
  • category_id Many2one → uom.category
    help='Conversion between Units of Measure can only occur if they belong to the same category. The conversion will be made based on the ratios.' ondelete='cascade' required=True args: 'uom.category', 'Category'
  • factor Float
    default=1.0 digits=0 help='How much bigger or smaller this unit is compared to the reference Unit of Measure for this category: 1 * (reference unit) = ratio * (this unit)' required=True args: 'Ratio'
  • factor_inv Float
    compute='_compute_factor_inv' digits=0 help='How many times this Unit of Measure is bigger than the reference Unit of Measure in this category: 1 * (this unit) = ratio * (reference unit)' readonly=True required=True args: 'Bigger Ratio'
  • measure_type Selection
    readonly=True related='category_id.measure_type' store=True string='Type of measurement category'
  • name Char
    required=True translate=True args: 'Unit of Measure'
  • rounding Float
    default=0.01 digits=0 help='The computed quantity will be a multiple of this value. Use 1.0 for a Unit of Measure that cannot be further split, such as a piece.' required=True args: 'Rounding Precision'
  • uom_type Selection
    default='reference' required=1 args: [('bigger', 'Bigger than the reference Unit of Measure'), ('reference', 'Reference Unit of Measure for this category'), ('smaller', 'Smaller than the reference Unit of Measure')], 'Type'
Public methods (4)
  • create(self, vals_list)
    @api.model_create_multi
  • name_create(self, name)
    @api.model
    The UoM category and factor are required, so we'll have to add temporary values for imported UoMs
  • unlink(self)
    @api.multi
  • write(self, values)
    @api.multi