Purchase Product Pack
purchase_product_pack · OCA/product-pack
Health
68/100
fair
-
Security25/25No findings
-
Activity20/25Last human commit 9 months ago
-
Required by5/250 modules depend on it
-
Maturity18/25In 3 Odoo series since 16.0
Heuristic over the facts below, not an audit · How it's computed
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
Migration considerations
purchase_order_form— Since 17.0: `attrs=`/`states=` are rejected in views: convert them to Python expressions in `invisible`/`readonly`/`required`, keeping the original AND/OR logic. migration-view-attrs-states · source
Migration review checklist, not a compatibility verdict. "Migrating to X.0" applies once you upgrade to that version; "Since X.0" means this version already ignores or rejects that code. Methodology
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
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 1
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_linesBooleancompute='_compute_do_no_expand_pack_lines'help='Technical field in order to check if pack lines has to be expanded' -
pack_child_line_idsOne2many → purchase.order.lineargs: 'purchase.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 → purchase.order.linehelp='The pack that contains this product.' args: 'purchase.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', '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…