Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
1374 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
sept 23
6347
1
jul 20
5109
3
ene 20
12885
0
dic 23
8245
0
mar 15
3355