Skip to Content
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Sign in
  • Nederlands English (US) Español (AR)
  • Contact Us
  • Home
  • Blog
  • Jobs
  • Contact us
Cafayate.Net
  • 0
  • 0
    • Home
    • Blog
    • Jobs
    • Contact us
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Sign in
  • Contact Us

Show path between two Address on google map in Odoo

  • All Blogs
  • Tech Blog
  • Show path between two Address on google map in Odoo
  • March 5, 2021 by
    Administrator

    To show path, distance and duration between source and destination address on google map , just use this simple function in Odoo. An new window will pop up in browser, showing path between source address and destination address .

    def show_path_on_google_map(self, cr, uid, ids, context=None):

    ”’ Function to show path between Source and Destination Address on Google map ”’

    url=”http://maps.google.com/maps?saddr=”

    # Demo Addresses
    source_address = ‘ Mumbai, Maharashtra ‘

    destination_address = ‘Red Fort Delhi, India ,110006’

     

    url += source_address + ‘&daddr=’ + destination_address

    return {

    ‘type’: ‘ir.actions.act_url’,

    ‘url’:url,

    ‘nodestroy’: True,

    ‘target’: ‘new’

    }

     

     

    in Tech Blog
    DNS resolution for LXC in Ubuntu 14.04

    Designed for companies

    We are a team of passionate people whose goal is to improve everyone's life through disruptive products. We build great products to solve your business problems. Our products are designed for small to medium size companies willing to optimize their performance.

    Get in touch

    Plantexel
    Pedernera
    Salta Capital 
    Argenina

    • +31 653-919-302
    • [email protected]
    Follow us
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)