TIP: You can type at any time to perform a new search.
Attached products in sales
sale_attached_product · OCA/sale-workflow
- Repository
- OCA/sale-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Sale
- Folder size
- 0.06 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-17 11:19:32
- Authors
- Odoo Community Association (OCA), Tecnativa
- Maintainers
- Odoo Community Association (OCA), Tecnativa
- Committers
- OCA-git-bot, oca-ci, bjouini
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- 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.
Code Analysis ⓘ
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…