diff options
| author | Martin Trigaux <mat@odoo.com> | 2017-02-01 16:08:45 +0100 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2017-02-01 16:09:10 +0100 |
| commit | 365d6a888dbb0b6b7829f6ea1f7dc70adf724ecf (patch) | |
| tree | aeca2e0fc97d634ec098f1bcd6bec0290a125cd5 /addons/project/data/project_data.xml | |
| parent | a28405e46916518a54b71ed46c3d05925cebc404 (diff) | |
[FIX] stock: correctly compute custom search method
The search on qty_available was refactored twice:
- b9853db8 to split the method
- a989680b to remove the eval operator
At b9853db8 the order of evaluation introduced a bug so that the domain
('qty_available', '=' 10.0)
was evaluated
if product[qty_available] = 10.0:
which crashed (`=` instead of `==`).
Before b9853db8, this code did not crash as the operator was converted via
if operator == '=':
operator = '=='
which is no longer executed after the split
a989680b replaced the eval by a dictionnary that replaced the eval error by a
KeyError when searching with `=` operator.
This commit changes several things:
- replace the `operator in ('==', '>=', '<=')` as this was evaluated before the
operator replacement code mentionned above
- remove the replacement code as no longer justified since a989680b
- replace the OPERATOR key `==` to always match given key
Diffstat (limited to 'addons/project/data/project_data.xml')
0 files changed, 0 insertions, 0 deletions
