Sale Order Line Cancel
sale_order_line_cancel · OCA/sale-workflow
-
Security25/25No findings
-
Activity25/25Last human commit 5 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 4 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
Migration considerations
- Raw `cr.execute()` INSERT/UPDATE/DELETE bypasses the ORM (no compute/constrains/tracking/mail): `UPDATE sale_order_line SET product_qty_remains_to_deliver = product_uom_qty - qty_delivered` - re-check the table/column names still match after upgrading. migration-raw-sql-write · 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 allows you to cancel the remaining quantity on sale order by adding a dedicated action to sale lines. It also add two new fields to track canceled and remaining to deliver quantities.
This module differs from the original odoo behavior in the following way:
- In odoo, if the update of the quantity ordered is allowed on the sale order at the confirmed state, odoo will recompute the required stock operations according to the new quantity. This change is possible even the stock operations are started for this sale order line.
- In this module, you can either decide if only the canceled quantity gets tracked or if it also should decrease the original ordered quantity.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 5
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
res_config_settings_form_view |
res.config.settings.form.view | res.config.settings | form | Inherits sale.res_config_settings_view_form |
sale_order_form_view |
sale.order | form | Inherits sale.view_order_form | |
sale_order_line_cancel_view_form |
sale.order.line.cancel | form | New | |
sale_order_line_tree_view |
sale.order.line | tree | Inherits sale.view_order_line_tree | |
sale_order_line_view_form_readonly |
sale.order.line | form | Inherits sale.sale_order_line_view_form_readonly |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 5
-
on_sale_line_cancel_decrease_line_qtyBooleanhelp='On canceling the remaining qty to deliver of an order line it decreases the initial quantity' args: 'On sale order line cancel decrease line quantity'
No public methods.
-
on_sale_line_cancel_decrease_line_qtyBooleanreadonly=Falserelated='company_id.on_sale_line_cancel_decrease_line_qty'
No public methods.
No new fields.
Public methods (1)-
action_draft(self)
-
can_cancel_remaining_qtyBooleancompute='_compute_can_cancel_remaining_qty' -
product_qty_canceledFloatcopy=Falsedigits='Product Unit of Measure'readonly=True args: 'Qty canceled' -
product_qty_remains_to_deliverFloatcompute='_compute_product_qty_remains_to_deliver'digits='Product Unit of Measure'store=Truestring='Remains to deliver'
-
cancel_remaining_qty(self) -
write(self, values)
No new fields.
Public methods (1)-
cancel_remaining_qty(self)
Loading…
Loading…
Loading…
Loading…