Sale delivery State
sale_delivery_state · OCA/sale-workflow
-
Security25/25No findings
-
Activity25/25Last human commit 1 month ago
-
Required by15/251 module depends on it
-
Maturity25/25In 8 Odoo series since 12.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 skip_sale_delivery_state = False` - 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 odoo module add delivery state on the sale order.
Delivery state is computed based on qty_delivered field on sale order lines.
This is usefull for other modules to provide the state of delivery. The state of the sale order can be forced to fully delivered in case some quantities were cancelled by the customer and you consider you have nothing more to deliver.
Sale order lines can have products or services, as long as the field qty_delivered is set, it will trigger the computation of delivery state.
Sale order lines with the Skip Delivery State field set to True will be ignored when computing the delivery state. This field is automatically set depending on the field Sales > Configuration > Quotations & Orders > Skip Service products for Sale Delivery State. If set to True, the field Skip Delivery State in sale order lines containing service products will be automatically set to True, but it can manually changed.
This module also works with delivery.carrier fees that are added as a sale order line. Thoses line are special as they will never be considered delivered. Delivery fees lines are ignored in the computation of the delivery state.
When the 'sale_stock' module is installed, the glue module 'sale_stock_delivery_state' should also be installed; this module is designed to override the compute method of the delivery status field from 'sale_stock'.
Dependencies
Code analysis
Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.
Views touched 4
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
sale_delivery_state_res_config_settings_view_form |
sale.delivery.state.res.config.settings.view.form | res.config.settings | form | Inherits sale.res_config_settings_view_form |
sale_order_view_search_inherit_sale_inherit_delivery_status |
sale.order.search | sale.order | search | Inherits sale.sale_order_view_search_inherit_sale |
view_order_form_inherit_delivery_state |
sale.order.form.sale.stock | sale.order | form | Inherits sale.view_order_form |
view_order_tree_inherit_delivery_status |
sale.order.tree | sale.order | tree | Inherits sale.view_order_tree |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 4
-
skip_service_sale_delivery_stateBooleanstring='Skip Service products for Sale Delivery State'
No public methods.
-
skip_service_sale_delivery_stateBooleanreadonly=Falserelated='company_id.skip_service_sale_delivery_state'string='Skip Service products for Sale Delivery State'
No public methods.
-
delivery_statusSelectioncompute='_compute_oca_delivery_status'selection=[('pending', 'Not Delivered'), ('started', 'Started'), ('partial', 'Partially Delivered'), ('full', 'Fully Delivered')]store=True -
force_delivery_stateBooleanhelp='Allow to enforce done state of delivery, for instance if some quantities were cancelled'
-
action_force_delivery_state(self) -
action_unforce_delivery_state(self)
-
skip_sale_delivery_stateBooleancompute='_compute_skip_sale_delivery_state'readonly=Falsestore=Truestring='Skip Delivery State'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…