group by shows empty groups for falsey values
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
New
|
Undecided
|
Unassigned |
Bug Description
In openerp/osv/orm.py
the method BaseModel.
Unfortunately, this breaks grouping by values that can be falsey even when defined (ints, strings, floats?)
The resulting behavior is that you will see a group with the correct number of values, yet when you try to expand it, you get no results (or wrong results, if some values did have the value false)
As seen from the jsonrpc side, you will receive something along the lines of
{"result": [
{ "foo_count": 15,
"__context": {...},
"__domain": [["foo", "=", false]],
"foo": 0}
], ...}
Now, attempting to expand the group will search with ("foo", "=", false) and not match any of the results that have 0.