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
16 changes: 11 additions & 5 deletions base_geoengine/README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

===========================
Geospatial support for Odoo
===========================
Expand All @@ -17,7 +13,7 @@ Geospatial support for Odoo
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github
Expand Down Expand Up @@ -175,6 +171,15 @@ Known issues / Roadmap
Changelog
=========

17.0.1.3.0 (2026-03-24)
-----------------------

- Added ``intermediate_colors`` field to ``geoengine.vector.layer``.
Accepts comma-separated hex color values (e.g. ``#FF0000,#00FF00``) to
define intermediate gradient stops in the colored representation. The
gradient is built as: begin → intermediate(s) → end. The field is
optional; existing behavior is unchanged when left empty.

16.0.1.0.0 (2023-03-20)
-----------------------

Expand Down Expand Up @@ -349,6 +354,7 @@ Contributors

- Red Butay <>
- Sergio Sancho <sersanchus@gmail.com>
- Jose Zambudio <zamberjo@gmail.com>

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion base_geoengine/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Geospatial support for Odoo",
"version": "18.0.1.2.0",
"version": "18.0.1.3.0",
"category": "GeoBI",
"author": "Camptocamp,ACSONE SA/NV,Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
5 changes: 5 additions & 0 deletions base_geoengine/models/geo_vector_layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ class GeoVectorLayer(models.Model):
)
name = fields.Char("Layer Name", translate=True, required=True)
begin_color = fields.Char("Begin color class", required=False, help="hex value")
intermediate_colors = fields.Char(
"Intermediate colors",
required=False,
help="Comma-separated hex values for intermediate gradient stops",
)
end_color = fields.Char(
"End color class", required=False, help="hex value", default="#FF680A"
)
Expand Down
1 change: 1 addition & 0 deletions base_geoengine/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
- Miquel Alzanillas \<<malzanillas@apsl.net>\>
- Red Butay \<\>
- Sergio Sancho \<<sersanchus@gmail.com>\>
- Jose Zambudio \<<zamberjo@gmail.com>\>
8 changes: 8 additions & 0 deletions base_geoengine/readme/HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 17.0.1.3.0 (2026-03-24)

- Added `intermediate_colors` field to `geoengine.vector.layer`. Accepts
comma-separated hex color values (e.g. `#FF0000,#00FF00`) to define
intermediate gradient stops in the colored representation. The gradient
is built as: begin → intermediate(s) → end. The field is optional;
existing behavior is unchanged when left empty.

## 16.0.1.0.0 (2023-03-20)

- LayerSwitcher has been removed as it was not really practical. A
Expand Down
62 changes: 34 additions & 28 deletions base_geoengine/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<title>Geospatial support for Odoo</title>
<style type="text/css">

