summaryrefslogtreecommitdiff
path: root/odoo/release.py
diff options
context:
space:
mode:
authorRaf Geens <raf@odoo.com>2021-04-01 15:39:20 +0000
committerNicolas Lempereur <nle@odoo.com>2021-04-09 08:00:51 +0000
commit266a8e2a8abf936d5fbd45752ddf492d92e6a397 (patch)
treeabc4aae335fd72e87f16b1e65ad80d621e762e76 /odoo/release.py
parentd050cf6d5891c06106aa68e2945e818cfd0b8455 (diff)
[FIX] base: Report which PDFs can't be read
PyPDF2 can't read some PDFs due to bugs, lack of fault-tolerance and not supporting some encryption schemes. When invoices are uploaded directly through the Invoices / Accounting app, that will fail for those files because it will try to read part of them. When invoices are uploaded through the Documents app, they're not read, which means the customer can end up in a situation where read and merge operations (like when printing a selection of original vendor bills) will fail. The structural solution for this is to replace PyPDF2 with a more capable library, like pikepdf: https://github.com/odoo/odoo/pull/64356 . This change is too impactful for stable, and there are compatibility concerns as well. A possible workaround is merging the PDFs we can and bundling the rest together in a zip file. This is possible on the level of just _merge_pdfs, but the PDF extension and mimetype are pretty hard-coded and the changes required to switch them to ZIP based on what happens in _merge_pdfs seem too impactful. Instead, this fix detects as early as possible if the PDFs can't be read and reports it to the user. The excluded PDFs can still be downloaded individually. In this way the user has a workaround and does not need to resort to trial and error to figure out which PDFs are causing the problem. Related tickets: 2359929, 2389679 closes odoo/odoo#68964 X-original-commit: 7a3fb09dbc68797522a3191a3358db296f279b36 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Diffstat (limited to 'odoo/release.py')
0 files changed, 0 insertions, 0 deletions