Skip to content

Commit 267ff48

Browse files
committed
[MIG] fieldservice_geoengine: Migration to 16.0
1 parent 5dee8cc commit 267ff48

File tree

8 files changed

+45
-80
lines changed

8 files changed

+45
-80
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
makepot: "true"
4343
services:
4444
postgres:
45-
image: postgres:12.0
45+
image: postgis/postgis:13-3.4
4646
env:
4747
POSTGRES_USER: odoo
4848
POSTGRES_PASSWORD: odoo

fieldservice_geoengine/README.rst

+8-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Field Service Geoengine
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:00cbfc11e03373e90815257e248560b520030ac74c71a26281dc3f5a96930b40
10+
!! source digest: sha256:1f710856434ae3bcfcda6a9c87da948eeb26acebd7749825bc5d1e4e31e44465
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,13 +17,13 @@ Field Service Geoengine
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github
20-
:target: https://github.com/OCA/field-service/tree/14.0/fieldservice_geoengine
20+
:target: https://github.com/OCA/field-service/tree/16.0/fieldservice_geoengine
2121
:alt: OCA/field-service
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_geoengine
23+
:target: https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_geoengine
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=14.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/field-service&target_branch=16.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -83,7 +83,7 @@ Bug Tracker
8383
Bugs are tracked on `GitHub Issues <https://github.com/OCA/field-service/issues>`_.
8484
In case of trouble, please check there if your issue has already been reported.
8585
If you spotted it first, help us to smash it by providing a detailed and welcomed
86-
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_geoengine%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
86+
`feedback <https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_geoengine%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
8787

8888
Do not contact contributors directly about support or help with technical issues.
8989

@@ -109,6 +109,8 @@ Contributors
109109
* Jevin Dement <jdement@opensourceintegrators.com>
110110
* Murtuza Saleh <murtuza.saleh@serpentcs.com>
111111
* Sebastiano Picchi <sebastiano.picchi@pytech.it>
112+
* [APSL](https://apsl.tech):
113+
* Antoni Marroig <amarroig@apsl.net>
112114

113115
Other credits
114116
~~~~~~~~~~~~~
@@ -141,6 +143,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
141143

142144
|maintainer-wolfhall| |maintainer-max3903|
143145

144-
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/14.0/fieldservice_geoengine>`_ project on GitHub.
146+
This module is part of the `OCA/field-service <https://github.com/OCA/field-service/tree/16.0/fieldservice_geoengine>`_ project on GitHub.
145147

146148
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

fieldservice_geoengine/__manifest__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"name": "Field Service Geoengine",
77
"summary": "Display Field Service locations on a map with Open Street Map",
88
"license": "AGPL-3",
9-
"version": "14.0.1.2.2",
9+
"version": "16.0.1.0.0",
1010
"category": "Field Service",
1111
"author": "Open Source Integrators, Odoo Community Association (OCA), Pytech SRL",
1212
"website": "https://github.com/OCA/field-service",

fieldservice_geoengine/readme/CONTRIBUTORS.rst

