Repository
OCA/purchase-workflow · module folder · Try on Runboat
Module version
1.0.0
Category
Purchase
Folder size
0.09 MB
License
AGPL-3
Application
No
Auto-installable
Yes
Website
https://github.com/OCA/purchase-workflow
Last tracking update
2026-08-21 11:28:20
Authors
Odoo Community Association (OCA), Tecnativa
Maintainers
Odoo Community Association (OCA), Tecnativa
Committers
Carlos Lopez, OCA-git-bot, oca-ci
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
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.

Code Analysis

Views touched (6)
XML IDNameModelTypeStatus
product_supplierinfo_form_view product.supplierinfo.form.view product.supplierinfo form Inherits product.product_supplierinfo_form_view
product_supplierinfo_tree_view product.supplierinfo.list.view product.supplierinfo list Inherits product.product_supplierinfo_tree_view
product_template_form_view Product template Secondary Unit product.template form Inherits product.product_template_form_view
purchase_order_form Purchase Order Secondary Unit purchase.order form 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
HTTP endpoints (0)

No HTTP endpoints found for this module.

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 (2)
  • 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 (1)
  • 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.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…