Odoo Help


9 الإجابات
الصورة الرمزية

Avinash Nk الهند

--Avinash Nk--

| 5 4 9
Calicut, الهند
--Avinash Nk--

Avinash N K

Odoo Developer

More than 3 years of experience in Odoo Technical

and Functional areas.

LinkedIn : https://in.linkedin.com/in/avinash-nk

Avinash Nk الهند
26‏/9‏/2017 12:20 ص

Hi onkar,

Try this widget: https://www.odoo.com/apps/modules/10.0/web_map

This is an App from Odoo Apps. It adds a widget map. You can Add Map on your Form view By the Following Code:


<record id="partner_google_map_form_view" model="ir.ui.view">
<field name="name">partner_google_map_form_view.page</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook" position="inside">
<page string="Map" name="partner_geo_map">
<field name="google_map_partner" widget="map" nolabel="1"/>


google_map_partner = fields.Char(string="Map")

Thank you.

8 التعليقات
onkar الهند
26‏/9‏/2017 6:56 ص

thank you for your answer.

I want know what field are we supposed to use because i have custom address field for which i need to show the map view.

And do we have satellite view for the map

Avinash Nk الهند
27‏/9‏/2017 11:35 م

You can use Char Field.

Avinash Nk الهند
27‏/9‏/2017 11:47 م

Satellite view is not available. in my knowledge.

onkar الهند
28‏/9‏/2017 12:42 ص

Thank you once again for your reply.

I used character field and widget map to show the map.

But how can i set coordinates to the char field to mark that location .

Avinash Nk الهند
28‏/9‏/2017 6:20 ص


Give this type of Value to Char field : {u'position': {u'lat': 20.593684, u'lng': 78.96288}, u'zoom': 3}

Avinash Nk الهند
28‏/9‏/2017 6:32 ص


import json

maps_loc = {u'position': {u'lat': 20.593684, u'lng': 78.96288}, u'zoom': 3}

json_map = json.dumps(maps_loc)

self.google_map_partner = json_map

onkar الهند
28‏/9‏/2017 7:59 ص

Thank you

Kasbaji nassr allah المغرب
8‏/4‏/2019 10:29 ص

The map only shows in edit mode. It won't show on create nor view mode. Can you guys help me on this ?

اطرح سؤالاً
Keep Informed
3 متابعين
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now