Sale Product Pack
sale_product_pack · OCA/product-pack
Health
90/100
good
-
Security25/25No findings
-
Activity25/25Last human commit 4 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 8 Odoo series since 12.0
Heuristic over the facts below, not an audit · How it's computed
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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 3
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_discountFloatdigits='Discount' args: 'Sale discount (%)'
-
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_linesBooleancompute='_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_idsOne2many → sale.order.lineargs: 'sale.order.line', 'pack_parent_line_id', 'Lines in pack' -
pack_component_priceSelectionrelated='product_id.pack_component_price' -
pack_depthIntegerhelp='Depth of the product if it is part of a pack.' args: 'Depth' -
pack_modifiableBooleanhelp='The parent pack is modifiable' -
pack_parent_line_idMany2one → sale.order.linehelp='The pack that contains this product.'index=True args: 'sale.order.line', 'Pack' -
pack_typeSelectionrelated='product_id.pack_type'
-
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_multiOnly 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…