Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
1370 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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.


Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
wrz 23
6342
1
lip 20
5109
3
sty 20
12880
0
gru 23
8243
0
mar 15
3353