+2
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,5 @@
88
* Jevin Dement <jdement@opensourceintegrators.com>
99
* Murtuza Saleh <murtuza.saleh@serpentcs.com>
1010
* Sebastiano Picchi <sebastiano.picchi@pytech.it>
11+
* [APSL](https://apsl.tech):
12+
* Antoni Marroig <amarroig@apsl.net>

fieldservice_geoengine/static/description/index.html

+6-4
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ <h1 class="title">Field Service Geoengine</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:00cbfc11e03373e90815257e248560b520030ac74c71a26281dc3f5a96930b40
370+
!! source digest: sha256:1f710856434ae3bcfcda6a9c87da948eeb26acebd7749825bc5d1e4e31e44465
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/14.0/fieldservice_geoengine"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-14-0/field-service-14-0-fieldservice_geoengine"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/field-service&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_geoengine"><img alt="OCA/field-service" src="https://img.shields.io/badge/github-OCA%2Ffield--service-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/field-service-16-0/field-service-16-0-fieldservice_geoengine"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/field-service&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>This module displays map views on the order and location using the GeoEngine module and PostGIS.</p>
374374
<p><strong>Table of contents</strong></p>
375375
<div class="contents local topic" id="contents">
@@ -432,7 +432,7 @@ <h1><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h1>
432432
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/field-service/issues">GitHub Issues</a>.
433433
In case of trouble, please check there if your issue has already been reported.
434434
If you spotted it first, help us to smash it by providing a detailed and welcomed
435-
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_geoengine%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
435+
<a class="reference external" href="https://github.com/OCA/field-service/issues/new?body=module:%20fieldservice_geoengine%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
436436
<p>Do not contact contributors directly about support or help with technical issues.</p>
437437
</div>
438438
<div class="section" id="credits">
@@ -463,6 +463,8 @@ <h2><a class="toc-backref" href="#toc-entry-8">Contributors</a></h2>
463463
</li>
464464
<li>Murtuza Saleh &lt;<a class="reference external" href="mailto:murtuza.saleh&#64;serpentcs.com">murtuza.saleh&#64;serpentcs.com</a>&gt;</li>
465465
<li>Sebastiano Picchi &lt;<a class="reference external" href="mailto:sebastiano.picchi&#64;pytech.it">sebastiano.picchi&#64;pytech.it</a>&gt;</li>
466+
<li>[APSL](<a class="reference external" href="https://apsl.tech">https://apsl.tech</a>):
467+
* Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
466468
</ul>
467469
</div>
468470
<div class="section" id="other-credits">
@@ -481,7 +483,7 @@ <h2><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h2>
481483
promote its widespread use.</p>
482484
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
483485
<p><a class="reference external image-reference" href="https://github.com/wolfhall"><img alt="wolfhall" src="https://github.com/wolfhall.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/max3903"><img alt="max3903" src="https://github.com/max3903.png?size=40px" /></a></p>
484-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/14.0/fieldservice_geoengine">OCA/field-service</a> project on GitHub.</p>
486+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/field-service/tree/16.0/fieldservice_geoengine">OCA/field-service</a> project on GitHub.</p>
485487
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
486488
</div>
487489
</div>

fieldservice_geoengine/tests/test_fsm_location.py

-57
Original file line numberDiff line numberDiff line change
@@ -30,63 +30,6 @@ def setUpClass(cls):
3030
}
3131
)
3232

