'Point' object has no attribute 'geometry_type'
Hi! I’ve made a tryton model that uses tryton gis fields but it isn’t working when I try to open the costume module it sends this error message:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 119, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 49, in rpc
return methods.get(request.rpc_method, _dispatch)(
File "/trytond/wsgi.py", line 86, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 162, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 207, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/model/modelview.py", line 272, in fields_view_get
result['arch'], result['fields'] = cls.parse_view(
File "/trytond/model/modelview.py", line 472, in parse_view
fields2 = cls.fields_get(list(fields_def.keys()), level=level)
File "/trytond/model/model.py", line 191, in fields_get
definition[fname] = field.definition(cls, language)
File "/trytond_gis/fields.py", line 58, in definition
definition['geometry_type'] = self.geometry_type
AttributeError: 'Point' object has no attribute 'geometry_type'
Fault: 'Point' object has no attribute 'geometry_type'
Here is my model:
from trytond.pool import Pool
from trytond_gis import fields as geo_fields
from trytond.model import ModelSQL, fields, ModelView
__all__ = ['Jardin']
class Jardin(ModelSQL, ModelView):
"Jardin"
__name__ = 'training.jardin'
_rec_name = 'description'
position = geo_fields.Geometry("Position")
point = geo_fields.Point("Point")
My jardin table:
Table "public.training_jardin"
Column | Type | Collation | Nullable | Default
-------------+--------------------------------+-----------+----------+---------------------------------------------
id | integer | | not null | nextval('training_jardin_id_seq'::regclass)
create_date | timestamp(6) without time zone | | |
create_uid | integer | | |
point | geometry(Point,4326) | | |
position | geometry(Geometry,4326) | | |
write_date | timestamp(6) without time zone | | |
write_uid | integer | | |
Indexes:
"training_jardin_pkey" PRIMARY KEY, btree (id)
Check constraints:
"training_jardin_id_positive" CHECK (id >= 0)
Edited by Aaron Henriquez