Skip to content
Health
68/100
fair
  • Security25/25
    No findings
  • Activity20/25
    Last human commit 9 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity18/25
    In 3 Odoo series since 16.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.07 MB
Module directory on disk
Code analysis 1 migration note 4 models 1 view 0 HTTP endpoints

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.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 1

XML IDNameModelTypeStatus
purchase_order_form purchase.order form Inherits purchase.purchase_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

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_id', 'price_unit', 'name', 'tax_ids')
    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)

Loading…

Loading…

Loading…