Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Drop Shipping

Entity: stock.picking

Compute Method: _compute_is_dropship

View 17.0 View 18.0
Inputs Method Outputs
  • location_dest_id
  • location_dest_id.usage
  • location_id
  • location_id.usage
for picking in self:
-             picking.is_dropship = picking.location_dest_id.usage == 'customer' and picking.location_id.usage == 'supplier'
+             source, dest = picking.location_id, picking.location_dest_id
+             picking.is_dropship = (source.usage == 'supplier' or (source.usage == 'transit' and not source.company_id)) \
+                               and (dest.usage == 'customer' or (dest.usage == 'transit' and not dest.company_id))
  • is_dropship

Back to entity