Search code examples
apiodoo

Odoo Custom Shipping Module


I want to develop a custom shipping module for Odoo, but I can't find the documentation for it and all the shipping source is Enterprise, so I can't see it without paying.

enter image description here

I found the Odoo Developer guid here: https://www.odoo.com/documentation/13.0/

I found how to create a module: https://www.odoo.com/documentation/13.0/howtos/backend.html

I found the Guide for Payment processors: https://www.odoo.com/documentation/user/13.0/ecommerce/shopper_experience/payment.html

Where is the documentation for shipping connectors? I know it can be done, there are third party shipping connectors on the odoo marketplace.


Solution

  • From Odoo delivery module:

    In order to add your own external provider, follow these steps:
    
    1. Create your model MyProvider that _inherit 'delivery.carrier'
    2. Extend the selection of the field "delivery_type" with a pair
       ('<my_provider>', 'My Provider')
    3. Add your methods:
       <my_provider>_rate_shipment
       <my_provider>_send_shipping
       <my_provider>_get_tracking_link
       <my_provider>_cancel_shipment
       _<my_provider>_get_default_custom_package_code
       (they are documented hereunder)
    

    To implement your own shipping connector, I would suggest you to start looking into this module. It is from community so already available for all community users.