Warehouse Distances

Add distances between warehouses

12.0

https://hub.konvergo.app/web/image/product.template/1436/image_1920?unique=e1690af
  • Odoo Version

Description

Warehouse Distances

This module adds distances between warehouses.

Distances

A new menu entry is added under Inventory / Configuration / Warehouse Distances.

static/description/warehouse_distance_menu.png

When clicking on the menu entry, the list of all distances between warehouses is displayed.

static/description/warehouse_distance_list.png

Units

Distances are defined in kilometers.

Reflexivity

Distances are reflexive. Whether some warehouse is defined as Warehouse 1 or Warehouse 2 has no importance.

Warehouse Smart Button

In the form view of a warehouse, a smart button is added to access the distances for this warehouse.

static/description/warehouse_smart_button.png

When clicking on the button, the list of distances related to this warehouse is displayed.

static/description/warehouse_smart_button_distances.png

Computing Distances

The goal of this module is to compute a distance between 2 warehouses.

Therefore, a helper method distance_from is added on warehouse. Here is an example of usage.

warehouse_a = env['stock.warehouse'].browse(1)
warehouse_b = env['stock.warehouse'].browse(2)
distance = warehouse_a.distance_from(warehouse_b)
print(distance)

The result is a float representing the number of kilometers between the 2 warehouses.

Note that warehouse_a.distance_from(warehouse_b) and warehouse_b.distance_from(warehouse_a) will always give the same result.

If no distance is defined between the 2 warehouse, an exception is raised.

Known Issues

For now, the distances are defined in kilometers. An improvement to the module would be to support multiple units of measure.

Contributors


License
Technical Name
Log In to view
Version
12.0
Author
Numigi
Website