Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
1371 Tampilan

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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
0
Sep 23
6343
1
Jul 20
5109
3
Jan 20
12881
0
Des 23
8244
0
Mar 15
3354