TIP: You can type at any time to perform a new search.
sale_order_line_section
sale_order_line_section · OCA/sale-workflow
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `WITH ordered_lines AS ( SELECT sol.id, sol.display_type, MAX(CASE WHEN sol.display_type = 'line_section' THEN sol.id END) OVER ( PARTITION BY sol.order_id ORDER BY sol.sequence, sol.id ROWS BETWEEN UNBOUNDED PRECEDING AND 1 PRECEDING ) AS previous_section_id FROM sale_order_line sol ) UPDATE sale_order_line sol SET section_id = CASE WHEN ol.display_type = 'line_section' THEN NULL ELSE ol.previous_section_id END FROM ordered_lines ol WHERE sol.id = ol.id` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
Migration review checklist, not a compatibility verdict. No target version is selected: apply version-specific advice only when migrating to that version or later.
- Repository
- OCA/sale-workflow · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Sale
- Folder size
- 0.04 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-07 09:06:23
- Authors
- Camptocamp, Odoo Community Association (OCA)
- Maintainers
- Camptocamp, Odoo Community Association (OCA)
- Committers
- Weblate, OCA-git-bot, oca-ci, santostelmo
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- None
- Description
This module adds a stored Section field on sale order lines. In standard Odoo, the relation between a line and its section is only implicit: a line belongs to the nearest previous section according to the order sequence. This is inconvenient for domains, grouping, reporting, or custom business logic because there is no direct field to use. With this module, each non-section sale order line is linked to its nearest previous section line. Typical use cases include: - grouping sale order lines by section in tree views, exports, or reports; - filtering all lines that belong to a given section without recomputing the relation from the sequence;
Code Analysis
Views touched (1)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_order_form |
sale.order | form | Inherits sale.view_order_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (1)
New fields (1)
-
section_idMany2one → sale.order.linecomodel_name='sale.order.line'compute='_compute_section_id'compute_sudo=Trueindex=Truestore=Truestring='Section'
No public methods.