Hibou Odoo Suite: Sale Order Planner
The purpose of this documentation is to outline 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. This is made 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 StartedTo get started, navigate to the Apps application.
Once there, remove the Apps filter, and search for 'Sale Order Planner'.
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 modules installation.
Next, navigate to the Inventory application.
Adding a Shipping Calendar to a Warehouse
On the warehouse, click EDIT and select your desired Shipping Calendar from the Shipping Calendar drop-down menu.
You can also select CREATE AND EDIT... from the bottom of the menu 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 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.
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 Delivery Method
From within the Inventory application, navigate to CONFIGURATION > DELIVERY METHODS.
From the list of Delivery Methods, select the method to which you wish to add a delivery calendar. If you wish to create a new Delivery 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. 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.
Changing System Parameters
You will need to add two new system parameters in order for the Sale Order Planner to function properly. To do this, get into debug mode. Do this by adding "?debug" after "web" in the URL.
When you're done, hit enter and you should see debug has been activated from the icon on the top menu.
Next, navigate to the Settings application.
This will display all System Parameters. Click create.
In the Key field, enter the following:
In the Value field, enter the following; replacing the 18 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', (18,))]
It should look like this (but with your id number(s) substituted):
In the Key field, enter the following:
In the Value field, enter the following code, replacing the 7 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', (7,))]It should look like this (but with your id number(s) substituted):Click save. You can now create a Sale Order and use the Order Planner.
Planning a Sales Order
Navigate to the Sales application.
Good to Know!
To use the Sale Order Planner, ensure there is nothing entered in the Delivery Method field. If a shipping method is already selected there, it will override the Sale Order Planner. The planner will then only display what you have already selected in the Delivery Method field.
This will display a modal window that allows you to select a Delivery Method. The window displays 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.
Good to Know!
To display the Transit Days, you must have another module installed, Delivery Hibou. Install this module if not installed already.
Carrier: This is the carrier or shipping method.
Shipping Price: This is the cost of the shipping method.
Click Select on a line to add this to your order.
You will see a new line in the Order Lines tab for your chosen shipping method.
Click the Other Information tab.
In the Warehouse field, you will see the warehouse out of which the order will ship. You will also see the Planned Date and Requested Date fields have been updated based on your shipping method selection.
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.