TIP: You can type at any time to perform a new search.
Sale Order - Ordered Weight
sale_order_ordered_weight · OCA/sale-workflow
Security findings
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE sale_order_line SET total_ordered_weight = ( product.weight * sale_order_line.product_uom_qty / line_uom.factor * template_uom.factor ), total_delivered_weight = ( product.weight * sale_order_line.qty_delivered / line_uom.factor * template_uom.factor ) FROM product_product product, product_template template, uom_uom as template_uom, uom_uom as line_uom WHERE product.id = sale_order_line.product_id AND template.id = product.product_tmpl_id AND template.uom_id = template_uom.id AND sale_order_line.product_uom = line_uom.id AND product.weight != 0;` - re-check the table/column names still match after upgrading. migration-raw-sql-write · source
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE sale_order SET total_ordered_weight = tmp.total_ordered_weight, total_delivered_weight = tmp.total_delivered_weight FROM ( SELECT order_id, sum(total_ordered_weight) as total_ordered_weight, sum(total_delivered_weight) as total_delivered_weight FROM sale_order_line group by order_id ) as tmp WHERE tmp.order_id = sale_order.id AND (tmp.total_ordered_weight != 0.0 OR tmp.total_delivered_weight != 0.0);` - 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
- Sales
- Folder size
- 0.15 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/sale-workflow
- Last tracking update
- 2026-08-07 08:09:12
- Authors
- Odoo Community Association (OCA), GRAP, Xtendoo
- Maintainers
- Odoo Community Association (OCA), GRAP, Xtendoo
- Committers
- Sylvain LE GAL, OCA-git-bot, oca-ci
Code Analysis
Views touched (5)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
report_saleorder_document |
report_saleorder_document | ir.ui.view | qweb | Inherits sale.report_saleorder_document |
res_config_settings_view_form |
res.config.settings | form | Inherits account.res_config_settings_view_form | |
sale_order_view_form |
sale.order | form | Inherits sale.view_order_form | |
sale_order_view_tree |
sale.order | form | Inherits sale.view_order_tree | |
sale_order_view_tree_quotation |
sale.order | form | Inherits sale.view_quotation_tree |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (4)
New fields (2)
-
display_line_weight_on_sale_reportBooleandefault=False -
display_order_weight_on_sale_reportBooleandefault=True
No public methods.
New fields (2)
-
display_line_weight_on_sale_reportBooleanreadonly=Falserelated='company_id.display_line_weight_on_sale_report' -
display_order_weight_on_sale_reportBooleanreadonly=Falserelated='company_id.display_order_weight_on_sale_report'
No public methods.
New fields (1)
-
total_ordered_weightFloatcompute='_compute_total_ordered_weight'store=Truestring='Ordered Weight'
No public methods.
New fields (1)
-
total_ordered_weightFloatcompute='_compute_total_ordered_weight'store=Truestring='Ordered Weight'
No public methods.