Giter Club home page Giter Club logo

geospatial's Introduction

Runboat Pre-commit Status Build Status codecov Translation Status

geospatial

This project will enable real life GIS support on Odoo.

Available addons

addon version maintainers summary
base_geoengine 16.0.1.0.0 Geospatial support for Odoo
base_geoengine_demo 16.0.1.0.0 Geo spatial support Demo
base_geolocalize_company 16.0.1.0.1 legalsylvain Add latitude and longitude fields on company model
geoengine_base_geolocalize 16.0.1.0.1 Geospatial support for base_geolocalize
geoengine_partner 16.0.1.0.1 Geospatial support of partners
web_view_leaflet_map 16.0.1.0.0 legalsylvain Integrate leaflet.js librairy with odoo and add new 'leaflet_map' view, to display markers.
web_view_leaflet_map_partner 16.0.1.0.0 legalsylvain TODO

Licenses

This repository is licensed under AGPL-3.0.

However, each module can have a totally different license, as long as they adhere to Odoo Community Association (OCA) policy. Consult each module's __manifest__.py file, which contains a license key that explains its license.


OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

geospatial's People

Contributors

alan196 avatar aleuffre avatar alpham-andela avatar asaunier avatar benwillig avatar brian10048 avatar damdam-s avatar dek-odoo avatar dreispt avatar ecino avatar fredj avatar grindtildeath avatar ivorra78 avatar jakobkrabbe avatar kouffsamuel avatar lasley avatar legalsylvain avatar lmarion-source avatar lmignon avatar mymage avatar nbessi avatar nl66278 avatar oca-git-bot avatar oca-travis avatar pedrobaeza avatar sbejaoui avatar sbidoul avatar tonow-c2c avatar weblate avatar yvaucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geospatial's Issues

Geoengine view options

What options are possible in the following?

    <geoengine version="7.0">
        <field name="name" select="1"/>
        <field name="internal_id" select="1"/>
        <field name="type"/>
        <field name="height"/>
    </geoengine>

