Search 1.9 billion lines of Odoo code on GitHub

osm_connector

Author: MivilSoft S.A.
License: no license
Branch: 13.0
Repository: Andyeyo/Odoo-Addons
Dependencies: base, and web
Languages: Markdown (63, 12.5%), PO File (166, 32.9%), Python (54, 10.7%), Sass (86, 17.0%), and XML (136, 26.9%)
Other branches: 15.0

<h1>Open Street Maps Connector with Odoo 13</h1> <p><a href="https://youtu.be/nTxif11Dg1Y" title="Demo"><img src="https://github.com/Andyeyo/Odoo-Addons/blob/13.0/osm_connector/static/description/icon.png?raw=true" alt="Demo"></a> </p> <p>Welcome to OpenStreetMap from Odoo 13, the project that creates and distributes free geographic data for the world. Now you can use the map from Odoo. This module brings four new features: - New view map allows user to view all addresses on open street maps <code>&quot;osm_view&quot;</code> - New widget enabled to set a point location <code>&quot;osm&quot;</code></p> <h1>OSM view <code>&quot;osm_view&quot;</code></h1> <p>Basically, this new view <code>osm_view</code> will integrate Open Street Map into Odoo 13. </p> <p>There are three available attributes that you can customize - <code>lat</code> : an attritube to tell the map the latitude field on the object <strong>[mandatory]</strong> - <code>lng</code> : an attritute to tell the map the longitude field on the object <strong>[mandatory]</strong> - <code>polyline</code> : an attribute to show a polyline between markers <strong>[optional]</strong>.</p> <h3>How to create the view?</h3> <p>Example</p> <p><img src="https://github.com/Andyeyo/Odoo-Addons/blob/13.0/osm_connector/static/description/osm_view.png?raw=true" alt="alt text"></p> <p>```xml &lt;!-- View --&gt; <record model="ir.ui.view" id="osm_connector.list"> <field name="name">osm<em>connector list</field> <field name="model">osm</em>connector.demo</field> <field name="arch" type="xml"> <osm_view polyline="true" string="Map" lat="lat" lng="lng"> <field name="name"/> <field name="lat"/> <field name="lng"/> <templates> <t t-name="kanban-box"> <div class="oe_kanban_global_click_edit oe_semantic_html_override"> <div t-attf-class="oe_kanban_content"> <field name="name"/> <br/> <field name="lat"/> <br/> <field name="lng"/> </div> </div> </t> </templates> </osm_view> </field> </record></p> <pre><code>&lt;!-- actions opening views on models --&gt; &lt;record model=&quot;ir.actions.act_window&quot; id=&quot;osm_connector.action_window&quot;&gt; &lt;field name=&quot;name&quot;&gt;Osm Example&lt;/field&gt; &lt;field name=&quot;res_model&quot;&gt;osm_connector.demo&lt;/field&gt; &lt;field name=&quot;view_mode&quot;&gt;tree,form,osm_view&lt;/field&gt; &lt;/record&gt; </code></pre> <p>```</p> <p>The marker infowindow will use <code>kanban-box</code> kanban card style. </p> <h1>New widget <code>&quot;osm&quot;</code></h1> <p>New widget has two options that can be modify: - <code>lat</code> - <code>lng</code></p> <h3>Latitude <code>lat</code> and Longitude <code>lng</code></h3> <p>This options tell the widget the fields geolocation, in order to have this fields filled automatically.</p> <h3>How to create the widget?</h3> <p>Example</p> <p><img src="https://github.com/Andyeyo/Odoo-Addons/blob/13.0/osm_connector/static/description/osm_widget.png?raw=true" alt="alt text"></p> <p><code>xml &lt;!-- View --&gt; &lt;field name=&quot;map&quot; nolabel=&quot;1&quot; widget=&quot;osm&quot; lat=&quot;latitude&quot; lng=&quot;longitude&quot;/&gt; </code></p>