Search 1.9 billion lines of Odoo code on GitHub

web_google_maps

Author: Yopi Angi
License: no license
Branch: 9.0
Repository: brain-tec/odoo-addons
Dependencies: base, web, website, and website_google_map
Languages: CSS (137, 7.6%), HTML (99, 5.5%), JavaScript (989, 54.7%), Markdown (132, 7.3%), Python (209, 11.6%), and XML (241, 13.3%)
Other branches: 10.0, 11.0, 11.0-glang, 11.0-widget_google_autocomplete, 12.0, 12.0-#120, 12.0-autocomplete-dev, 12.0-dev, 12.0-dev-widget, 12.0-draggable-marker, 12.0-gmap-lang, 13.0, 13.0-dev, 13.0-website-gautocomplete, 14.0, 14.0-16102021, 14.0-dev, 14.0-dev-10202021, 14.0-edit-geolocation, 14.0-fix-inconsistent-map-focus, 14.0-map-theme, 14.0-meeting-maps, 14.0-toggle-sidebar, 14.0-update-markerclusterer, 15.0, 15.0-dev, 15.0-fix-inconsistent-map-focus, 15.0-google_map_inline, and master
Other repositories: Andyeyo/Odoo-Addons, Bilbonet/odoo-addons, DITIntl/odoo-addons-1, GiraffosCom/odoo-cl-12, Gonscar88/odoo-addons, Guobower/Odoo-Addons-2, Idealisconsulting/odoo-addons, Infinityloopsistemas/odoo-addons, Kalway-Technology/odoo-addons, KurrufERP/odoo-cl-12, LevelPrime/odoo-google-maps, Loo-ERP/odoo-addons, Manuellama/odoo-addons, Mefistous/odoo-cl-12, NivasRaj/odoo-addons, Normatica/odoo-cl-12, NothingCtrl/odoo-addons, OdooBulgaria/Odoo-Addons-17, OdooBulgaria/odoo-addons-15, RL-OtherApps/odoo-addons-2, SDIsl/geolocation, SantosJMM/odoo-addons, Sroeurnsuon/odoo-addons, TheCloneMaster/Odoo-Addons, UnknownInfo/odoo-cl-12, Vassy/odoo-addons, VizThoughts/odoo-addons-2, abdalmola-apps/odoo-addons, alvarojimenezpaz/odoo-cl-12, anhvu-sg/odoo-addons, aschenkels-ictstudio/odoo-addons-1, azizulj8/odoo-addons, be-cloud-be/odoo-addons, bgavarini/odoo-addons, bimajatiwijaya/odoo-addons, bishalgit/odoo-addons, cameleonRuoi/odoo-addons, consultingerp/crm_maps-12, daemondev/Odoo-Addons, dansanti/odoo-addons, desiteg/odoo-addons, diegobgl/odoo-addons, dong-z/odoo-addons, dtka0105/odoo-addons, erick-alvino/odoo-addons-1, erlopezh/odoo-addons, flectra-chile/odoo-cl-12, fva-idealis/odoo-addons, gitstalker/odoo-addons-1, gityopie/odoo-addons, grupoebox/odoo-addons, guohuadeng/odoo-addons, gustotc/odoo-addons, halybang/odoo-addons, hashirharis/odoo-addons, hippe-67/odoo-addons, hoangpq/odoo-addons-web-gg, iledarn/odoo-addons, intellego-bi/odoo-12, intellego-bi/odoo-cl-12, iuppiterpluvius/odoo-addons, jason156/Odoo-Addons-4, jeffersonjeff/odoo-addons, josemoralesp/odoo-addons, jriveros/odoo-cl-12, katyukha/odoo-addons, killteck/odoo-addons, kit9/odoo-addons-2, leodoooca/gityopie-odoo-addons, litnimax/odoo-addons, marcel1981/odoo-cl-12, marcelomora/yopie, marcelsavegnago/odoo-addons-3, martinllanos/odoo-addons, maurolguin1/odoo-cl-12, mgielissen/odoo-addons-7, minhhq09/odoo-addons, nerkusoft/odoo-addons, nextmoveits/odoo-addons, nguyenductamlhp/odoo-addons, nick2474/odoo-addons-1, nikeshscs/odoo-addons, njeudy/odoo-addons, nknganda/odoo-addons, odoochain/odoo-addons, odoogap/odoo-addons, odoonz/misc-gityopie, ohernandez-getinsoft/odoo-addons, one2pret/odoo-addons, osvalr/Odoo-Addons, petypi/odoo-addons-2, pnajman-modoolar/odoo-addons, redcor/field-service, sadeqamin/odoo-addons, sc4you/odoo-addons-3, scbrianti/odoo-addons, sgheller/odoo-addons, sm2x/odoo-addons, spoerp/odoo-addons, t-np/odoo-addons, tate11/odoo-addons-6, thanhdongcntt/odoo-addons, udamuri/odoo-addons, ursais/odoo-addons, vidtsin/odoo-cl-12, wahello/odoo-addons, westlyou/Odoo-Addons-4, westlyou/odoo-addons-2, xpertiz/odoo-addons, zarumaru/odoo-addons, and zoubir/odoo-addons

