[16.0][IMP] fieldservice_geoengie: Fix vector Layer related Errors#1453
[16.0][IMP] fieldservice_geoengie: Fix vector Layer related Errors#1453
Conversation
ce2da70 to
d73c57e
Compare
d73c57e to
905d4ab
Compare
905d4ab to
be19652
Compare
| SUPPORTED_ATT = [ | ||
| "float", | ||
| "integer", | ||
| "integer_big", | ||
| "related", | ||
| "function", | ||
| "date", | ||
| "datetime", | ||
| "char", | ||
| "text", | ||
| "selection", | ||
| ] |
There was a problem hiding this comment.
chore (non-blocking): I see these elsewhere in the code as well, but I suspect they may have remained from previous versions, as I cannot find values of ttype matching some of these.
On a fresh odoo installation, opening a shell and inspecting env["ir.model.fields"]._fields["ttype"].selection I get the following fields
['binary', 'boolean', 'char', 'date', 'datetime', 'float', 'html', 'integer', 'json', 'many2many', 'many2one', 'many2one_reference', 'monetary', 'one2many', 'properties', 'properties_definition', 'reference', 'selection', 'text', 'serialized']
There was a problem hiding this comment.
env["ir.model.fields"]._fields["ttype"].selection - list all available ttype values.
fieldservice_geoengine supports only fields based on SUPPORTED_ATT and NUM_ATT which is used in domain to filter from ttype values.
ttype will not match the fields of supported_att and num_att variables and it should list all available types. ttype list seems right and this is my understanding. Please correct me, if my views differ from your thoughts.
There was a problem hiding this comment.
Sorry, I probably wasn't very clear. I didn't mean to imply that fields should be added to SUPPORTED_ATT, but rather that some may be removed (maybe?), like integer_big, related and function.
Either way, non-blocking.
| rec.geo_repr == "colored" | ||
| and ( | ||
| rec.classification != "unique" | ||
| and rec.classification != "custom" | ||
| ) |
There was a problem hiding this comment.
suggestion (non-blocking): readability
| rec.geo_repr == "colored" | |
| and ( | |
| rec.classification != "unique" | |
| and rec.classification != "custom" | |
| ) | |
| rec.geo_repr == "colored" | |
| and rec.classification not in ("unique", "custom") |
I would also add brackets for clarity
(rec.geo_repr == "colored"
and rec.classification not in ("unique", "custom"))
or ....There was a problem hiding this comment.
Updated as suggested
be19652 to
3634d45
Compare
Notifying user to define selected attribute_field_id of supported type from vector layer in infoBox template to avoid JS error. Addressed JS Error when supported data type even defined in geoengine view as well. When a field from attribute_field_id values selected from vector layer is not suitable for "custom" classification, it is notified to the user to avoid JS Error.Similarly for interval classification is also taken care. Domain for attribute_field_id is filter based on classification selection in vector layer to avoid JS Error.
3634d45 to
461ee9e
Compare
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
|




Depends on base_geoengine PR #417
Domain for "attribute_field_id" is filtered based on "classification" field selection in vector layer, which helps to avoid JS error seen as "fsm.order" and "fsm.location" related fields are not validated based on "NUM_ATT" types. base_geoengine_validation.
Notifying user to define selected field from attribute_field_id of supported type in geoengine view which avoids below JS error observed:

Notifying users when a field of supported type from attribute_field_id is not suitable to use for classification type "custom" which avoids below observed JS Error:

As fieldservice_geoengine omits validation for custom classification related to "type" check on field selected in "attribute_field_id", when user selects fields of type "date" with "custom", below JS error observed:
