Skip to content

Commit

Permalink
[MIG] fieldservice_geoengine: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Jun 10, 2024
1 parent 5683715 commit 06fbd57
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
makepot: "true"
services:
postgres:
image: postgres:12.0
image: postgis/postgis:13-3.4
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
Expand Down
2 changes: 1 addition & 1 deletion fieldservice_geoengine/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"name": "Field Service Geoengine",
"summary": "Display Field Service locations on a map with Open Street Map",
"license": "AGPL-3",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"category": "Field Service",
"author": "Open Source Integrators, Odoo Community Association (OCA), Pytech SRL",
"website": "https://github.com/OCA/field-service",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DEFAULT_END_COLOR = "#000000";
const LEGEND_MAX_ITEMS = 10;
const DEFAULT_NUM_CLASSES = 5;

patch(GeoengineRenderer.prototype, "geoengine_renderer_view_patch", {
patch(GeoengineRenderer.prototype, {
styleVectorLayerColored(cfg, data) {
var indicator = cfg.attribute_field_id[1];
var values = this.extractLayerValues(cfg, data);
Expand Down
8 changes: 8 additions & 0 deletions fieldservice_geoengine/tests/test_fsm_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
# Copyright (C) 2023 - TODAY Pytech SRL
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import requests

from odoo import fields
from odoo.tests.common import TransactionCase


class TestFsmLocation(TransactionCase):
@classmethod
def setUpClass(cls):
cls._super_send = requests.Session.send
super().setUpClass()
cls.FSMLocation = cls.env["fsm.location"]
cls.location_partner_1 = cls.env.ref("fieldservice.location_partner_1")
Expand All @@ -31,6 +34,11 @@ def setUpClass(cls):
}
)

@classmethod
def _request_handler(cls, s, r, /, **kw):
"""Don't block external requests."""
return cls._super_send(s, r, **kw)

def test_fsm_location_creation(self):
test_partner = self.env["res.partner"].create(
{
Expand Down
1 change: 1 addition & 0 deletions fieldservice_geoengine/views/fsm_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
<field name="sequence" eval="6" />
<field name="view_id" ref="ir_ui_view_fsm_order_map" />
<field name="geo_repr">colored</field>
<field name="active_on_startup">True</field>
<field name="nb_class" eval="1" />
<field
name="attribute_field_id"
Expand Down
4 changes: 2 additions & 2 deletions fieldservice_geoengine/views/fsm_team.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="name">Orders</field>
<field name="res_model">fsm.order</field>
<field name="view_mode">kanban,tree,geoengine,form,calendar</field>
<field name="context">{'default_team_id': active_id}</field>
<field name="domain">[('team_id', '=', active_id)]</field>
<field name="context">{'default_team_id': id}</field>
<field name="domain">[('team_id', '=', id)]</field>
</record>
</odoo>

0 comments on commit 06fbd57

Please sign in to comment.