| Age | Commit message (Collapse) | Author |
|
|
|
Now that we're closer to switching to P3 for good, these helpers have
outlived their usefulness, and mostly add noise.
All remaining dict.iter*() or dict.view*() must be converted to the
normal keys(), values() or items() calls.
Whenever the result is likely to be used for more than the scope of a
loop, or when the dict needs to be modified during iteration, the calls
must be wrapped in a ``list()``, to protect the new P3 semantics.
Those cases are very exceptional.
Also removed some dead code or improved the API to remove unnecessary
conversions.
|
|
In Python 3:
* various builtins and dict methods were changed to return
view/iterable objects rather than lists
* and the separate Python 2 view/iterable builtins and methods were
removed altogether
This is problematic when using these items as list (which the happens
repeatedly in Odoo), but more viciously when iterating *multiple times*
over them (which also happens, which I've messed up multiple times while
writing this, and which is a pain to debug even when you've just created
the issue).
Convert all code using these to semantics-matching cross-version
helper functions to get the LCD behaviour between P2 and P3, and
forbid the builtins via lint.
issue #8530
|
|
The content of the report module is now dispatched in
the 'base' and the 'web' modules.
|
|
|
|
This partially reverts commits 5d746d0ac663232d656bb57e82fec290bb5d82fd and
73de86c7682a1433da7a755c3092dcb38fba3fd8.
The tightening of access rights was too strong: regular users need to be able
to read models and fields (to create an email templace, for instance.)
[FIX] ir_values: in `get_actions`, exclude field `code`
|
|
The issue is introduced by revision
d465346f1ee4d2399576f03fd5644f74191fc14b
Raphaël actually meant
`res_ids = data.mapped('res_id')`
Indeed, there is no `res_ids` field on `ir.model.data`,
but there is a `res_id`.
In addition, the same code is written correctly in the method
just above this one, `_object_find`
opw-704592
|
|
|
|
|
|
|