diff options
| author | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2020-06-10 17:03:10 +0000 |
|---|---|---|
| committer | Benjamin Frantzen (bfr) <bfr@odoo.com> | 2020-06-18 16:49:32 +0000 |
| commit | ae15f89f73cffaebd20ba74b9c20ad641a1ea5e4 (patch) | |
| tree | c2cab938806908dfbf7f0477976c3d7d289e91d7 /addons/web/static/tests | |
| parent | 80379606dbc7d4afdb22476eea97a28ed88fe497 (diff) | |
[FIX] tools.pdf: do not crash when PDF has no attachments
In the PDF, `DictionaryObject` can be wrapped in `IndirectObject`. For nested
dictionaries, using `get` on a `DictionaryObject` will unwrap the result if it's
an `IndirectObject`, but not `__getitem__` so when trying to futher call `get`
on the result will cause an error: we need to unwrap the object first.
Instead, we patch `DictionaryObject.get()` for it to unwrap the object in case
it's an `IndirectObject`.
This is a follow-up commit of fece5ab1bf2fef043b131f1bd0886f0841116103
closes odoo/odoo#53269
X-original-commit: 189a0b28ec7fdb7472f936450cfd7b4bfd6912ed
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: bfr-o <bfr-o@users.noreply.github.com>
Diffstat (limited to 'addons/web/static/tests')
0 files changed, 0 insertions, 0 deletions
