Shipment Advice Planner Toursolver

shipment_advice_planner_toursolver
REPOSITORY
REPOSITORYOCA/stock-logistics-transport
GIT
GIThttps://github.com/OCA/stock-logistics-transport.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/stock-logistics-transport/tree/16.0/shipment_advice_planner_toursolver
VERSION
VERSION 3.2.0
CATEGORY
CATEGORYUncategorized
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), ACSONE SA/NV
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), ACSONE SA/NV
COMMITTERS
COMMITTERSLaurent Mignon (ACSONE), sbejaoui, Weblate, OCA-git-bot, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/stock-logistics-transport
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:57
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/queue:
    - queue_job
OCA/server-tools:
    - base_time_window
OCA/stock-logistics-transport:
    - shipment_advice_planner
    - shipment_advice
    - stock_dock
odoo/odoo:
    - stock
    - product
    - base
    - mail
    - base_setup
    - web
    - bus
    - web_tour
    - uom
    - barcodes_gs1_nomenclature
    - barcodes
    - digest
    - portal
    - web_editor
    - http_routing
    - auth_signup
    - resource
    - delivery
    - sale_stock
    - sale
    - sales_team
    - account_payment
    - account
    - analytic
    - payment
    - utm
    - stock_account
    - sale_management
    - base_sparse_field
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES requests
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (15)
XML IDNameModelTypeStatus
res_config_settings_form_view res.config.settings xpath Inherits stock.res_config_settings_view_form
res_partner_form_view res.partner group Inherits base.view_partner_form
shipment_advice_planner_form_view shipment.advice.planner xpath Inherits shipment_advice_planner.shipment_advice_planner_form_view
shipment_advice_view_form shipment.advice.form shipment.advice header Inherits shipment_advice.shipment_advice_view_form
shipment_advice_view_tree shipment.advice.tree shipment.advice field Inherits shipment_advice.shipment_advice_view_tree
stock_picking_form_view stock.picking xpath Inherits shipment_advice.view_picking_form
toursolver_backend_form_view toursolver.backend form New
toursolver_backend_tree_view toursolver.backend tree New
toursolver_delivery_window_search_view toursolver.delivery.window search New
toursolver_delivery_window_tree_view toursolver.delivery.window tree New
toursolver_resource_form_view toursolver.resource form New
toursolver_resource_search_view toursolver.resource search New
toursolver_resource_tree_view toursolver.resource tree New
toursolver_task_form_view toursolver.task form New
toursolver_task_tree_view toursolver.task tree New
Models touched (11)

New fields (1)
  • toursolver_backend_id Many2one → toursolver.backend
    comodel_name='toursolver.backend' string='TourSolver Backend'
Public methods (0)

No public methods.

New fields (1)
  • toursolver_backend_id Many2one
    readonly=False related='company_id.toursolver_backend_id'
Public methods (0)

No public methods.

New fields (2)
  • toursolver_delivery_duration Integer
  • toursolver_delivery_window_ids One2many → toursolver.delivery.window
    comodel_name='toursolver.delivery.window' help='If specified, delivery is only possible into the specified time windows. (Leaves empty if no restriction)' inverse_name='partner_id' string='Delivery windows'
Public methods (0)

No public methods.

New fields (15)
  • is_create_toursolver_task_allowed Boolean
    compute='_compute_is_create_toursolver_task_allowed'
  • toursolver_additional_cost Float
    compute='_compute_toursolver_stats' store=True
  • toursolver_delivery_cost Float
    compute='_compute_toursolver_stats' store=True
  • toursolver_nbr_tours Integer
    compute='_compute_toursolver_stats' store=True string='Number of Tours'
  • toursolver_nbr_visits Integer
    compute='_compute_toursolver_stats' help='Number of delivery stops in the tours' store=True string='Number of visits'
  • toursolver_resource_id Many2one → toursolver.resource
    comodel_name='toursolver.resource' readonly=True states={'draft': [('readonly', False)]} string='Toursolver Resource'
  • toursolver_task_id Many2one → toursolver.task
    comodel_name='toursolver.task' readonly=True string='Toursolver Task'
  • toursolver_total_cost Float
    compute='_compute_toursolver_stats' store=True
  • toursolver_travel_distance Float
    compute='_compute_toursolver_stats' help='Distance to travel for the delivery in Km' store=True
  • toursolver_travel_distance_uom Many2one → uom.uom
    default=<expr> readonly=True string='Distance UoM' args: 'uom.uom'
  • toursolver_travel_distance_uom_name Char
    readonly=True related='toursolver_travel_distance_uom.name' string='Distance unit of measure label'
  • toursolver_travel_duration Float
    compute='_compute_toursolver_stats' help='Driving time for the travel, excluding the time spent at each stop' store=True
  • toursolver_travel_end_dt Datetime
    compute='_compute_toursolver_stats' store=True string='Travel End Time'
  • toursolver_travel_start_dt Datetime
    compute='_compute_toursolver_stats' store=True string='Travel Start Time'
  • toursolver_travel_total_time Float
    compute='_compute_toursolver_stats' help='Total time for the travel, including the time spent at each stop and reloading time' store=True
Public methods (1)
  • create_toursolver_task(self)

