Hibou Odoo Suite: Sales Modules: Sale Order Planner

Repository Versions:

Modules:

Author:

Hibou Corp.

License:

OPL-1

Purpose

This documentation outlines the use case and processes associated with Hibou's Sale Order Planner module. The Sale Order Planner module plans order dates based on available warehouses. We make this possible through the addition of a shipping calendar to a warehouse to plan delivery orders based on the availability of the warehouse or warehouse staff. It also adds a shipping calendar to individual shipping methods to estimate delivery based on the specific method's characteristics, like its shipping schedule.

Getting Started 

To get started, navigate to the Apps application. 



Once there, remove the 'Apps' filter, and search for 'Sale Order Planner'. When you're ready, click Install.

 

Good to Know! 

The Sale Order Planner module requires the Dates on Sales Order, Sale Sourced by Line, Partners Geolocation, Delivery Costs, and Resource modules. However, if you do not already have these modules installed Odoo will install them for you during this module's installation.

Process 
Next, navigate to the Inventory application.

Odoo - Sample 1 for three columns

Adding a Shipping Calendar to a Warehouse

Once there, navigate to CONFIGURATION > Warehouse ManagementWAREHOUSES. From the list of warehouses, select the warehouse to which you wish to add a shipping calendar.



On the warehouse, click EDIT and select your desired Shipping Calendar from the Shipping Calendar drop-down menu.



Good to Know!

Create a New Shipping Calendar

You can also select CREATE AND EDIT... from the bottom of the drop-down field to make a new shipping calendar. When doing so, a shipping Calendar modal window will appear, allowing you to set the working hours of your warehouse. 

Modify any of the existing lines by clicking into them. You can use the  icon to remove a line, and click Add a line to add a new one. 

When you're done, click Save to close the modal window.

When you have selected the Shipping Calendar on your Warehouse, click save.

Before navigating away from this record, you will need to retrieve the record ID for this warehouse from the URL. You need this so that you can set up the system parameters properly in a later step in this documentation. 

View the URL; you will see the parameter "id=" followed by a number. This number may be at the end, or in the middle, of a very long string. Copying it to your text editor may help if the URL is very long.


That number is the record's number. Write this number down for all warehouses you apply a Shipping Calendar to, so you can use them when setting up your system parameters later. 

Adding a Delivery Calendar to a Shipping Method

From within the Inventory application, navigate to CONFIGURATION > shipping METHODS.

From the list of Shipping Methods, select the method to which you wish to add a delivery calendar. If you wish to create a new Shipping Method, click CREATE


Click EDIT on the Delivery Method and select a Delivery Calendar from the Delivery Calendar dropdown menu.



You can also select CREATE AND EDIT... from the bottom of the menu to make a new delivery calendar. Create this according to the instructions for creating a Shipping Calendar, above. When you are satisfied with your Delivery Calendar, click SAVE.

Before navigating away from this record, you will need to retrieve the record ID for this delivery method from the URL. You need this so that you can set up the system parameters properly in a later step in this documentation. View the URL; you will see the phrase "id=" followed by a number. 


That number is the record's number. Write this number down for all delivery methods you apply a Shipping Calendar to, so you can use them when setting up your system parameters later. 

 Debug Mode

The next steps in this document will require you to be in Debug Mode.

Changing System Parameters

You will need to add two new system parameters in order for the Sale Order Planner to function properly. To do so, navigate to the Settings application. 


Once there, go to Technical > Parameters  > System Parameters. You may need to scroll down within the drop-down menu to see this option. 

This will display all System Parameters. Click create

In the Key field, enter the following: 

sale.order.planner.warehouse_domain

In the Value field, enter the following; replacing the 1 with the warehouse number you copied from previous steps, followed by a comma. If there was more than one warehouse, separate the numbers with a comma (e.g. 1, 2, 3,).

[('id', 'in', (1,))] 
It should look like this (but with your ID number(s) substituted):


Click save. Then, again, click Create

In the Key field, enter the following: 

sale.order.planner.carrier_domain
In the Value field, enter the following code, replacing the 31 with the carrier number you copied from previous step, followed by a comma. If there was more than one carrier, separate the numbers with a comma (e.g. 1, 2, 3,).

[('id', 'in', (31,))] 
It should look like this (but with your ID number(s) substituted):


Click save. You can use the Order Planner on a Sale Order. 

Planning a Sales Order

Navigate to the Sales application. 

  

Once there, select an existing Sale Order or Quotation and click EDIT, or create a new one by clicking CREATE. Fill in the order and, when ready, click plan


This will display the Plan Sale Order modal window with the following information for each Delivery Method: 

Warehouse: This is the warehouse out of which the order will be shipped. 

Planned Date: This is the date the shipment will leave the warehouse. Requested Date: This is the date the order is scheduled to arrive to the customer's location. 

Transit Days: This is the number of days the order will be in transit. 

 Click Select next to the Delivery Method you wish to use for this order.


The shipping method will then populate as an Order Line.


Good to Know!

To display the Transit Days, you must have another module installed, Delivery Hibou. Install this module if not installed already. 


Click the OTHER INFORMATION tab. 

In the Warehouse field, you will see the Warehouse, and Route if applicable, have been updated from the Shipping Method selection.


Technical  

The Sale Order Planner module plans sales order dates based on available warehouses and shipping methods. It adds a shipping calendar field to warehouses in order to plan delivery orders based upon the availability of the warehouse or the warehouse stage. It also adds a shipping calendar field to individual shipping methods to estimate the delivery based on the specific method's characteristics.

There is also a new transient model (Wizard) `sale.order.planning.option` and views with the following fields:

  • `plan_id` Many2one field for the Plan

  • `warehouse_id` Many2one field for the Warehouse

  • `date_planned` Datetime field for the Planned Date

  • `requested_date` Datetime field for the Requested Date

  • `carrier_id` Many2one field for the Delivery Carrier

  • `transit_days` Integer field for the number of Transit Days

  • `shipping_price` Float field for the Shipping Price

  • `sub_options` Text field for the Sub Options JSON

  • `sub_options_text` computed Text field.