/*
Expand Down Expand Up @@ -360,21 +360,16 @@
</style>
</head>
<body>
<div class="document">
<div class="document" id="geospatial-support-for-odoo">
<h1 class="title">Geospatial support for Odoo</h1>


<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="geospatial-support-for-odoo">
<h1>Geospatial support for Odoo</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c950c1f2fc10527660c0644383c7aac850fb79c96182cbcbb9879b0d30adba75
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/geospatial/tree/18.0/base_geoengine"><img alt="OCA/geospatial" src="https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-base_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/geospatial&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<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/geospatial/tree/18.0/base_geoengine"><img alt="OCA/geospatial" src="https://img.shields.io/badge/github-OCA%2Fgeospatial-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/geospatial-18-0/geospatial-18-0-base_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/geospatial&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>GeoEngine is an Odoo module that adds spatial/GIS capabilites to Odoo.
It will allow you to :</p>
<ul class="simple">
Expand All @@ -401,20 +396,21 @@ <h1>Geospatial support for Odoo</h1>
</li>
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-5">Known issues / Roadmap</a></li>
<li><a class="reference internal" href="#changelog" id="toc-entry-6">Changelog</a><ul>
<li><a class="reference internal" href="#section-1" id="toc-entry-7">16.0.1.0.0 (2023-03-20)</a></li>
<li><a class="reference internal" href="#section-1" id="toc-entry-7">17.0.1.3.0 (2026-03-24)</a></li>
<li><a class="reference internal" href="#section-2" id="toc-entry-8">16.0.1.0.0 (2023-03-20)</a></li>
</ul>
</li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-8">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-9">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-10">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-11">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-12">Maintainers</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-9">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-10">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-11">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-12">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-13">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="installation">
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
<h1><a class="toc-backref" href="#toc-entry-1">Installation</a></h1>
<p>To install this module, you need to have
<a class="reference external" href="http://postgis.net/">PostGIS</a> installed.</p>
<p>On Ubuntu:</p>
Expand All @@ -435,9 +431,9 @@ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
documenation</a></p>
</div>
<div class="section" id="usage">
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
<h1><a class="toc-backref" href="#toc-entry-2">Usage</a></h1>
<div class="section" id="geoengine-demo">
<h3><a class="toc-backref" href="#toc-entry-3">Geoengine Demo</a></h3>
<h2><a class="toc-backref" href="#toc-entry-3">Geoengine Demo</a></h2>
<ol class="arabic simple">
<li>As a user/admin, when I am in the Geoengine Demo module and I go to
the ZIP menu. When I click on an item in the list view, I get to the
Expand Down Expand Up @@ -502,7 +498,7 @@ <h3><a class="toc-backref" href="#toc-entry-3">Geoengine Demo</a></h3>
</ol>
</div>
<div class="section" id="geoengine-backend">
<h3><a class="toc-backref" href="#toc-entry-4">Geoengine Backend</a></h3>
<h2><a class="toc-backref" href="#toc-entry-4">Geoengine Backend</a></h2>
<ol class="arabic simple">
<li>As an admin, if I go into the configuration of the raster layers and
it has elements, I can click on one and see its information.</li>
Expand All @@ -523,12 +519,22 @@ <h3><a class="toc-backref" href="#toc-entry-4">Geoengine Backend</a></h3>
</div>
</div>
<div class="section" id="known-issues-roadmap">
<h2><a class="toc-backref" href="#toc-entry-5">Known issues / Roadmap</a></h2>
<h1><a class="toc-backref" href="#toc-entry-5">Known issues / Roadmap</a></h1>
</div>
<div class="section" id="changelog">
<h2><a class="toc-backref" href="#toc-entry-6">Changelog</a></h2>
<h1><a class="toc-backref" href="#toc-entry-6">Changelog</a></h1>
<div class="section" id="section-1">
<h3><a class="toc-backref" href="#toc-entry-7">16.0.1.0.0 (2023-03-20)</a></h3>
<h2><a class="toc-backref" href="#toc-entry-7">17.0.1.3.0 (2026-03-24)</a></h2>
<ul class="simple">
<li>Added <tt class="docutils literal">intermediate_colors</tt> field to <tt class="docutils literal">geoengine.vector.layer</tt>.
Accepts comma-separated hex color values (e.g. <tt class="docutils literal"><span class="pre">#FF0000,#00FF00</span></tt>) to
define intermediate gradient stops in the colored representation. The
gradient is built as: begin → intermediate(s) → end. The field is
optional; existing behavior is unchanged when left empty.</li>
</ul>
</div>
<div class="section" id="section-2">
<h2><a class="toc-backref" href="#toc-entry-8">16.0.1.0.0 (2023-03-20)</a></h2>
<ul class="simple">
<li>LayerSwitcher has been removed as it was not really practical. A
LayerPanel is now active.</li>
Expand Down Expand Up @@ -656,24 +662,24 @@ <h3><a class="toc-backref" href="#toc-entry-7">16.0.1.0.0 (2023-03-20)</a></h3>
</div>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-8">Bug Tracker</a></h2>
<h1><a class="toc-backref" href="#toc-entry-9">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/geospatial/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/geospatial/issues/new?body=module:%20base_geoengine%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h2><a class="toc-backref" href="#toc-entry-9">Credits</a></h2>
<h1><a class="toc-backref" href="#toc-entry-10">Credits</a></h1>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-10">Authors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-11">Authors</a></h2>
<ul class="simple">
<li>Camptocamp</li>
<li>ACSONE SA/NV</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-11">Contributors</a></h3>
<h2><a class="toc-backref" href="#toc-entry-12">Contributors</a></h2>
<ul class="simple">
<li>Nicolas Bessi &lt;<a class="reference external" href="mailto:nicolas.bessi&#64;camptocamp.com">nicolas.bessi&#64;camptocamp.com</a>&gt;</li>
<li>Frederic Junod &lt;<a class="reference external" href="mailto:frederic.junod&#64;camptocamp.com">frederic.junod&#64;camptocamp.com</a>&gt;</li>
Expand Down Expand Up @@ -702,10 +708,11 @@ <h3><a class="toc-backref" href="#toc-entry-11">Contributors</a></h3>
</li>
<li>Red Butay &lt;&gt;</li>
<li>Sergio Sancho &lt;<a class="reference external" href="mailto:sersanchus&#64;gmail.com">sersanchus&#64;gmail.com</a>&gt;</li>
<li>Jose Zambudio &lt;<a class="reference external" href="mailto:zamberjo&#64;gmail.com">zamberjo&#64;gmail.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h3>
<h2><a class="toc-backref" href="#toc-entry-13">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand All @@ -718,6 +725,5 @@ <h3><a class="toc-backref" href="#toc-entry-12">Maintainers</a></h3>
</div>
</div>
</div>
</div>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -1083,9 +1083,17 @@ export class GeoengineRenderer extends Component {
var end_color_hex = cfg.end_color || DEFAULT_END_COLOR;
var begin_color = chroma(begin_color_hex).alpha(opacity).css();
var end_color = chroma(end_color_hex).alpha(opacity).css();
// Function that maps numeric values to a color palette.
// This scale function is only used when geo_repr is basic
var scale = chroma.scale([begin_color, end_color]);
var gradient_colors = [begin_color];
if (cfg.intermediate_colors) {
cfg.intermediate_colors.split(",").forEach((hex) => {
var trimmed = hex.trim();
if (trimmed) {
gradient_colors.push(chroma(trimmed).alpha(opacity).css());
}
});
}
gradient_colors.push(end_color);
var scale = chroma.scale(gradient_colors);
var serie = new geostats(values);
var vals = null;
switch (cfg.classification) {
Expand Down
8 changes: 8 additions & 0 deletions base_geoengine/views/geo_vector_layer_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
colspan="4"
invisible="geo_repr in ['basic', 'proportion']"
>
<field
name="intermediate_colors"
invisible="classification in ['unique', False]"
/>
<field
name="end_color"
invisible="classification in ['unique', False]"
Expand Down Expand Up @@ -129,6 +133,10 @@
colspan="4"
invisible="geo_repr in ['basic', 'proportion']"
>
<field
name="intermediate_colors"
invisible="classification in ['unique', False]"
/>
<field
name="end_color"
invisible="classification in ['unique', False]"
Expand Down
Loading