New fields (4)
  • delivery_resource_ids Many2many → toursolver.resource
    comodel_name='toursolver.resource' help='delivery resources to be considered in geo-optimazation' string='Delivery resources'
  • shipment_planning_method Selection
    ondelete={'toursolver': 'cascade'} selection_add=[('toursolver', 'TourSolver')]
  • toursolver_resource_id Many2one → toursolver.resource
    comodel_name='toursolver.resource' help='TourSolver resource to be propgated to the shipment advice in simpleplanning method' readonly=True string='Toursolver Resource'
  • toursolver_task_id Many2one → toursolver.task
    comodel_name='toursolver.task' readonly=True string='Toursolver Task'
Public methods (0)

No public methods.

New fields (2)
  • toursolver_shipment_advice_rank Integer
    help='The rank given by TourSolver to this picking in the set of planned stops of the related shipment advice' readonly=True string='Toursolver Rank'
  • toursolver_task_id Many2one → toursolver.task
    comodel_name='toursolver.task' copy=False readonly=True
Public methods (0)

No public methods.

New fields (19)
  • active Boolean
    default=True
  • api_key Char
  • connection_timeout Integer
    default=10 help='Timeout in seconds for the connection to the Toursolver API' required=True
  • definition_id Many2one → toursolver.request.props.definition
    comodel_name='toursolver.request.props.definition' readonly=True
  • delivery_duration Integer
    default=180 help='Duration in seconds needed to deliver a customer' string='Fixed time spent delivering a customer'
  • delivery_window_disabled Boolean
  • duration Integer
    help='Duration in seconds allowed to the computation of the optimization' string='Optimization process max duration'
  • loading_duration Integer
    help='Loading time in minutes' string='Fixed initial loading time'
  • name Char
    required=True
  • organization Char
    help="Organization identifier as specified in the Toursolver interface. If set, it's used to define how see the results in the Toursolver interface and to determine the time zone of the optimization. If not provided, the server will guess the time zone from the first visit coordinates which will add extra time to the optimization process."
  • partner_default_delivery_window_end Float
    default=17.0 help='If no delivery winodow specified on the partner this will be used'
  • partner_default_delivery_window_start Float
    default=8.0 help='If no delivery winodow specified on the partner this will be used'
  • read_timeout Integer
    default=10 help='Timeout in seconds for the read operation to the Toursolver API' required=True
  • resource_default_travel_penalty Float
    help='Default value for the The cost for a resource of driving for one distance unit. Can be specified on resource level using `workPenalty`option' string='Resource fixed cost travelling/hour'
  • resource_default_work_penalty Float
    help='Default value for the cost of a resource working for an hour. Can be specified on resource level using `travelPenalty`option' string='Resource fixed cost working/hour'
  • resource_properties_definition PropertiesDefinition
    string='Resource Properties'
  • rqst_options_properties Properties
    copy=True definition='definition_id.options_definition' string='Options'
  • rqst_orders_properties Properties
    copy=True definition='definition_id.orders_definition' help='Properties to be used in the definition of each order into the optimization request' string='Orders Properties'
  • url Char
Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (1)
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (2)
  • options_definition PropertiesDefinition
  • orders_definition PropertiesDefinition
Public methods (0)

No public methods.

New fields (7)
  • active Boolean
    default=True
  • name Char
    required=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' string='Contact'
  • resource_id Char
    required=True string='ResourceId'
  • resource_properties Properties
    copy=True definition='toursolver_backend_id.resource_properties_definition' args: 'Properties'
  • toursolver_backend_id Many2one → toursolver.backend
    comodel_name='toursolver.backend' required=True string='TourSolver Backend'
  • use_delivery_person_coordinates_as_end Boolean
    help="If true the computed delivery will end at the delivery person's address. Otherwise it will end at the warehouse address"
Public methods (0)

No public methods.

New fields (17)
  • date Date
    default=fields.Date.context_today readonly=True
  • delivery_resource_ids Many2many → toursolver.resource
    comodel_name='toursolver.resource' readonly=True string='Delivery resources'
  • dock_id Many2one → stock.dock
    comodel_name='stock.dock' readonly=True
  • name Char
    readonly=True
  • picking_ids One2many → stock.picking
    comodel_name='stock.picking' inverse_name='toursolver_task_id' readonly=True string='Pickings'
  • request_data Binary
    readonly=True
  • request_data_filename Char
    readonly=True
  • result_data Binary
    attachment=True readonly=True
  • result_data_filename Char
    readonly=True
  • result_json Json
    compute='_compute_result_json'
  • shipment_advice_ids One2many → shipment.advice
    comodel_name='shipment.advice' inverse_name='toursolver_task_id' readonly=True string='Shipment Advices'
  • state Selection
    compute='_compute_state' readonly=True selection=[('draft', 'Draft'), ('in_progress', 'In progress'), ('aborted', 'Aborted'), ('error', 'Error'), ('success', 'Success'), ('done', 'Done'), ('cancelled', 'Cancelled')] store=True
  • task_id Char
    help='Identifier of the task submitted to the TourSolver service to optimize the planning/path.' readonly=True args: 'Toursolver task id'
  • toursolver_backend_id Many2one → toursolver.backend
    comodel_name='toursolver.backend' default='_get_toursolver_backend' readonly=True string='TourSolver Backend'
  • toursolver_error_message Text
    readonly=True
  • toursolver_status Char
    help='Status of the optimization task provided by the TourSolver service.' readonly=True args: 'TourSolver status'
  • warehouse_id Many2one → stock.warehouse
    comodel_name='stock.warehouse' readonly=True
Public methods (6)
  • button_cancel(self)
  • button_check_status(self)
  • button_get_result(self)
  • button_send_request(self)
  • button_show_shipment_advice(self)
  • create(self, vals_list)
    @api.model_create_multi