diff --git a/delivery_automatic_print/models/stock_picking.py b/delivery_automatic_print/models/stock_picking.py index 0a41aa1..51d429d 100644 --- a/delivery_automatic_print/models/stock_picking.py +++ b/delivery_automatic_print/models/stock_picking.py @@ -34,6 +34,7 @@ def button_validate(self): else: pickings = self - report.sudo()._render_qweb_pdf(pickings.ids) + if pickings: + report.sudo()._render_qweb_pdf(pickings.ids) return res