Attached products in sales
sale_attached_product · OCA/sale-workflow
Health
75/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 7 months ago
-
Required by5/250 modules depend on it
-
Maturity25/25In 5 Odoo series since 13.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.06 MB
Module directory on disk
Code analysis
0 migration notes
4 models
1 view
0 HTTP endpoints
Description
This module allows to define a set of products which will be added automatically to the sales order whenever that product is present on it.
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 |
|---|---|---|---|---|
product_template_form_view |
product.template | form | Inherits product.product_template_form_view |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
New fields (1)
-
attached_product_idsMany2many → product.productcomodel_name='product.product'help="Similar to optional products, although they're added automatically to thesale order and optionally removed when the main product goes away."relation='product_attached_rel'string='Attached Products'
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
New fields (0)
No new fields.
Public methods (3)-
create(self, vals_list)@api.model_create_multi -
recompute_attached_products(self)Recurrent method for recomputing attached lines. Always done in these three steps: 1. A cleanup of orphaned attached lines or attached lines that doesn't match their parent attached products anymore. 2. Creating new attached lines from lines which don't have them. 3. Updating existing attached lines. Mainly for quantity -
write(self, vals)
New fields (3)
-
attached_from_line_idMany2one → sale.order.linecomodel_name='sale.order.line' -
attached_line_idsOne2many → sale.order.linecomodel_name='sale.order.line'inverse_name='attached_from_line_id' -
is_attached_lineBooleanhelp='Flag products that are attached to their main counterpart'
-
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
Loading…
Loading…
Loading…
Loading…