Skip to content
Health
90/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 4 months ago
  • Required by15/25
    1 module depends on it
  • Maturity25/25
    In 8 Odoo series since 12.0

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

Security findings
Grave / minor (static analysis)
Required by
1
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.1 MB
Module directory on disk
Code analysis 0 migration notes 3 models 3 views 0 HTTP endpoints

Description

This module adds Product Pack functionality to sales orders. You can choose a Pack in sales 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
sale_stock_product_pack

Code analysis

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

Views touched 3

XML IDNameModelTypeStatus
product_pack_line_form product.pack.line.sale.form product.pack.line form Inherits product_pack.product_pack_line_form
product_pack_line_tree product.pack.line.sale.tree product.pack.line tree Inherits product_pack.product_pack_line_tree
view_order_form sale.order form Inherits sale.view_order_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 3

New fields (1)
  • sale_discount Float
    digits='Discount' args: 'Sale discount (%)'
Public methods (1)
  • get_sale_order_line_vals(self, line, order)

New fields (0)

No new fields.

Public methods (2)
  • check_pack_line_unlink(self)
    @api.onchange('order_line')
    At least on embeded tree editable view odoo returns a recordset on _origin.order_line only when lines are unlinked and this is exactly what we need
  • 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 → sale.order.line
    args: 'sale.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 → sale.order.line
    help='The pack that contains this product.' index=True args: 'sale.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', 'discount', 'name', 'tax_ids')
    Do not let to edit a sale order line if this one belongs to pack
  • create(self, vals_list)
    @api.model_create_multi
    Only when strictly necessary (a product is a pack) will be created line by line, this is necessary to maintain the correct order.
  • expand_pack_line(self, write=False)
  • write(self, vals)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…