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 /odoo/addons/base/tests/__init__.py | |
| 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 'odoo/addons/base/tests/__init__.py')
| -rw-r--r-- | odoo/addons/base/tests/__init__.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/odoo/addons/base/tests/__init__.py b/odoo/addons/base/tests/__init__.py index b08e17ca0ae..af317988c81 100644 --- a/odoo/addons/base/tests/__init__.py +++ b/odoo/addons/base/tests/__init__.py @@ -45,3 +45,4 @@ from . import test_tests_tags from . import test_base_document_layout from . import test_form_create from . import test_cloc +from . import test_pdf |