Specifically:

  • What does select="1" do?
  • How do I sort how fields are displayed? (I tried `sequence="nn" and order="nn", height field shows above type no matter what.
  • I tried <field name="height" invisible="1"/> to make a field available to a colored representation, but the field is displayed
  • Is there any way to link to the form view of that particular record for more detail?
  • What other elements/tags can be used inside the geoengine tag?

I apologize in advance if I should already know any of this, I have tried many things already and tried researching, I'm learning...

Can't use backup tools from odoo web database manager

Hello,

When we try after install geoengine we can't make a backup with the database manager of odoo :
Postgres subprocess ('/usr/bin/pg_dump', '--no-owner', '--username=pg-odoo-production', '--file=/tmp/tmpEvloUK/dump.sql', u'production') error 1

and when we try to do a backup in line we have this error:
pg_dump: [archiver (db)] query failed: ERROR: permission denied for schema topology
pg_dump: [archiver (db)] query was: LOCK TABLE topology.topology IN ACCESS SHARE MODE

have you a solution or a patch ?

Missing link to geoengine_geoname_geocoder wizard in v7

I managed to install the prerequisites and the modules in v7 after some trial and error, but i can't display the link for the wizard in the menu.
The headline "Localize addresses from GeoNames" is shown, but there is nothing below.

[9.0] translations for geoengine_project and geoengine_sale

I tested modules geoengine_project and geoengine_sale with 9.0 enterprise, with French language installed.
Maps are well displayed, but views are not translated anymore for project.project and sale.order.
I noticed that context was not well passed to fields_view_get method.

Note : the migration is not complete for these modules, related issue is #56.

No partner Map

I install the module geoengine_partner in odoo 8.0 but I have not received the map, the background remains white
please as I do to see the partner
image

'bool' object is not iterable

module: base_geoengine
version: 8.0 (9.0.1.1.0 in openerp.py I guess the link in README.rst could use an update)

Steps to reproduce

  • attempt to install base_geoengine on latest OCB odoo
    This started happening after 'git pull'ed last version of OCB it was working before. I tried starting with blank database, still no Joy. (new database manually postgisified)

Current behavior
Traceback (most recent call last):
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 643, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 680, in dispatch
result = self._call_function(*_self.params)
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 316, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/service/model.py", line 118, in wrapper
return f(dbname, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 309, in checked_call
result = self.endpoint(_a, *_kw)
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 959, in call
return self.method(_args, *_kw)
File "/home/jennon/odoo/odoo9c/openerp/http.py", line 509, in response_wrap
response = f(_args, *_kw)
File "/home/jennon/odoo/odoo9c/addons/web/controllers/main.py", line 897, in call_button
action = self._call_kw(model, method, args, {})
File "/home/jennon/odoo/odoo9c/addons/web/controllers/main.py", line 885, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/addons/base/module/module.py", line 459, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/addons/base/module/module.py", line 533, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/home/jennon/odoo/odoo9c/openerp/modules/registry.py", line 386, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/home/jennon/odoo/odoo9c/openerp/modules/loading.py", line 337, in load_modules
loaded_modules, update_module)
File "/home/jennon/odoo/odoo9c/openerp/modules/loading.py", line 237, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/home/jennon/odoo/odoo9c/openerp/modules/loading.py", line 136, in load_module_graph
registry.setup_models(cr, partial=True)
File "/home/jennon/odoo/odoo9c/openerp/modules/registry.py", line 200, in setup_models
model._setup_fields(cr, SUPERUSER_ID, partial)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 353, in old_api
recs = self.browse(cr, uid, [], context)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 250, in wrapper
return old_api(self, _args, *_kwargs)
File "/home/jennon/odoo/odoo9c/openerp/models.py", line 5361, in browse
return self._browse(Environment(cr, uid, context or {}), ids)
File "/home/jennon/odoo/odoo9c/openerp/api.py", line 752, in new
self.cr, self.uid, self.context = self.args = (cr, uid, frozendict(context))
TypeError: 'bool' object is not iterable

trace routes

Good morning, you can use google maps later?

I'm just a beginner as and I would like to draw routes between two points, where do I start?

Thank you

NameError: global name 'wkt' is not defined

module: base_geoengine
version: 8.0

Steps to reproduce

Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 537, in _handle_exception
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 574, in dispatch
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 310, in _call_function
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\service\model.py", line 118, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 307, in checked_call
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 803, in call
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\http.py", line 403, in response_wrap
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\web\controllers\main.py", line 944, in call_kw
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\web\controllers\main.py", line 936, in _call_kw
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 250, in wrapper
File "C:\Users\Pooya\AppData\Local\OpenERP S.A.\Odoo\addons\8.0\base_geoengine\geo_model.py", line 152, in fields_view_get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 250, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\base\res\res_partner.py", line 332, in fields_view_get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 250, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 345, in old_api
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\base\res\res_partner.py", line 64, in fields_view_get_address
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\fields.py", line 819, in get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\fields.py", line 912, in determine_value
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 248, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\models.py", line 3241, in _prefetch_field
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 248, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\models.py", line 3178, in read
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 248, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\models.py", line 3352, in _read_from_database
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\osv\fields.py", line 1454, in get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\base\res\res_company.py", line 85, in _get_address_data
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 250, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server\openerp\addons\base\res\res_partner.py", line 756, in address_get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\fields.py", line 819, in get
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\fields.py", line 912, in determine_value
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 248, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\models.py", line 3241, in _prefetch_field
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\api.py", line 248, in wrapper
File "C:\Program Files (x86)\Odoo 8.0-20151023\server.\openerp\models.py", line 3189, in read
File "C:\Users\Pooya\AppData\Local\OpenERP S.A.\Odoo\addons\8.0\base_geoengine\fields.py", line 47, in convert_to_read
File "C:\Users\Pooya\AppData\Local\OpenERP S.A.\Odoo\addons\8.0\base_geoengine\geo_helper\geo_convertion_helper.py", line 36, in value_to_shape
NameError: global name 'wkt' is not defined

Geo Spatial support demo failed to install

I use Odoo 8 build July 2015 and latest geospatial. After installing all modules, I installed support demo module but failed and gave this error

Odoo Server Error

Traceback (most recent call last):
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 537, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 574, in dispatch
result = self._call_function(*_self.params)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 310, in _call_function
return checked_call(self.db, *args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/service/model.py", line 113, in wrapper
return f(dbname, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 307, in checked_call
return self.endpoint(_a, *_kw)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 803, in call
return self.method(_args, *_kw)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/http.py", line 403, in response_wrap
response = f(_args, *_kw)
File "/media/akram/Data/projects/servers/Odoo/odoo8/addons/web/controllers/main.py", line 948, in call_button
action = self._call_kw(model, method, args, {})
File "/media/akram/Data/projects/servers/Odoo/odoo8/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/addons/base/module/module.py", line 450, in button_immediate_install
return self._button_immediate_function(cr, uid, ids, self.button_install, context=context)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/addons/base/module/module.py", line 498, in _button_immediate_function
registry = openerp.modules.registry.RegistryManager.new(cr.dbname, update_module=True)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/modules/registry.py", line 370, in new
openerp.modules.load_modules(registry._db, force_demo, status, update_module)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/modules/loading.py", line 355, in load_modules
loaded_modules, update_module)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/modules/loading.py", line 255, in load_marked_modules
loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/modules/loading.py", line 176, in load_module_graph
_load_data(cr, module_name, idref, mode, kind='data')
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/modules/loading.py", line 118, in _load_data
tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/tools/convert.py", line 901, in convert_file
convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/tools/convert.py", line 987, in convert_xml_import
obj.parse(doc.getroot(), mode=mode)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/tools/convert.py", line 853, in parse
self._tags[rec.tag](self.cr, rec, n, mode=mode)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/tools/convert.py", line 763, in _tag_record
id = self.pool['ir.model.data']._update(cr, self.uid, rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode, context=rec_context )
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/addons/base/ir/ir_model.py", line 1077, in _update
res_id = model_obj.create(cr, uid, values, context=context)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 241, in wrapper
return old_api(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 336, in old_api
result = method(recs, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/models.py", line 4077, in create
record = self.browse(self._create(old_vals))
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 239, in wrapper
return new_api(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/api.py", line 462, in new_api
result = method(self._model, cr, uid, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/models.py", line 4215, in _create
tuple([u[2] for u in updates if len(u) > 2])
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/sql_db.py", line 158, in wrapper
return f(self, _args, *_kwargs)
File "/media/akram/Data/projects/servers/Odoo/odoo8/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
ParseError: "Geometry SRID (0) does not match column SRID (900913)
" while parsing /media/akram/Data/projects/servers/Odoo/addons/odoo8/base_geoengine_demo/data/retail_machine_geom.xml:4, near

1
1057
low
POINT(746676.106813609 5865349.7175855)
ok

System
configuration is
Postgres SQL
Version 9.4.1
Location runtime/bin/pgsql
Port 65432
Addons geos-3.4.2
proj4-4.8.0
postgis-2.1.6
swig-3.0.4
Python
Version 2.7.8
Location runtime/bin/python
Addons aeroo-lib- 1.2.0
argparse-1.3.0
Babel-1.3
BeautifulSoup-3.2.1
beautifulsoup4-4.3.2
bz2file-0.98
crypto-1.3.4
decorator-3.4.0
daemonize-2.3.1
docutils-0.12
erppeek-1.6.1
fabric-1.10.1
feedparser-5.1.3
gdal-1.9.1
gdata-2.0.18
genshi-0.7
geoip2-2.1.0
geojson-3.6.5
geopy-0.95.1
gevent_psycopg2 -0.0.3
gevent-1.0.1
graphviz-0.4.3
greenlet-0.4.5
jcconv-0.2.3
ipdb-0.8
Jinja2-2.7.3
jsonrpc2-0.4.1
lxml-3.4.1
M2Crypto-0.22.3
Mako-1.0.1
markdown-2.6.2
MarkupSafe-0.23
mock-1.0.1
mygengo-1.3.3
openoffice-python-0.1.p
passlib-1.6.2
Pillow-2.8.1
pip-7.0.3
psutil-2.2.0
psycogreen-1.0
psycopg2-2.6
pudb-2015.2
py2cairo-1.10.0
py3o.template
PyChart-1.39
pycups-1.9.72
pydot-1.0.2
pygeoip-0.3.2
pygobject-3.16.0
pyinotify-0.9.6
pyparsing-2.0.3
pyPdf-1.13
pyPDF2-1.24
pyserial-2.7
pysqlite-2.6.3
python-dateutil-2.4.2
python-ldap-2.4.19
python-openid-2.2.5
pytz-2014.10
pyusb-1.0.0b2
PyWebDAV-0.9.8
PyYAML-3.11
qrcode-5.1
reportlab-3.1.44
requests-2.6.0
setuptools-15.0
shapely-1.5.7
simplejson-3.6.5
six-1.9.0
South-1.0.2
suds-0.4
ulif.openoffice
unittest2-0.8.0
uno-0.3.3
vatnumber-1.2
vobject-0.6.6
Werkzeug-0.10.4
wsgiref-0.1.2
xlwt-0.7.5
zkemapi-0.0.1
zsi-lxml-2.0-rc3

 Others         bzip2-1.0.6
                     cairo-1.14.2
                     curl-7.41.0
                     cyrus-sasl-2.1.23
                      db-5.3.21
                     fontconfig-2.11.0
                      freetype-2.5.5
                      gdbm-1.8.3
                     GeoIP
                     gettext-0.18.1.1
                     giflib-5.1.1
                     gdal-2.0.0
                     glib-2.44.0
                     gobject-introspection-1.44.0
                      graphviz-2.38.0
                      jpeg-9a
                     libedit-20150325-3.1
                      libev-4.19
                     libevent-2.0.17
                     libffi-3.2.1
                     libgcrypt-1.6.2
                     libgd-2.1.1
                     libgnutls-3.3.13
                     libgpg-error-1.17
                      libiconv-1.13.1
                     libpng-1.6.16
                      libxml2-2.9.2
                     libxslt-1.1.28
                     ncurses-5.9
                     openjpeg-1.5.1
                     openldap-2.4.40
                      openssh-5.8p1
                     openssl-1.0.2a
                     pcre-8.34
                     pixman-0.32.6
                      pkg-config-0.28
                     readline-6.2
                      sqlite3
                     tiff-4.0.3
                     wkhtmltopdf-0.12.2.1
                     zeromq-3.2.3
                     zlib-1.2.8

Search on non stored field declared with new API fails

offset=offset, limit=limit, order=order, context=context)

base_geoengine/geo_operators.py", line 111, in geo_search
func = _get_geo_func(model, domain)
File "/home/lmi/projects/openerp/odoo-geospatial/geospatial/base_geoengine/geo_operators.py", line 32, in _get_geo_func
current_field = model._columns[domain[0]]
KeyError: 'geo_point'

Unmet dependencies: crm

First module to install of OCA/geospatial is Geospatial support of partners right after fresh build of Odoo July,3 2015. Installing went fine but with some error: CRM and base_geolocalize not installed
geoengine_partner
Uninstall the module failed with Unmet dependencies: crm

So I had to install CRM manually. Uninstall Geospatial support of partners and tried to Geospatial support for base_geolocalize. This installed base_geolocalize and partners modules correctly. Every module installed correctly then after except Geo Spatial support demo.
I think modules should take care of dependency.

base_geoengine fails to install

I'm testing the Geoengine project, but unfortunately am having trouble with the base module.
Yes, i read and followed the docs: installed postgis, pyhton dependencies, created a db to use, created the extensions on it, and cherry-picked odoo/#5620 (odoo/#5618 is already merged).

Nevertheless I still get this error when installing base_geoengine (with demo data):

2015-07-15 21:23:38,829 4730 INFO geospatial openerp.modules.loading: 16 modules loaded in 0.05s, 0 queries
2015-07-15 21:23:38,831 4730 INFO geospatial openerp.modules.loading: loading 17 modules...
2015-07-15 21:23:38,841 4730 CRITICAL geospatial openerp.modules.module: Couldn't load module base_geoengine
2015-07-15 21:23:38,841 4730 CRITICAL geospatial openerp.modules.module: invalid literal for int() with base 10: '2 r3921'
2015-07-15 21:23:38,841 4730 CRITICAL geospatial openerp.service.server: Failed to initialize database `geospatial`.
Traceback (most recent call last):
  File "/home/nitrous/odoo/openerp/service/server.py", line 929, in preload_registries
    registry = RegistryManager.new(dbname, update_module=update_module)
  File "/home/nitrous/odoo/openerp/modules/registry.py", line 370, in new
    openerp.modules.load_modules(registry._db, force_demo, status, update_module)
  File "/home/nitrous/odoo/openerp/modules/loading.py", line 355, in load_modules
    loaded_modules, update_module)
  File "/home/nitrous/odoo/openerp/modules/loading.py", line 255, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "/home/nitrous/odoo/openerp/modules/loading.py", line 143, in load_module_graph
    load_openerp_module(package.name)
  File "/home/nitrous/odoo/openerp/modules/module.py", line 315, in load_openerp_module
    __import__('openerp.addons.' + module_name)
  File "/home/nitrous/odoo/openerp/modules/module.py", line 80, in load_module
    mod = imp.load_module('openerp.addons.' + module_part, f, path, descr)
  File "/home/nitrous/geospatial/base_geoengine/__init__.py", line 22, in <module>
    from . import geo_model
  File "/home/nitrous/geospatial/base_geoengine/geo_model.py", line 27, in <module>
    from . import fields as geo_fields
  File "/home/nitrous/geospatial/base_geoengine/fields.py", line 21, in <module>
    from shapely.geometry import Point
  File "/usr/local/lib/python2.7/dist-packages/shapely/geometry/__init__.py", line 4, in <module>
    from geo import box, shape, asShape, mapping
  File "/usr/local/lib/python2.7/dist-packages/shapely/geometry/geo.py", line 5, in <module>
    from point import Point, asPoint
  File "/usr/local/lib/python2.7/dist-packages/shapely/geometry/point.py", line 7, in <module>
    from shapely.geos import lgeos, DimensionError
  File "/usr/local/lib/python2.7/dist-packages/shapely/geos.py", line 100, in <module>
    geos_capi_version = geos_c_version = _geos_c_version()
  File "/usr/local/lib/python2.7/dist-packages/shapely/geos.py", line 98, in _geos_c_version
    return tuple(int(n) for n in v.split('.'))
  File "/usr/local/lib/python2.7/dist-packages/shapely/geos.py", line 98, in <genexpr>
    return tuple(int(n) for n in v.split('.'))
ValueError: invalid literal for int() with base 10: '2 r3921'

Thanks in advance for your help.

Map Markers / shapes not being displayed

Hi guys. Thanks for this awesome project!

I'm trying out the v7 branch for a customer that is using OpenERP v7 but we are having an issue where the map displays fine but no markers are shown.

Another symptom is that the Measure Distance function shows the distance but there is no line shown to the cursor when moving the mouse.

I am using PostGIS 2.2 on PostgreSQL 9.1, geojson 1.3.2, Shapely 1.2.14
I have tried in Firefox 44 and Chrome 48

Could you suggest what might not be working? There are no errors in the javascript console and there are entries in the "actives" property of the "geoengine_layers" property.

Thanks!

Installed geo modules, created account on geonames.org , Don't see a map.

Hi, I intsalled all geo modules with all server depencies, I created an account on geonames.org, then I activatet the account.
In odoo8 I set a new systemparameter = geoengine_geonames_username = (accountname of geonames)

Then when I want to see the map on the customers I see the buttons, but it's empty, I don't see a map. whats wrong?

Lack of compatibility/installation information.

There is neither information about which Odoo versions will allow GeoSpatial to run correctly, nor a link to a complete installation procedure (or "getting started") document, nor a dependencies list (PostGIS?).

HTTP URIs not compatible with HSTS

HTTP URIs are being provided for static assets, which throws Mixed Content errors on a secured site. The fix is easy enough, relative scheme "//" should be used instead of "http://"

I forked the repo and will submit a pull request once i finish testing.

Place multiples models in one view

Hi,
I'm trying to show three models data in one view, according to this post the better way is to create another model that is populated by a SQL View that joins the three models, I did it, like the post says, the module installs succesfully, but when I try to view the information through the model form view. I got this error:

File "/opt/odoo/server/addons/web/controllers/main.py", line 936, in _call_kw
return getattr(request.registry.get(model), method)(request.cr, request.uid, _args, *_kwargs)
AttributeError: 'geo.point.alert.route' object has no attribute 'get_edit_info_for_geo_column'

and when I try the GeoEngine View, I got this:

TypeError: data.geoengine_layers is undefined

http://myserver:8069/web/js/web.assets_common/83f954b:4191

my module code looks like this:

class EpiiGeoPointAlertRoute(models.Model):
    _name = "geo.point.alert.route"
    _auto = False
    _order = "date DESC"
    #model_id = fields.Integer('ID', readonly=True)
    model_type = fields.Char('Tipo', size=32, readonly=True)
    geo_point = geo_fields.GeoPoint('Punto', readonly=True)
    geo_alert = geo_fields.GeoPoint('Alerta', readonly=True)
    note = fields.Char('Observacion', size=32, readonly=True)
    alert = fields.Selection([('on', 'Encendido'),
                                ('off', 'Apagado'),
                                ('Warn', 'Pánico')],
                                'State',
                                readonly=True)
    route = geo_fields.GeoLine('Recorrido', readonly=True)#sales route
    date = fields.Datetime('Fecha', readonly=True)
    day = fields.Integer('Día', readonly=True)
    month = fields.Integer('Mes', readonly=True)
    year = fields.Integer('Año', readonly=True)

    def init(self, cr):
        tools.sql.drop_view_if_exists(cr, 'geo_point_alert_route')
        cr.execute("""
            CREATE view geo_point_alert_route as
                --SELECT *, row_number() OVER (ORDER BY date ASC) AS id
                --FROM
                (
                    SELECT (p.id*100) as id,
                    'point' as model_type,
                    p.geo_point,
                    NULL::geometry(Point,900913) as geo_alert,
                    p.note,
                    p.date,
                    NULL as alert,
                    NULL::geometry(LineString,900913) as route
                    FROM geo_point p

                UNION

                    SELECT (a.id*10000) as id, 
                    'alert' as model_type,
                    NULL::geometry(Point,900913) as geo_point,
                    a.geo_point as geo_alert,
                    a.note,
                    a.date,
                    a.alert,
                    NULL::geometry(LineString,900913) as route
                    FROM geo_alert a

                UNION

                    SELECT (r.id*1000000) as id, 
                    'route' as model_type,
                    NULL as geo_point,
                    NULL as geo_alert,
                    NULL as note,
                    r.date,
                    NULL as alert,
                    r.route
                    FROM geo_route r
                )
        """)

any idea on how can I solve this?

Grouping in Sales View

My personal opinion is, that the sales view is not worth anything, if it can't be combined with the grouping mechanism used in the list view.

Why would i want to see [insert number of sales here] different sized circles above each other in a customers location?

The camp2camp website sound as if there might be a possibility for grouping...

recent change in odoo 9.0 makes installation of base_geoengine crash

  File "openerp/modules/loading.py", line 237, in load_marked_modules
    loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
  File "openerp/modules/loading.py", line 136, in load_module_graph
    registry.setup_models(cr, partial=True)
  File "openerp/modules/registry.py", line 200, in setup_models
    model._setup_fields(cr, SUPERUSER_ID, partial)
  File "openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "openerp/api.py", line 353, in old_api
    recs = self.browse(cr, uid, [], context)
  File "openerp/api.py", line 250, in wrapper
    return old_api(self, *args, **kwargs)
  File "openerp/models.py", line 5362, in browse
    return self._browse(Environment(cr, uid, context or {}), ids)
  File "openerp/api.py", line 752, in __new__
    self.cr, self.uid, self.context = self.args = (cr, uid, frozendict(context))
TypeError: 'bool' object is not iterable

The culprit seems to be this line:

OCA/OCB@87d160a#diff-5cd113a636a42f726042abc6798a9efaR3037

What happens is that the new parameter partial has been added, and after a couple magic old/new API wrappers the context is True (while True was passed to the new parameter partial).

I haven't investigated further for the moment.

Demo data doesn't load (SRID error)

System configuration :
postgresql-9.4
postgis 2.1
shapely==1.5.9
geojson==1.2.1

2015-07-02 09:13:12,226 29742 INFO XXX openerp.modules.loading: loading base_geoengine_demo/data/retail_machine_geom.xml
2015-07-02 09:13:12,231 29742 ERROR XXX openerp.sql_db: bad query: INSERT INTO "geoengine_demo_automatic_retailing_machine" ("id", "money_level", "state", "total_sales", "name", "the_point", "create_uid", "write_uid", "create_date", "write_date") VALUES(nextval('geoengine_demo_automatic_retailing_machine_id_seq'), 'low', 'ok', 1057.0, '1', 'POINT (746676.106813609 5865349.7175855)', 1, 1, (now() at time zone 'UTC'), (now() at time zone 'UTC')) RETURNING id
Traceback (most recent call last):
File "/XXX/server/openerp/sql_db.py", line 234, in execute
res = self._obj.execute(query, params)
DataError: Geometry SRID (0) does not match column SRID (900913)
...
...
...
ParseError: "Geometry SRID (0) does not match column SRID (900913)
" while parsing XXX/geospatial/base_geoengine_demo/data/retail_machine_geom.xml:4, near

<record model="geoengine.demo.automatic.retailing.machine" id="machine_1">
         <field name="name">1</field>
         <field name="total_sales">1057</field>
         <field name="money_level">low</field>
         <field name="the_point">POINT(746676.106813609 5865349.7175855)</field>
         <field name="state">ok</field>
      </record>

selection_001

base_geoengine_demo: javascript errors

[openerp 6.1 > base_geoengine_demo]

I am getting some javascript errors when accessing geoengine view and geo_edit_map widget

In geoengine view, when there is no record, I get:

  • TypeError: f is undefined (firefox 30.0)
  • Uncaught TypeError: Cannot read property 'attributes' of undefined (chrome 35.0, opera 22.0)

To reproduce on base_geoengine_demo:

  • Open geoengine.demo.automatic.retailing.machine list view
  • Delete all records
  • Open geoengine view -> error

When I am editing a geo_point for the second time, I get:

  • TypeError: a.layer is null (firefox 30.0)
  • Uncaught TypeError: Cannot read property 'selectedFeatures' of null (chrome 35.0, opera 22.0)

To reproduce on base_geoengine_demo:

  • Open geoengine.demo.automatic.retailing.machine list view
  • Edit an existing record
  • Select the point of the map and move it
  • Save changes
  • Click edit again
  • Select the point -> error

[8.0] [9.0] geoengine_demo: TypeError: bin.upperBound is undefined on some search

In demo data, when doing a search by code on retail machines it can raise the following javascript error:

Tested on port of 9.0 and on 8.0

To reproduce:
Open retails machine geoengine view.

Do a search on 3 -> 9 results it works
Do a search on 4 -> 4 results it fails
Do a search on 7 -> 4 results it fails
Remove code 37 do a search on 7-> 3 results it fails
Remove code 27 do a search on 7 -> 2 results it passes

TypeError: bin.upperBound is undefined

http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat.js:351
Traceback:
mapfish.GeoStat.Distribution<.defaultLabelGenerator@http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat.js:351:16
mapfish.GeoStat.Distribution<.classifyWithBounds@http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat.js:383:29
mapfish.GeoStat.Distribution<.classifyByQuantils@http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat.js:415:16
mapfish.GeoStat.Distribution<.classify@http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat.js:452:30
mapfish.GeoStat.Choropleth<.setClassification@http://localhost:8501/base_geoengine/static/src/js/mapfish/GeoStat/Choropleth.js:141:31
GeoengineView<.createVectorLayer@http://localhost:8501/base_geoengine/static/src/js/views/geoengine_view.js:230:13
GeoengineView<.createVectorLayers/<@http://localhost:8501/base_geoengine/static/src/js/views/geoengine_view.js:299:22
_.forEach@http://localhost:8501/web/static/lib/underscore/underscore.js:145:9

Tracing it a bit it seams it fails on geostat.setClassification() when it calls a method classify it passes this.numClasses as nbBins with a value of 5 for 4 items. Then it does a strange
var binSize = Math.round(this.values.length / nbBins);

Which will round to 5, thus looping to compute bounds, it tries to take in account the bound of an non existing 5th object, and fail.

[8.0] geometry edition bug

steps to reproduce:

Expected behavior: I should be able to shift click on the map to draw an area whiile in edit mode

Actual behavior: I cannot draw a polygon while in edit mode. However if I input a zip and a city name and click on the Save button, the information is saved and I can draw a polygon. I have to click Edit then Save again to be able to save the data. The edition cursor for the drawing is not under the mouse cursor, there seem to be a weird offset which is not very comfortable.

error install geo demo data in odoo 8

raise ValueError('External ID not found in the system: %s' % (xmlid))
ParseError: "External ID not found in the system: base_geoengine_demo.field_dummy_zip_total_sales" while parsing /home/fadel/desarrollo/geospatial/base_geoengine_demo/zip_view.xml:71, near


Colored range ZIP
unique


colored


#FF680A

Use mapbox api v4

The v3 version is deprecated

todo:

  • add a new mapbox_token text field in geo_raster_layer.py
  • update url list to have something like "https://a.tiles.mapbox.com/v3/" + l.mapbox_id + "/${z}/${x}/${y}.png?access_token=" + l.mapbox_token

V7.0: VIEW_TYPE - Side Effect !!!

Now, after some modifications i can install base_geoengine module (i will submit a PR for V7.0).
But there is a strange issue after installing it.
All seems to working fine, but when restarting the server, i get the following error(and I can no longer log me into the server):
-------Start Error Log:
File "/usr/lib/pymodules/python2.7/openerp/osv/orm.py", line 948, in create_instance
obj.init(pool, cr)
File "/usr/lib/pymodules/python2.7/openerp/addons/web_dynatree/base.py", line 98, in init
self._columns['type'].selection.append(VIEW_TYPE)
AttributeError: 'tuple' object has no attribute 'append'
-----End Log----

Steps to reproduce:
1- install web_dynatree (from https://bitbucket.org/anybox)
2- install base_geoengine
3- restart OpenERP

appen-view_types

This is also the case with the following modules:
web_nvd3_chart
booking_chart (https://github.com/trobz/openerp-booking-chart
web_dynatree_visual_export

I also think that this will be the case with any installed module dealing with VIEW_TYPE

Any idea ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.