Sale Order Secondary Unit

sale_order_secondary_unit
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/18.0/sale_order_secondary_unit
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSDaniel Reis, Carlos Lopez, Weblate, OCA-git-bot, oca-ci, Carlos Roca
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:11
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of sale orders to allow sale
products in secondary unit of distinct category.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_secondary_unit_view_search product.secondary.unit.view.search product.secondary.unit search New
product_secondary_unit_view_tree product.secondary.unit.sale.view.list product.secondary.unit list New
product_template_form_view Product template Secondary Unit product.template div Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • sale_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 sales'
Public methods (0)

No public methods.

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' compute='_compute_sale_secondary_uom_id' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" inverse='_inverse_sale_secondary_uom_id' store=True string='Default secondary unit for sales'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_sale_secondary_uom_id(self)
    @api.onchange('sale_secondary_uom_id')

New fields (2)
  • product_uom_qty Float
    copy=True
  • secondary_uom_unit_price Float
    compute='_compute_secondary_uom_unit_price' digits='Product Price' string='2nd unit price'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/17.0/sale_order_secondary_unit
VERSION
VERSION 1.0.6
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSDaniel Reis, Carlos Lopez, Weblate, OCA-git-bot, oca-ci, pilarvargas-tecnativa, David Bañón, Martha Rondon
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:05
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - onboarding
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of sale orders to allow sale
products in secondary unit of distinct category.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_secondary_unit_view_search product.secondary.unit.view.search product.secondary.unit search New
product_secondary_unit_view_tree product.secondary.unit.sale.view.tree product.secondary.unit tree New
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • sale_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 sales'
Public methods (0)

No public methods.

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' compute='_compute_sale_secondary_uom_id' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" inverse='_inverse_sale_secondary_uom_id' store=True string='Default secondary unit for sales'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_sale_secondary_uom_id(self)
    @api.onchange('sale_secondary_uom_id')

New fields (2)
  • product_uom_qty Float
    copy=True
  • secondary_uom_unit_price Float
    compute='_compute_secondary_uom_unit_price' digits='Product Price' string='2nd unit price'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/16.0/sale_order_secondary_unit
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYSale
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, Daniel Chionne
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:11:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account_payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - payment
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
This module extends the functionality of sale orders to allow sale
products in secondary unit of distinct category.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_secondary_unit_view_search product.secondary.unit.view.search product.secondary.unit search New
product_secondary_unit_view_tree product.secondary.unit.sale.view.tree product.secondary.unit tree New
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • sale_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 sales'
Public methods (0)

No public methods.

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' compute='_compute_sale_secondary_uom_id' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" inverse='_inverse_sale_secondary_uom_id' store=True string='Default secondary unit for sales'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_sale_secondary_uom_id(self)
    @api.onchange('sale_secondary_uom_id')

New fields (2)
  • product_uom_qty Float
    copy=True
  • secondary_uom_unit_price Float
    compute='_compute_secondary_uom_unit_price' digits='Product Price' string='2nd unit price'
Public methods (0)

No public methods.

REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/15.0/sale_order_secondary_unit
VERSION
VERSION 2.2.2
CATEGORY
CATEGORYSale
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, Carlos Dauden, sergio-teruel, Ernesto Tejeda, Weblate, OCA-git-bot, David, oca-ci, pilarvargas-tecnativa, CarlosRoca13, josep-tecnativa
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:33
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_secondary_unit_view_search product.secondary.unit.view.search product.secondary.unit search New
product_secondary_unit_view_tree product.secondary.unit.sale.view.tree product.secondary.unit tree New
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (3)

New fields (1)
  • sale_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 sales'
Public methods (0)

No public methods.

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' compute='_compute_sale_secondary_uom_id' domain="[('product_tmpl_id', '=', id), ('product_id', '=', False)]" help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" inverse='_inverse_sale_secondary_uom_id' store=True string='Default secondary unit for sales'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • onchange_sale_secondary_uom_id(self)
    @api.onchange('sale_secondary_uom_id')

New fields (2)
  • product_uom_qty Float
    compute='_compute_product_uom_qty' copy=True readonly=False store=True
  • secondary_uom_unit_price Float
    compute='_compute_secondary_uom_unit_price' digits='Product Price' string='2nd unit price'
