Sale Manual Delivery
sale_manual_delivery · OCA/sale-workflow
-
Security25/25No findings
-
Activity20/25Last human commit 7 months ago
-
Required by15/251 module depends on it
-
Maturity25/25In 8 Odoo series since 10.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 as sol set qty_procured = r.qty_procured, qty_to_procure = sol.product_uom_qty - r.qty_procured from (select sol.id, sum( case when ( sl.usage = 'customer' and sm.origin_returned_move_id is null or ( sm.origin_returned_move_id is not null and sm.to_refund )) then ROUND( ((sm.product_uom_qty / sm_product_uom.factor) * sol_product_uom.factor), SCALE(%s) ) when ( sl.usage != 'customer' and sm.to_refund ) then ROUND( ((sm.product_uom_qty / sm_product_uom.factor) * sol_product_uom.factor), SCALE(%s) ) * -1 else 0 end) AS qty_procured from sale_order_line as sol inner join ( select sol.id, sm.id as move_id, sm.location_id, sm.location_dest_id from sale_order_line as sol left join stock_move as sm on ( sm.state != 'cancel' and sm.scrap_id is null and sol.product_id = sm.product_id and sm.sale_line_id = sol.id ) ) as q on q.id = sol.id left join stock_move as sm on sm.id = q.move_id left join product_product as pp on pp.id = sol.product_id left join product_template as pt on pt.id = pp.product_tmpl_id left join stock_location as sl on sl.id = q.location_dest_id LEFT JOIN uom_uom sm_product_uom ON sm.product_uom = sm_product_uom.id LEFT JOIN uom_uom sol_product_uom ON sol.product_uom_id = sol_product_uom.id group by sol.id, sm.product_uom, sol.product_uom_id ) as r where r.id = sol.id` - 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
The goal of this module is to allow the manual creation of delivery slips. If activated, a sale order won't directly impact the stock. It will not make a reservation on the stock. It allows the delivery and the impact on stock to be done manually when needed. The goal is to be used on long term projects where not all the material is shipped at once. As you make many shipments, every time you make a new delivery, you can choose an new carrier as well as a planned date. A wizard helps you to chose what to deliver by showing you how much you already planned to ship.


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 |
|---|---|---|---|---|
crm_team_view_form |
crm.team.form | crm.team | form | Inherits sales_team.crm_team_view_form |
manual_delivery_wizard_form |
manual.delivery.wizard.form | manual.delivery | form | New |
view_order_form |
sale.order.form | sale.order | form | Inherits sale.view_order_form |
view_order_line_tree |
sale.order.line.tree | sale.order.line | tree | Inherits sale.view_order_line_tree |
view_sales_order_undelivered_line_filter |
sale.order.undelivered.line | sale.order.line | search | New |
HTTP endpoints 0
No HTTP endpoints found for this module.
Models touched 7
-
manual_deliveryBooleanhelp='If enabled, the deliveries are not created at SO confirmation. You need to use the Create Delivery button in order to reserve and ship the goods.'
No public methods.
-
carrier_idMany2one → delivery.carrierondelete='cascade'string='Delivery Method' args: 'delivery.carrier' -
commercial_partner_idMany2one → res.partnerondelete='cascade'readonly=Truerequired=True args: 'res.partner' -
date_plannedDate -
line_idsOne2many → manual.delivery.linestring='Lines to validate' args: 'manual.delivery.line', 'manual_delivery_id' -
partner_idMany2one → res.partnerdomain="['|',('id', '=', commercial_partner_id),('parent_id', '=', commercial_partner_id)]"ondelete='cascade'string='Delivery Address' args: 'res.partner' -
route_idMany2one → stock.routedomain=[('sale_selectable', '=', True)]help='Leave it blank to use the same route that is in the sale line'ondelete='cascade'string='Use specific Route' args: 'stock.route'
-
confirm(self)Creates the manual procurements -
default_get(self, fields)@api.model
-
manual_delivery_idMany2one → manual.deliveryondelete='cascade'readonly=Truerequired=Truestring='Wizard' args: 'manual.delivery' -
nameTextrelated='order_line_id.name' -
order_line_idMany2one → sale.order.lineondelete='cascade'readonly=Truerequired=Truestring='Sale Order Line' args: 'sale.order.line' -
product_idMany2onerelated='order_line_id.product_id' -
qty_orderedFloathelp='Quantity ordered in the related Sale Order'readonly=Truerelated='order_line_id.product_uom_qty'string='Ordered' -
qty_procuredFloatrelated='order_line_id.qty_procured' -
quantityFloat
No public methods.
-
has_pending_deliveryBooleancompute='_compute_delivery_pending' args: 'Delivery Pending' -
manual_deliveryBooleanhelp='If enabled, the deliveries are not created at SO confirmation. You need to use the Create Delivery button in order to reserve and ship the goods.'
-
action_manual_delivery_wizard(self)
-
qty_procuredFloatcompute='_compute_qty_procured'help='Quantity already planned or shipped (stock movements already created)'readonly=Truestore=Truestring='Quantity Procured' -
qty_to_procureFloatcompute='_compute_qty_to_procure'help='There is Pending qty to add to a delivery'readonly=Truestore=Truestring='Quantity to Procure'
No public methods.
No new fields.
Public methods (0)No public methods.
-
date_plannedDate -
partner_idMany2one → res.partnerargs: 'res.partner'
No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…