OCA / geospatial

Odoo and GIS
http://oca.github.io/geospatial/index.html
GNU Affero General Public License v3.0
189 stars 284 forks source link

[16.0] [MIG] base_geoengine_demo : from 12.0 #329

Closed kouffsamuel closed 1 year ago

kouffsamuel commented 1 year ago

This PR allows you to test the work done in the dependent PR

baimont commented 1 year ago

Going to GeoEngine demo and selection the Geoengine view on the ZIP Management gives me a stracktrace:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1583, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1610, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1807, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 696, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 457, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 430, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/web/models/models.py", line 62, in web_search_read
    records = self.search_read(domain, fields, offset=offset, limit=limit, order=order)
  File "/opt/odoo/odoo/models.py", line 4958, in search_read
    records = self.search(domain or [], offset=offset, limit=limit, order=order)
  File "/opt/odoo/odoo/models.py", line 1508, in search
    res = self._search(domain, offset=offset, limit=limit, order=order, count=count)
  File "/opt/odoo/odoo/models.py", line 4629, in _search
    query = self._where_calc(domain)
  File "/opt/odoo/odoo/models.py", line 4397, in _where_calc
    return expression.expression(domain, self).query
  File "/opt/odoo/odoo/osv/expression.py", line 447, in __init__
    self.parse()
  File "/opt/odoo/odoo/osv/expression.py", line 1024, in parse
    expr, params = self.__leaf_to_sql(leaf, model, alias)
  File "/opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/base_geoengine/expressions.py", line 61, in __leaf_to_sql
    rel_query = where_calc(
  File "/opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/base_geoengine/expressions.py", line 134, in where_calc
    return expression.expression(domain, model, alias=alias, query=query).query
  File "/opt/odoo/odoo/osv/expression.py", line 447, in __init__
    self.parse()
  File "/opt/odoo/odoo/osv/expression.py", line 621, in parse
    push(leaf, self.root_model, self.root_alias)
  File "/opt/odoo/odoo/osv/expression.py", line 608, in push
    check_leaf(leaf, internal)
  File "/opt/odoo/odoo/osv/expression.py", line 396, in check_leaf
    raise ValueError("Invalid leaf %s" % str(element))
ValueError: Invalid leaf ('id', 'not in active_ids', '{ACTIVE_IDS}')

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://oca-geospatial-16-0-pr329-e7fb18de2372.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:10216:19) (/web/static/src/core/network/rpc_service.js:34)
    at XMLHttpRequest.<anonymous> (http://oca-geospatial-16-0-pr329-e7fb18de2372.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:10269:27) (/web/static/src/core/network/rpc_service.js:87)
kouffsamuel commented 1 year ago

Going to GeoEngine demo and selection the Geoengine view on the ZIP Management gives me a stracktrace:

Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1583, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1610, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1807, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 696, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 42, in call_kw
    return self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 457, in call_kw
    result = _call_kw_model(method, model, args, kwargs)
  File "/opt/odoo/odoo/api.py", line 430, in _call_kw_model
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/addons/web/models/models.py", line 62, in web_search_read
    records = self.search_read(domain, fields, offset=offset, limit=limit, order=order)
  File "/opt/odoo/odoo/models.py", line 4958, in search_read
    records = self.search(domain or [], offset=offset, limit=limit, order=order)
  File "/opt/odoo/odoo/models.py", line 1508, in search
    res = self._search(domain, offset=offset, limit=limit, order=order, count=count)
  File "/opt/odoo/odoo/models.py", line 4629, in _search
    query = self._where_calc(domain)
  File "/opt/odoo/odoo/models.py", line 4397, in _where_calc
    return expression.expression(domain, self).query
  File "/opt/odoo/odoo/osv/expression.py", line 447, in __init__
    self.parse()
  File "/opt/odoo/odoo/osv/expression.py", line 1024, in parse
    expr, params = self.__leaf_to_sql(leaf, model, alias)
  File "/opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/base_geoengine/expressions.py", line 61, in __leaf_to_sql
    rel_query = where_calc(
  File "/opt/odoo-venv/lib/python3.10/site-packages/odoo/addons/base_geoengine/expressions.py", line 134, in where_calc
    return expression.expression(domain, model, alias=alias, query=query).query
  File "/opt/odoo/odoo/osv/expression.py", line 447, in __init__
    self.parse()
  File "/opt/odoo/odoo/osv/expression.py", line 621, in parse
    push(leaf, self.root_model, self.root_alias)
  File "/opt/odoo/odoo/osv/expression.py", line 608, in push
    check_leaf(leaf, internal)
  File "/opt/odoo/odoo/osv/expression.py", line 396, in check_leaf
    raise ValueError("Invalid leaf %s" % str(element))
ValueError: Invalid leaf ('id', 'not in active_ids', '{ACTIVE_IDS}')

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://oca-geospatial-16-0-pr329-e7fb18de2372.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:10216:19) (/web/static/src/core/network/rpc_service.js:34)
    at XMLHttpRequest.<anonymous> (http://oca-geospatial-16-0-pr329-e7fb18de2372.runboat.odoo-community.org/web/assets/debug/web.assets_backend.js:10269:27) (/web/static/src/core/network/rpc_service.js:87)

I think It's because this module take the changes of this PR #334 but this module depends on #328. I think that as soon as the PR is merged it will be ok. But you can test it locally.

yvaucher commented 1 year ago

/ocabot migration base_geoengine_demo

lmignon commented 1 year ago

superseded by #340 to rebase and resolve conflicts before merge