33-
def test_fsm_location_creation(self):
34-
test_partner = self.env["res.partner"].create(
35-
{
36-
"name": "Test partner",
37-
}
38-
)
39-
# should not be localized yet
40-
test_partner.write(
41-
{
42-
"street": "Rue des Bourlottes 9",
43-
"zip": "1367",
44-
"city": "Grand-Rosière",
45-
"country_id": self.env.ref("base.be"),
46-
}
47-
)
48-
self.assertFalse(self.location_partner_1.partner_latitude)
49-
self.assertFalse(self.location_partner_1.partner_longitude)
50-
# should be localized after assigning a partner to the location
51-
test_location_1 = self.FSMLocation.create(
52-
{
53-
"name": "Test Location 2",
54-
"phone": "123",
55-
"email": "test@example.com",
56-
"partner_id": test_partner.id,
57-
"owner_id": self.location_partner_1.id,
58-
}
59-
)
60-
self.assertTrue(test_location_1.partner_latitude)
61-
self.assertTrue(test_location_1.partner_longitude)
62-
self.assertAlmostEqual(
63-
test_location_1.partner_latitude, 50.629980, delta=self.delta
64-
)
65-
self.assertAlmostEqual(
66-
test_location_1.partner_longitude, 4.863370, delta=self.delta
67-
)
68-
# direct creation and same exit data
69-
partner_latitude = 1.0
70-
partner_longitude = 2.0
71-
test_location_2 = self.FSMLocation.create(
72-
{
73-
"name": "Test Location 2",
74-
"phone": "123",
75-
"email": "test@example.com",
76-
"partner_id": self.location_partner_1.id,
77-
"owner_id": self.location_partner_2.id,
78-
"partner_latitude": partner_latitude,
79-
"partner_longitude": partner_longitude,
80-
}
81-
)
82-
self.assertTrue(test_location_2.shape)
83-
self.assertAlmostEqual(
84-
test_location_2.partner_latitude, partner_latitude, delta=self.delta
85-
)
86-
self.assertAlmostEqual(
87-
test_location_2.partner_longitude, partner_longitude, delta=self.delta
88-
)
89-
9033
def test_fsm_location_update(self):
9134
# update both coordinates
9235
self.test_location.write(

fieldservice_geoengine/views/fsm_location.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,9 @@
5757
ref="fieldservice_geoengine.field_fsm_location__shape"
5858
/>
5959
<field name="name">FSM Location State colored custom</field>
60-
<field name="classification">custom</field>
6160
<field name="sequence" eval="6" />
6261
<field name="view_id" ref="ir_ui_view_fsm_location_map" />
63-
<field name="geo_repr">colored</field>
62+
<field name="geo_repr">basic</field>
6463
<field name="nb_class" eval="1" />
6564
<field
6665
name="attribute_field_id"

fieldservice_geoengine/views/fsm_order.xml

+26-9
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<field name="arch" type="xml">
88
<xpath expr="//notebook" position="inside">
99
<page name="map" string="Map">
10-
<field name='shape' widget="geo_edit_map" />
10+
<field name='shape' />
1111
<button
1212
string="GeoCode Location"
1313
name="geo_localize"
@@ -34,20 +34,35 @@
3434
<record id="ir_ui_view_fsm_order_map" model="ir.ui.view">
3535
<field name="name">ir.ui.view.fsm.order.map</field>
3636
<field name="arch" type="xml">
37-
<geoengine>
38-
<field name="name" select="1" />
39-
<field name="display_name" />
37+
<geoengine editable="1">
38+
<field name="name" />
4039
<field name="phone" />
41-
<field name="mobile" />
4240
<field name="street" />
4341
<field name="street2" />
4442
<field name="city" />
4543
<field name="state_name" />
46-
<field name='zip' />
44+
<field name="zip" />
4745
<field name="country_name" />
48-
<field name='stage_name' />
46+
<field name="stage_name" />
4947
<field name="shape" />
5048
<field name="custom_color" />
49+
<templates>
50+
<t t-name="info_box">
51+
<b>
52+
Name: <field name="name" />
53+
</b>
54+
<ul>
55+
<li>Phone: <field name="phone" /> </li>
56+
<li>Mobile: <field name="mobile" /> </li>
57+
<li>Street: <field name="street" /> </li>
58+
<li>Street 2: <field name="street2" /> </li>
59+
<li>City: <field name="city" /> </li>
60+
<li>State: <field name="state_name" /> </li>
61+
<li>ZIP: <field name="zip" /> </li>
62+
<li>Country: <field name="country_name" /> </li>
63+
</ul>
64+
</t>
65+
</templates>
5166
</geoengine>
5267
</field>
5368
<field name="priority" eval="16" />
@@ -62,7 +77,9 @@
6277
<field name="classification">unique</field>
6378
<field name="sequence" eval="6" />
6479
<field name="view_id" ref="ir_ui_view_fsm_order_map" />
65-
<field name="geo_repr">colored</field>
80+
<field name="geo_repr">basic</field>
81+
<field name="active_on_startup" eval="True" />
82+
<field name="layer_opacity">0.8</field>
6683
<field name="nb_class" eval="1" />
6784
<field
6885
name="attribute_field_id"
@@ -82,7 +99,7 @@
8299
<field name="classification">custom</field>
83100
<field name="sequence" eval="6" />
84101
<field name="view_id" ref="ir_ui_view_fsm_order_map" />
85-
<field name="geo_repr">colored</field>
102+
<field name="geo_repr">basic</field>
86103
<field name="nb_class" eval="1" />
87104
<field
88105
name="attribute_field_id"

0 commit comments

Comments
 (0)