Question: I want to store the geolocation coordinates longitude and latitude such that I later can specify an area and query like this in GORM:

```
SELECT * FROM Place 
WHERE lat BETWEEN :x1 AND :x2
AND lng BETWEEN :y1 AND :y2

```

How do I have to store the coordinates in my Domain? My underlying database is MySQL. 

What I propose is: 

```
class Place {
  double lat
  double lng
}

```

I also read that there is a spacial index. Would you recommend using this with Grails? If so how do I map my domain to fit this?

Answer: 
The best thing you can do, using the Odoo framework, is to **create a button**. You can **open a wizard showing the tree view** with that button. Like this, you can use a search view in the wizard and you can group by the elements with a normal filter. 

If you still want to group the elements directly in the form I'm afraid you should create a widget in JavaScript. The widget should be easier and better, this widget should override or extend the widget that Odoo is using for that kind of fields. 

I didn't make a good research but it seems that [was possible to group the list view in the forms of the 6.1 version](http://www.zbeanztech.com/blog/filtering-one2many-fields-openerp). Maybe you can make a migration of that behaviour

Anyway I recommend you to adapt you needs to the Odoo framework as much as possible to make your life easier.

But, if you finally decide to create the widget and share it with the community, would be awesome :)
Something like this might work:

```xml
<field name="line_ids" context="{'group_by': 'material'}">
    <tree> ...</tree>
<field>

```