Public methods (2)
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
  • product_id_change(self)
    @api.onchange('product_id')
    If default sales 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.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/14.0/sale_order_secondary_unit
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYSale
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, Mourad, oca-ci, Alexei Rivera, Kev-Roche, Eduard Brahas, Kévin Roche
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:40:58
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (2)

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' help="In order to set a value, please first add at least one record in 'Secondary Unit of Measure'" string='Default secondary unit for sales'
Public methods (0)

No public methods.

New fields (4)
  • product_uom_qty Float
    compute='_compute_product_uom_qty' copy=True readonly=False store=True
  • secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' ondelete='restrict' string='2nd uom'
  • secondary_uom_qty Float
    digits='Product Unit of Measure' string='2nd Qty'
  • secondary_uom_unit_price Float
    compute='_compute_secondary_uom_unit_price' digits='Product Unit of Measure' readonly=True store=False string='2nd unit price'
Public methods (2)
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
  • product_id_change(self)
    @api.onchange('product_id')
    If default sales 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.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/13.0/sale_order_secondary_unit
VERSION
VERSION 1.3.1
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSEnric Tobella, OCA Transbot, sergio-teruel, Víctor Martínez, Ernesto Tejeda, Thomas Binsfeld, oca-travis, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:12
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - uom
    - analytic
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - digest
    - resource
    - utm
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
product_secondary_unit_view_search product.secondary.unit.view.search product.secondary.unit search New
product_secondary_unit_view_tree product.secondary.unit.sale.view.tree product.secondary.unit tree Inherits product_secondary_unit.product_secondary_unit_view_tree
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (2)

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' copy=False string='Default secondary unit for sales'
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='Product Unit of Measure' string='Secondary Qty'
Public methods (4)
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
  • onchange_secondary_unit_product_uom_qty(self)
    @api.onchange('product_uom_qty')
  • onchange_secondary_uom(self)
    @api.onchange('secondary_uom_id', 'secondary_uom_qty')
  • product_id_change(self)
    @api.onchange('product_id')
    If default sales 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.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/12.0/sale_order_secondary_unit
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSAlexandre Díaz, OCA Transbot, oca-travis, Weblate, OCA-git-bot, Tony Gu
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - payment
    - account
    - product
    - decimal_precision
    - uom
    - analytic
    - portal
    - http_routing
    - digest
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (2)

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' string='Default secondary unit for sales'
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 (4)
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
  • onchange_secondary_unit_product_uom_qty(self)
    @api.onchange('product_uom_qty')
  • onchange_secondary_uom(self)
    @api.onchange('secondary_uom_id', 'secondary_uom_qty')
  • product_id_change(self)
    @api.onchange('product_id')
    If default sales 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.
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/11.0/sale_order_secondary_unit
VERSION
VERSION 1.0.2
CATEGORY
CATEGORYSale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLEYes
AUTHORS
AUTHORSTecnativa, Odoo Community Association (OCA)
MAINTAINERS
MAINTAINERSTecnativa, Odoo Community Association (OCA)
COMMITTERS
COMMITTERSGitHub, OCA Transbot, Sergio Teruel, oca-travis, OCA-git-bot
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:23:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-attribute:
    - product_secondary_unit
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - account
    - product
    - decimal_precision
    - analytic
    - web_planner
    - portal
    - http_routing
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (3)
XML IDNameModelTypeStatus
product_template_form_view Product template Secondary Unit product.template field Inherits product.product_template_form_view
report_saleorder_document report_saleorder_document ir.ui.view qweb Inherits sale.report_saleorder_document
view_order_form Sale Order Secondary Unit sale.order xpath Inherits sale.view_order_form
Models touched (2)

New fields (1)
  • sale_secondary_uom_id Many2one → product.secondary.unit
    comodel_name='product.secondary.unit' string='Default secondary unit for sales'
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 (4)
  • onchange_product_uom_for_secondary(self)
    @api.onchange('product_uom')
  • onchange_secondary_unit_product_uom_qty(self)
    @api.onchange('product_uom_qty')
  • onchange_secondary_uom(self)
    @api.onchange('secondary_uom_id', 'secondary_uom_qty')
  • product_id_change(self)
    @api.onchange('product_id')
    If default sales 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.
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/sale-workflow
PULL REQUEST
PULL REQUEST[19.0][MIG]: sale_order_secondary_unit (#4175)