Hibou Odoo Suite: Sales Modules: Sale Order Planner

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 and click ACTIVATE to install this feature

 

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

Navigate to the Inventory app.

Add Shipping Calendar

Then, go to CONFIGURATION > WAREHOUSE MANAGEMENT > WAREHOUSES and select the warehouse you wish to add a shipping calendar to.

Select a shipping calendar from the drop-down menu.

Important!

Obtain the ID of the warehouse record. To do this, enter into  Debug Mode.

While on the warehouse record, from click the  Debug icon from the menu ribbon and select View Metadata

This will show you the record's ID, make sure to save this information and do this for all warehouses you apply a shipping calendar to. In a later step, we will use this to setup our system parameters.


Create or Modify a new Shipping Calendar

In the event that you want to create a new calendar, type in a name and then click CREATE AND EDIT... from the drop-down menu.


Or you can select an existing calendar, hover over the Shipping Calendar field and click the  External Link to edit it.

Both options will take you to a popup to modify the calendar template. Once you have finished making changes, click SAVE & CLOSE.

Add the Shipping Calendar to a Delivery Method

While still in the Inventory app, navigate to CONFIGURATION > DELIVERY > SHIPPING METHODS, and select the one you want to add in the calendar to.

Then add in your calendar to the Delivery Calendar Field.

To learn how to create a shipping method, please review our Delivery documentation.


Important!

Obtain the ID of the shipping method record. To do this, enter into  Debug Mode.

While on the shipping method record, from click the  Debug icon from the menu ribbon and select View Metadata

This will show you the record's ID, make sure to save this information and do this for all shipping methods you apply a delivery calendar to. In a later step, we will use this to setup our system parameters.

 Debug Mode

The following section, will require you to be in  Debug Mode in order to make the requested changes in the database.

Change the System Parameters

In this step, we will need to add two new parameters in order for the Sale Order Planner to function properly.

Let's start by navigating to the Settings app.


Then go to TECHNICAL > PARAMETERS > SYSTEM PARAMETERS, and click NEW.

Warehouse Domain

Then fill in the following:

  • Key: sale.order.planner.warehouse_domain
  • Value: Insert the warehouse ID obtained through debug mode

Good to Know!

Have more than 1 warehouse with a shipping calendar set?

Use a comma separated list like this (don't forget to swap these with your actual IDs):

[('id', 'in', (1,))]


Carrier Domain

Then fill in the following:

  • Key: sale.order.planner.carrier_domain
  • Value: Insert the shipping method ID obtained through debug mode


Good to Know!

Have more than 1 shipping method with a shipping calendar set?

Use a comma separated list like this (don't forget to swap these with your actual IDs):

[('id', 'in', (1,))]

Sale Order Planner in Action!

Now, let's navigate over to the Sales app.

Select a quote from the list and click on PLAN.

To learn more about the sale order workflow, check out our Creating + Sales Orders documentation.

The Plan Sale Order model will appear with the following information:

  • 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.
  • Carrier: This is the carrier this shipping method is associated with.
  • Shipping Price: Will display the shipping price of the method

When you have decided which would be best, click Select.


This shipping method will then be added as a line onto the sale order.

Good to Know!

To display the Transit Days, you must ACTIVATE the Delivery Hibou module in the Apps app.


Technical

The sale order planner module plans a sale order based on the available warehouses and shipping method.

It adds a shipping calendar field to warehouses in order to plan delivery orders based on the availability of the warehouse or the warehouse stage.

It also adds a shipping calendar field to each shipping method in order to estimate the delivery based on the specific shipping 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