<h1>Web Google Maps</h1> <p><a href="https://youtu.be/YmM-8VCNRzE" title="Demo"><img src="https://img.youtube.com/vi/A-VbWwznuhc/0.jpg" alt="Demo"></a> </p> <p>This module contains two new features: - New view type and mode (<code>map</code>) - New widget (<code>google_places</code>)</p> <h2>Map view (<code>map</code>)</h2> <p>Basically, this new view(<code>map</code>) will integrate Google Maps into Odoo.<br> Enable you to display a partner location or all your partners location around the world on a map.<br> This feature will work seamlessly with Odoo means you can search your partner location using Odoo search feature. </p> <p><em>[08 July 2017]</em><br> - Not just partner(<code>res.partner</code>) model but any model contains geolocation fields </p> <p><em>[22 July 2017]</em><br> - Map Localization.<br> - Add places autocomplete to the map.<br> - Create new partner within the map. </p> <p>How to create the view?<br> Example</p> <blockquote> <pre><code>&lt;!-- View --&gt; &lt;record id=&quot;view_partner_map&quot; model=&quot;ir.ui.view&quot;&gt; &lt;field name=&quot;name&quot;&gt;view.partner.map&lt;/field&gt; &lt;field name=&quot;model&quot;&gt;res.partner&lt;/field&gt; &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; &lt;!-- Define aliase name for geolocation fields into view attributes --&gt; &lt;map string=&quot;Map&quot; lat=&quot;partner_latitude&quot; lng=&quot;partner_longitude&quot;&gt; &lt;field name=&quot;name&quot;/&gt; &lt;field name=&quot;street&quot;/&gt; &lt;field name=&quot;street2&quot;/&gt; &lt;field name=&quot;city&quot;/&gt; &lt;field name=&quot;zip&quot;/&gt; &lt;field name=&quot;email&quot;/&gt; &lt;field name=&quot;state_id&quot;/&gt; &lt;field name=&quot;country_id&quot;/&gt; &lt;field name=&quot;partner_latitude&quot;/&gt; &lt;field name=&quot;partner_longitude&quot;/&gt; &lt;/map&gt; &lt;/field&gt; &lt;/record&gt; </code></pre> </blockquote> <pre><code>&lt;!-- Action --&gt; &lt;record id=&quot;action_partner_map&quot; model=&quot;ir.actions.act_window&quot;&gt; ... &lt;field name=&quot;view_type&quot;&gt;form&lt;/field&gt; &lt;field name=&quot;view_mode&quot;&gt;tree,form,map&lt;/field&gt; ... &lt;/record&gt; </code></pre> <p>#### Note: This view required <code>fields</code> contains geolocation information (<code>partner_latitude</code> and <code>partner_longitude</code>) and the other fields will be use for marker infowindow. </p> <p><strong><em>IMPORTANT!</em></strong> (Update: 08 July 2017)<br> You have to set alias name for fields geolocation into <code>map</code> attributes<br> - <strong>lat</strong> : latitude - <strong>lng</strong>: longitude </p> <h2>New widget (<code>google_places</code>)</h2> <p>Basically this new widget will integrate another cool feature of Google Maps which is &quot;Place Autocomplete Address Form&quot; (go and visit this <a href="https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform">site</a> if you don&#39;t know yet how this cool feature work) </p> <p>The widget (<code>google_places</code>) has two options that can be modify: - <code>component_form</code><br> - <code>fillfields</code></p> <h3>Component form (<code>component_form</code>)</h3> <p>Is an option used to modify which value you want to take from an objects returned by the geocoder.<br> Full documentation about Google component types can be found <a href="https://developers.google.com/maps/documentation/geocoding/intro#Types">here</a></p> <p>By default this option are configured like following value:</p> <blockquote> <pre><code>&#39;component_form&#39;: { &#39;street_number&#39;: &#39;long_name&#39;, &#39;route&#39;: &#39;long_name&#39;, &#39;intersection&#39;: &#39;short_name&#39;, &#39;political&#39;: &#39;short_name&#39;, &#39;country&#39;: &#39;short_name&#39;, &#39;administrative_area_level_1&#39;: &#39;short_name&#39;, &#39;administrative_area_level_2&#39;: &#39;short_name&#39;, &#39;administrative_area_level_3&#39;: &#39;short_name&#39;, &#39;administrative_area_level_4&#39;: &#39;short_name&#39;, &#39;administrative_area_level_5&#39;: &#39;short_name&#39;, &#39;colloquial_area&#39;: &#39;short_name&#39;, &#39;locality&#39;: &#39;short_name&#39;, &#39;ward&#39;: &#39;short_name&#39;, &#39;sublocality_level_1&#39;: &#39;short_name&#39;, &#39;sublocality_level_2&#39;: &#39;short_name&#39;, &#39;sublocality_level_3&#39;: &#39;short_name&#39;, &#39;sublocality_level_5&#39;: &#39;short_name&#39;, &#39;neighborhood&#39;: &#39;short_name&#39;, &#39;premise&#39;: &#39;short_name&#39;, &#39;postal_code&#39;: &#39;short_name&#39;, &#39;natural_feature&#39;: &#39;short_name&#39;, &#39;airport&#39;: &#39;short_name&#39;, &#39;park&#39;: &#39;short_name&#39;, &#39;point_of_interest&#39;: &#39;long_name&#39; } </code></pre> </blockquote> <p>This configuration can be modify into view field definition.<br> Example:</p> <blockquote> <pre><code>&lt;record id=&quot;view_res_partner_form&quot; model=&quot;ir.ui.view&quot;&gt; ... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; ... &lt;field name=&quot;street&quot; widget=&quot;google_places&quot; options=&quot;{&#39;component_form&#39;: {&#39;street_number&#39;: &#39;short_name&#39;}}&quot;/&gt; ... &lt;/field&gt; &lt;/record&gt; </code></pre> </blockquote> <h3>Fill fields (<code>fillfields</code>)</h3> <p>Is an option that will be influenced by <code>google_places</code> widget.<br> This options should contains known <code>fields</code> that you want to set a value for each field automatically.<br> A field can contains one or multiple elements of component form<br> By default this options are configured like following value:</p> <blockquote> <pre><code>&#39;fillfields&#39;: { &#39;street2&#39;: [&#39;street_number&#39;, &#39;route&#39;, &#39;administrative_area_level_3&#39;, &#39;administrative_area_level_4&#39;, &#39;administrative_area_level_5&#39;], &#39;city&#39;: [&#39;locality&#39;, &#39;administrative_area_level_2&#39;], &#39;zip&#39;: &#39;postal_code&#39;, &#39;state_id&#39;: &#39;administrative_area_level_1&#39;, &#39;country_id&#39;: &#39;country&#39;, } </code></pre> </blockquote> <p>This configuration can be modify into view field definition as well<br> Example:</p> <blockquote> <pre><code>&lt;record id=&quot;view_res_partner_form&quot; model=&quot;ir.ui.view&quot;&gt; ... &lt;field name=&quot;arch&quot; type=&quot;xml&quot;&gt; ... &lt;field name=&quot;street&quot; widget=&quot;google_places&quot; options=&quot;{&#39;fillfields&#39;: {&#39;street2&#39;: [&#39;street_number&#39;]}}&quot;/&gt; ... &lt;/field&gt; &lt;/record&gt; </code></pre> </blockquote> <p>Note: this widget will set partner geolocation automatically whenever to pick or select an address from google autocomplete.</p> <h1>Technical:</h1> <p>This module will install <code>website_google_maps</code>.<br> <em>I recommend you to add Google Maps Key API into Odoo Website Admin settings when you installed this module</em></p> <p>The goal of this module is to bring the power of Google Maps into Odoo<br> This module has tested on Odoo Version 10.0c </p> <p>Regards,<br> Yopi<br> yopiangi[at]gmail[dot]com</p>