Skip to content

Commit c35795b

Browse files
committed
Web Google Maps Fix
1 parent af73999 commit c35795b

File tree

5 files changed

+47
-17
lines changed

5 files changed

+47
-17
lines changed

web_google_maps/static/src/js/view/map/map_view.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ odoo.define('web_google_maps.MapView', function (require) {
1414
accesskey: 'm',
1515
display_name: _lt('Map'),
1616
icon: 'fa-map-o',
17-
jsLibs: [],
1817
config: _.extend({}, BasicView.prototype.config, {
1918
Model: MapModel,
2019
Renderer: MapRenderer,
2120
Controller: MapController
2221
}),
2322
viewType: 'map',
23+
mobile_friendly: true,
2424
init: function (viewInfo, params) {
2525
this._super.apply(this, arguments);
2626

web_google_maps/static/src/scss/web_maps.scss

+4
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
.o_map_view {
1919
width: 100%;
20+
21+
.gm-style-iw {
22+
min-width: 300px;
23+
}
2024
}
2125

2226
.o_map_left_sidenav {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
@include media-breakpoint-down(sm) {
2+
.o_map_container {
3+
.o_kanban_view.o_kanban_grouped {
4+
min-height: 100%;
5+
padding: 0;
6+
background-color: desaturate($gray-100, 100%);
7+
8+
.o_kanban_record {
9+
width: 100%;
10+
margin-left: 0;
11+
margin-right: 0;
12+
display: block;
13+
padding: $o-kanban-inside-vgutter $o-kanban-inside-hgutter;
14+
border: 1px solid gray('300');
15+
background-color: white;
16+
}
17+
18+
&.o_kanban_small_column .o_kanban_group:not(.o_column_folded) {
19+
position: initial !important;
20+
width: $o-kanban-small-record-width + 2*$o-kanban-group-padding;
21+
overflow-x: scroll;
22+
}
23+
24+
&[class] .o_kanban_group:not(.o_column_folded) {
25+
position: initial !important;
26+
width: $o-kanban-small-record-width + 2*$o-kanban-group-padding;
27+
overflow-x: scroll;
28+
29+
.o_kanban_record {
30+
width: 100%;
31+
margin-left: 0;
32+
margin-right: 0;
33+
display: block;
34+
padding: $o-kanban-inside-vgutter $o-kanban-inside-hgutter;
35+
border: 1px solid gray('300');
36+
background-color: white;
37+
}
38+
}
39+
}
40+
}
41+
}

web_google_maps/views/google_places_template.xml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
<template id="assets_backend" name="web_google_maps assets backend" inherit_id="web.assets_backend">
2222
<xpath expr="." position="inside">
2323
<link rel="stylesheet" type="text/scss" href="/web_google_maps/static/src/scss/web_maps.scss"/>
24+
<link rel="stylesheet" type="text/scss" href="/web_google_maps/static/src/scss/web_maps_mobile.scss"/>
2425
<script type="text/javascript" src="/web_google_maps/static/src/js/view/map/map_model.js"></script>
2526
<script type="text/javascript" src="/web_google_maps/static/src/js/view/map/map_controller.js"></script>
2627
<script type="text/javascript" src="/web_google_maps/static/src/js/view/map/map_renderer.js"></script>

web_google_maps/views/res_partner.xml

-16
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,4 @@
101101
<field name="view_id" ref="view_res_partner_map"/>
102102
<field name="act_window_id" ref="base.action_partner_form"/>
103103
</record>
104-
105-
<!-- Contacts MAP -->
106-
107-
<record id="contacts.action_contacts" model="ir.actions.act_window">
108-
<field name="view_mode">kanban,tree,map,form</field>
109-
</record>
110-
<record id="contacts.action_contacts_view_form" model="ir.actions.act_window.view">
111-
<field name="sequence" eval="3"/>
112-
</record>
113-
<record id="action_contacts_view_maps" model="ir.actions.act_window.view">
114-
<field name="sequence" eval="2"/>
115-
<field name="view_mode">map</field>
116-
<field name="view_id" ref="web_google_maps.view_res_partner_map"/>
117-
<field name="act_window_id" ref="contacts.action_contacts"/>
118-
</record>
119-
120104
</odoo>

0 commit comments

Comments
 (0)