Purchase Product Pack

purchase_product_pack
REPOSITORY
REPOSITORYOCA/product-pack
GIT
GIThttps://github.com/OCA/product-pack.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/product-pack/tree/18.0/purchase_product_pack
VERSION
VERSION 1.0.1
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Weblate, OCA-git-bot, oca-ci, matteo.tognini
WEBSITE
WEBSITEhttps://github.com/OCA/product-pack
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:18
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-pack:
    - product_pack
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - html_editor
    - uom
    - purchase
    - account
    - onboarding
    - 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 adds *Product Pack* functionality to purchase orders. You
can choose a *Pack* in *purchase order lines* and see different
behaviors depending on "Pack type" and "Pack component price" fields
options selected on this *Pack*.

Code Analysis

Views touched (1)
XML IDNameModelTypeStatus
purchase_order_form purchase.order xpath Inherits purchase.purchase_order_form
Models touched (4)

New fields (0)

No new fields.

Public methods (2)
  • get_purchase_order_line_vals(self, line, order)
  • get_seller_cost(self, line)
    This function returns the cost of pack lines if they has seller or not

New fields (0)

No new fields.

Public methods (1)
  • pack_cost_compute(self, line)
    This function computes the cost of a product based on the options on pack

New fields (0)

No new fields.

Public methods (3)
  • check_pack_line_unlink(self)
    @api.onchange('order_line')
  • copy_data(self, default=None)
  • write(self, vals)

New fields (7)
  • do_no_expand_pack_lines Boolean
    compute='_compute_do_no_expand_pack_lines' help='Technical field in order to check if pack lines has to be expanded'
  • pack_child_line_ids One2many → purchase.order.line
    args: 'purchase.order.line', 'pack_parent_line_id', 'Lines in pack'
  • pack_component_price Selection
    related='product_id.pack_component_price'
  • pack_depth Integer
    help='Depth of the product if it is part of a pack.' args: 'Depth'
  • pack_modifiable Boolean
    help='The parent pack is modifiable'
  • pack_parent_line_id Many2one → purchase.order.line
    help='The pack that contains this product.' args: 'purchase.order.line', 'Pack'
  • pack_type Selection
    related='product_id.pack_type'
Public methods (5)
  • action_open_parent_pack_product_view(self)
  • check_pack_line_modify(self)
    @api.onchange('product_id', 'product_uom_qty', 'product_uom', 'price_unit', 'name', 'taxes_id')
    Do not let to edit a purchase order line if this one belongs to pack
  • create(self, vals_list)
    @api.model_create_multi
  • expand_pack_line(self, write=False)
    Expand a purchase order line that represents a pack. This method is used to expand a purchase order line that represents a pack. It creates individual purchase order lines for the components of the pack and adds them to the purchase order.
  • write(self, vals)
REPOSITORY
REPOSITORYOCA/product-pack
GIT
GIThttps://github.com/OCA/product-pack.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/product-pack/tree/16.0/purchase_product_pack
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYPurchase
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Camptocamp
COMMITTERS
COMMITTERSWeblate, oca-ci, duongtq
WEBSITE
WEBSITEhttps://github.com/OCA/product-pack
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/product-pack:
    - product_pack
odoo/odoo:
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - purchase
    - account
    - 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 (1)
XML IDNameModelTypeStatus
purchase_order_form purchase.order xpath Inherits purchase.purchase_order_form
Models touched (4)

New fields (0)

No new fields.

Public methods (2)
  • get_purchase_order_line_vals(self, line, order)
  • get_seller_cost(self, line)
    This function returns the cost of pack lines if they has seller or not

New fields (0)

No new fields.

Public methods (1)
  • pack_cost_compute(self, line)
    This function computes the cost of a product based on the options on pack

New fields (0)

No new fields.

Public methods (3)
  • check_pack_line_unlink(self)
    @api.onchange('order_line')
  • copy_data(self, default=None)
  • write(self, vals)

New fields (7)
  • do_no_expand_pack_lines Boolean
    compute='_compute_do_no_expand_pack_lines' help='This is a technical field in order to check if pack lines has to be expanded'
  • pack_child_line_ids One2many → purchase.order.line
    args: 'purchase.order.line', 'pack_parent_line_id', 'Lines in pack'
  • pack_component_price Selection
    related='product_id.pack_component_price'
  • pack_depth Integer
    help='Depth of the product if it is part of a pack.' args: 'Depth'
  • pack_modifiable Boolean
    help='The parent pack is modifiable'
  • pack_parent_line_id Many2one → purchase.order.line
    help='The pack that contains this product.' args: 'purchase.order.line', 'Pack'
  • pack_type Selection
    related='product_id.pack_type'
Public methods (5)
  • action_open_parent_pack_product_view(self)
  • check_pack_line_modify(self)
    @api.onchange('product_id', 'product_uom_qty', 'product_uom', 'price_unit', 'name', 'taxes_id')
    Do not let to edit a purchase order line if this one belongs to pack
  • create(self, vals_list)
    @api.model_create_multi
  • expand_pack_line(self, write=False)
    Expand a purchase order line that represents a pack. This method is used to expand a purchase order line that represents a pack. It creates individual purchase order lines for the components of the pack and adds them to the purchase order.
  • write(self, vals)
STATUS
STATUSOpen migration PR - not merged yet for this version
REPOSITORY
REPOSITORYOCA/product-pack
PULL REQUEST
PULL REQUEST[19.0][MIG] purchase_product_pack: Migration to 19.0 (#237)