Purchase Order Secondary Unit

purchase_order_secondary_unit
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/18.0/purchase_order_secondary_unit
VERSION
VERSION 1.2.2
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, pilarvargas-tecnativa, Aungkokolin1997, yostashiro, rjaraspearhead
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - html_editor
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of purchase orders to allow buy
products in secondary unit of distinct category.

Users can enter quantities and prices in secondary units on purchase order lines. Vendor
pricelist records are also extended to support secondary unit pricing.

Purchase reports and the Purchase Order portal are adjusted to display quantities and prices
in secondary units based on company configuration.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_supplierinfo_form_view product.supplierinfo.form.view product.supplierinfo xpath Inherits product.product_supplierinfo_form_view
product_supplierinfo_tree_view product.supplierinfo.list.view product.supplierinfo xpath Inherits product.product_supplierinfo_tree_view
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
Models touched (5)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="['|', ('product_id', '=', id),'&', ('product_tmpl_id', '=', product_tmpl_id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (2)
  • secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="[('product_tmpl_id', '=', product_tmpl_id)]" string='Secondary Unit'
  • secondary_uom_price Float
    compute='_compute_secondary_uom_price' digits='Product Price' inverse='_inverse_secondary_uom_price' store=True string='Secondary Price'
Public methods (0)

No public methods.

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (4)
  • product_packaging_id Many2one
    compute='_compute_product_packaging_id' precompute=True store=True
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' precompute=True store=True
  • product_qty Float
    compute='_compute_product_qty' copy=True precompute=True readonly=False store=True
  • secondary_uom_price Float
    aggregator='avg' compute='_compute_secondary_uom_price' digits='Product Price' inverse='_inverse_secondary_uom_price' store=True string='Secondary Price'
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/17.0/purchase_order_secondary_unit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, David Alonso // Solvos
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:09
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - onboarding
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of purchase orders to allow buy
products in secondary unit of distinct category.

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
Models touched (3)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="['|', ('product_id', '=', id),'&', ('product_tmpl_id', '=', product_tmpl_id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (3)
  • product_packaging_id Many2one
    compute='_compute_product_packaging_id' precompute=True store=True
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' precompute=True store=True
  • product_qty Float
    compute='_compute_product_qty' copy=True precompute=True readonly=False store=True
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/16.0/purchase_order_secondary_unit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, David Alonso // Solvos
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:55
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
Models touched (3)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="['|', ('product_id', '=', id),'&', ('product_tmpl_id', '=', product_tmpl_id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (3)
  • product_packaging_id Many2one
    compute='_compute_product_packaging_id' precompute=True store=True
  • product_packaging_qty Float
    compute='_compute_product_packaging_qty' precompute=True store=True
  • product_qty Float
    compute='_compute_product_qty' copy=True precompute=True readonly=False store=True
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/15.0/purchase_order_secondary_unit
VERSION
VERSION 1.4.1
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSCarlos Dauden, sergio-teruel, Ernesto Tejeda, Weblate, OCA-git-bot, oca-ci, pilarvargas-tecnativa, Héctor Vi Or
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:40
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (4)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
report_purchaseorder_document report_purchaseorder_document ir.ui.view qweb Inherits purchase.report_purchaseorder_document
report_purchasequotation_document report_purchasequotation_document ir.ui.view qweb Inherits purchase.report_purchasequotation_document
Models touched (3)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="['|', ('product_id', '=', id),'&', ('product_tmpl_id', '=', product_tmpl_id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • product_qty Float
    compute='_compute_product_qty' copy=True readonly=False store=True
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/14.0/purchase_order_secondary_unit
VERSION
VERSION 2.0.1
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Héctor Villarreal Ortega, Surachet Saejueng
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
Models touched (2)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • product_qty Float
    compute='_compute_product_qty' copy=True readonly=False store=True
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/13.0/purchase_order_secondary_unit
VERSION
VERSION 2.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, OCA Transbot, sergio-teruel, oca-travis, OCA-git-bot, oca-ci, Kitti U, ps-tubtim
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - product
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
Models touched (2)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' copy=False string='Default secondary unit for purchases'
Public methods (0)

No public methods.

New fields (1)
  • product_qty Float
    compute='_compute_product_qty' copy=True readonly=False store=True
Public methods (2)
  • onchange_product_id(self)
    @api.onchange('product_id')
    If default purchases secondary unit set on product, put on secondary quantity 1 for being the default quantity. We override this method, that is the one that sets by default 1 on the other quantity with that purpose.
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/12.0/purchase_order_secondary_unit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSOCA Transbot, oca-travis, Weblate, OCA-git-bot, Nikul-Chaudhary
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:23
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - account
    - base_setup
    - base
    - web
    - product
    - decimal_precision
    - mail
    - bus
    - web_tour
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
Models touched (2)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' string='Default unit purchase'
Public methods (0)

No public methods.

New fields (2)
  • secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' ondelete='restrict' string='Secondary uom'
  • secondary_uom_qty Float
    digits=dp.get_precision('Product Unit of Measure') string='Secondary Qty'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/purchase-workflow
GIT
GIThttps://github.com/OCA/purchase-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/purchase-workflow/tree/11.0/purchase_order_secondary_unit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSPedro M. Baeza, GitHub, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/purchase-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - purchase
    - stock_account
    - stock
    - product
    - base
    - decimal_precision
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - barcodes
    - web_planner
    - account
    - analytic
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (2)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order xpath Inherits purchase.purchase_order_form
Models touched (2)

New fields (1)
  • purchase_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' string='Default unit purchase'
Public methods (0)

No public methods.

New fields (2)
  • secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' ondelete='restrict' string='Secondary uom'
  • secondary_uom_qty Float
    digits=dp.get_precision('Product Unit of Measure') string='Secondary Qty'
Public methods (0)

No public methods.

STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/purchase-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG]: purchase_order_secondary_unit (#2968)