diff options
| author | Denis Ledoux <dle@odoo.com> | 2017-01-26 10:58:23 +0100 |
|---|---|---|
| committer | Denis Ledoux <dle@odoo.com> | 2017-01-26 10:59:58 +0100 |
| commit | 5ea8d4ea33258d3a1decf388a94f011f1e1e4579 (patch) | |
| tree | 0ef11da7f37099ddeb0f61f299ca38f230ae50fb /addons/web/static/src/xml/base.xml | |
| parent | f23394b83a84791a38d7867560da78a02c94f604 (diff) | |
[FIX] base: fix local variable 'res' referenced before assignment
In the loop `for action in self`, if all iterations
passed in the first `if` block only, res
was never assigned, but returned.
This is an oversight during the conversion of the module to the new API
in revision eb04aa1e395d347c474181e90f8c8eded1d17ca3
One could ask himself why `res = False` is before the loop
and not in this `if` block, but we believe this is
in the case multiple actions are passed to this method,
you wouldn't like the result of the first actions in the loop
to be overwritten by `False` when the condition of the last
action of the loop is not met.
For instance the first action returns as result an action but for the
second, the condition to run it is not met, in such a case
you would like what the first action returned as action.
opw-706150
Diffstat (limited to 'addons/web/static/src/xml/base.xml')
0 files changed, 0 insertions, 0 deletions
