listview groupby display fails for groups with count 0
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Web (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Web Team |
Bug Description
I have implemented the _read_group_full method for:
- project.task: stages
- project.task: members (based on project_id in context)
- crm.lead: stages
There are two bugs in the web client that prevent the feature to work correctly:
- list views, with group by having count==0 does not work, I had to
put count==1 to avoid a crash. You can test on list view on
opportunities, group by stage and apply the attached patch to
emphasize the bug.
- search view, when searching on a many2one, it does not put the ID
of the record but the name_get in the context. Go to tasks, kanban
view, group by users -> the context contains the name of the project
and not the ID.
The second part is an important bug as sometimes search will fail as name_search and name_get are not always symetric.
Related branches
Changed in openerp-web: | |
status: | Confirmed → Fix Released |
#2's not a bug, m2o search widgets have always had CharField semantics, the =id in case of exact match is a usability optimization for the default domain, in case the user specifically chose something from the autocompletion list. Putting the m2o id instead is going to break existing code.
For exact ids, the m2o field needs to use a selection widget.