Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions base_geoengine/i18n/base_geoengine.pot
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-05-29 13:34+0000\n"
"PO-Revision-Date: 2026-05-29 13:34+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand Down Expand Up @@ -520,6 +522,13 @@ msgstr ""
msgid "Please create a view or modify view mode"
msgstr ""

#. module: base_geoengine
#. odoo-javascript
#: code:addons/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js:0
#, python-format
msgid "Please update latitude and longitude details for: \"%s\""
msgstr ""

#. module: base_geoengine
#: model:ir.model.fields,field_description:base_geoengine.field_ir_model_fields__dim
msgid "PostGIs Dimension"
Expand Down
16 changes: 12 additions & 4 deletions base_geoengine/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-09-16 11:42+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"POT-Creation-Date: 2026-05-29 13:20+0000\n"
"PO-Revision-Date: 2026-05-29 13:20+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
Expand Down Expand Up @@ -540,6 +540,14 @@ msgstr "Parametri WMS"
msgid "Please create a view or modify view mode"
msgstr "Creare una vista o modificare la modalità di visualizzazione"

#. module: base_geoengine
#. odoo-javascript
#: code:addons/base_geoengine/static/src/js/views/geoengine/geoengine_renderer/geoengine_renderer.esm.js:0
#, python-format
msgid "Please update latitude and longitude details for: \"%s\""
msgstr ""
"Si prega di aggiornare le coordinate di latitudine e longitudine per: \"%s\""

#. module: base_geoengine
#: model:ir.model.fields,field_description:base_geoengine.field_ir_model_fields__dim
msgid "PostGIs Dimension"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
reactive,
useState,
} from "@odoo/owl";
import {sprintf} from "@web/core/utils/strings";

/* CONSTANTS */
const DEFAULT_BEGIN_COLOR = "#FFFFFF";
Expand Down Expand Up @@ -53,6 +54,7 @@ export class GeoengineRenderer extends Component {
this.orm = useService("orm");
this.view = useService("view");
this.user = useService("user");
this.notification = useService("notification");

// For related model we need to load all the service needed by RelationalModel
this.services = {};
Expand Down Expand Up @@ -571,22 +573,35 @@ export class GeoengineRenderer extends Component {
onDisplayPopupRecord(record) {
const popup = this.getPopup();
const feature = this.vectorSource.getFeatureById(record.resId);
if (feature !== undefined) {
this.mountGeoengineRecord({
popup,
archInfo: this.props.archInfo,
templateDocs: this.props.archInfo.templateDocs,
record,
if (feature === null) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: this if can probably replace the other if at line 588

for example

if (feature) {
    ...
    return false;
}
this.mountGeoengineRecord({
...

What do you think?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, the new if block is sufficient and hence removed if block which checks for feature is not undefined.

this.notification.add(
sprintf(
this.env._t(
'Please update latitude and longitude details for: "%s"'
),
record.data.display_name
),
{
type: "warning",
}
);
this.clickToHidePopup();
return false;
}
this.mountGeoengineRecord({
popup,
archInfo: this.props.archInfo,
templateDocs: this.props.archInfo.templateDocs,
record,
});
var coord = ol.extent.getCenter(feature.getGeometry().getExtent());
this.overlay.setPosition(coord);
var map_view = this.map.getView();
if (map_view) {
map_view.animate({
center: feature.getGeometry().getFirstCoordinate(),
duration: 500,
});
var coord = ol.extent.getCenter(feature.getGeometry().getExtent());
this.overlay.setPosition(coord);
var map_view = this.map.getView();
if (map_view) {
map_view.animate({
center: feature.getGeometry().getFirstCoordinate(),
duration: 500,
});
}
}
}

Expand Down
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
odoo-test-helper
odoo-addon-base_geoengine @ git+https://github.com/OCA/geospatial.git@refs/pull/417/head#subdirectory=setup/base_geoengine
Loading