[FIX] base: wkhtml2pdf large documents load
Step to reproduce:
Edit documents layout in general setting to add logo and background
select multiple documents (more than 5) e.g. Inventory> delivery slips
print all documents.
Bug:
background and logo missing on the last documents because the pages
were printed before the browser had time to render them
Fix:
wkhtml2pdf has a default delay of 200 ms (--javascript-delay)
increasing the value will allow large document to load
opw-2951594
closes odoo/odoo#114512
X-original-commit: ac2df93eb3f08696189d010bdfa4187e02a94576
Signed-off-by: Julien Castiaux (juc) <juc@odoo.com>
Signed-off-by: Walid Hanniche (waha) <waha@odoo.com>
This commit is contained in:
@@ -296,6 +296,9 @@ class IrActionsReport(models.Model):
|
||||
if paperformat_id.disable_shrinking:
|
||||
command_args.extend(['--disable-smart-shrinking'])
|
||||
|
||||
# Add extra time to allow the page to render
|
||||
command_args.extend(['--javascript-delay', '1000'])
|
||||
|
||||
if landscape:
|
||||
command_args.extend(['--orientation', 'landscape'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user