[FIX] fix wrong filter in opportunity view (crm)

There was two problems:
* it was filtering on the probability of the opportunity, not on the
probability of the stage
* the filters were not prefixed with '&', which means that they gave
weird results when combined in the searchview (in a filter group, filters
are combined with '|', but it breaks when the filters are defined by
an implicit '&')
This commit is contained in:
Géry Debongnie 2014-11-20 11:25:49 +01:00
parent f51d4ea6d0
commit cd1eaabe11
1 changed files with 3 additions and 3 deletions

View File

@ -548,11 +548,11 @@
<field name="probability"/>
<separator/>
<filter string="New" name="new"
domain="[('probability', '=', 0), ('stage_id.sequence', '&lt;=', 1)]"/>
domain="['&amp;', ('stage_id.probability', '=', 0), ('stage_id.sequence', '&lt;=', 1)]"/>
<filter string="Won" name="won"
domain="[('probability', '=', 100), ('stage_id.fold', '=', True)]"/>
domain="['&amp;', ('stage_id.probability', '=', 100), ('stage_id.fold', '=', True)]"/>
<filter string="Lost" name="lost"
domain="[('probability', '=', 0), ('stage_id.fold', '=', True)]"/>
domain="['&amp;', ('stage_id.probability', '=', 0), ('stage_id.fold', '=', True)]"/>
<separator/>
<filter string="My Opportunities" name="assigned_to_me"
domain="[('user_id', '=', uid)]"