diff options
| author | Xavier Morel <xmo@odoo.com> | 2020-04-10 10:42:46 +0000 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2020-04-10 12:55:09 +0000 |
| commit | bfcda158fefbc838c9fe0196ad2b53a8e210b57e (patch) | |
| tree | c3a1a538701bdc57bd8e4ff33d799465317335d7 | |
| parent | c1c3764ec35b92b4c79203db4ee88e71c03892be (diff) | |
[FIX] core: logging of arguments remoteobjects
odoo/odoo#46024 improved the serialisation of arrays being logged (in
order to get more relevant data than just `Array(5)`.
However, chrome apparently serialises *argument* objects as array-like
with a few nits, namely that arguments have non-numeric properties
which don't necessarily have a value associated with them.
The array formatter / converter assumed all properties had a value,
resulting in the process crashing rather dramatically.
Filter out non-numeric properties on arrays.
closes odoo/odoo#49418
X-original-commit: 5ff1e41c98f042fd13a1762977cc76604231dfd4
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
| -rw-r--r-- | odoo/tests/common.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/odoo/tests/common.py b/odoo/tests/common.py index 7dc9ba076f2..0d984051fef 100644 --- a/odoo/tests/common.py +++ b/odoo/tests/common.py @@ -1117,10 +1117,12 @@ class ChromeBrowser(): return '[%s]' % ', '.join( repr(p['value']) if p['type'] == 'string' else str(p['value']) for p in arg.get('preview', {}).get('properties', []) + if re.match(r'\d+', p['name']) ) # all that's left is type=object, subtype=None aka custom or # non-standard objects, print as TypeName(param=val, ...), sadly because # of the way Odoo widgets are created they all appear as Class(...) + # nb: preview properties are *not* recursive, the value is *all* we get return '%s(%s)' % ( arg.get('className') or 'object', ', '.join( |
