Skip to Content
Menu
This question has been flagged
1 Reply
1369 Views

We have a database of around 10,000 Independent Contractors in and around most major cities in the USA.

We sell Services to Customers and subcontract the work to one or more Contractors, after offering them the job.

When selling, is it possible to query by location our list of Contractors to:

  1. verify we have coverage within 50 miles of our Customer Delivery Address
  2. allow us to contact Contractors to offer them the work


I am using Odoo 17 Online.

Avatar
Discard
Best Answer

You can create an Odoo Server Action that uses the "as the crow flies" distance.


This relies on the Partners Geolocation module, so be sure to install it before trying, and to geolocate / geocode all of your Customers:


The Server Action would be set on the sale.order model and have code similar to this:

Access sample code here


Once finished, click Create Contextual Action so that your Server Action appears in the Action Menu on each Sales Order:


Sample Search:


Note: This is a rapidly generated proof of concept - it also searches all Contacts - you would need to narrow down the search based on how you classify your Contractors. Contact your Odoo Digital Advisor or your Odoo Partner for further help converting this into a solution suitable for a production database.


Avatar
Discard
Related Posts Replies Views Activity
0
Sep 23
6340
1
Jul 20
5108
3
Jan 20
12872
0
Dec 23
8242
0
Mar 15
3353