This question has been flagged
1 Reply
1167 Views

I have install wkhtmltopdf.

When it wants to print an invoice everything works fine, but when it wants to print later original bill I get file html.

{"code": 200, "message": "Odoo Server Error", "data": {"name": 
"odoo.exceptions.UserError", "debug": "Traceback (most recent call 
last):\n  File 
\"/odootest/odootest-server/addons/web/controllers/main.py\", line 2025,
 in report_download\n    response = self.report_routes(reportname, 
docids=docids, converter=converter, context=context)\n  File 
\"/odootest/odootest-server/odoo/http.py\", line 515, in response_wrap\n
    response = f(*args, **kw)\n  File 
\"/odootest/odootest-server/addons/web/controllers/main.py\", line 1963,
 in report_routes\n    pdf = 
report.with_context(context).render_qweb_pdf(docids, data=data)[0]\n  
File 
\"/odootest/odootest-server/odoo/addons/base/models/ir_actions_report.py\",
 line 755, in render_qweb_pdf\n    return 
self._post_pdf(save_in_attachment, pdf_content=pdf_content, 
res_ids=html_ids), 'pdf'\n  File 
\"/odootest/odootest-server/addons/account_facturx/models/ir_actions_report.py\",
 line 32, in _post_pdf\n    return super(IrActionsReport, 
self)._post_pdf(save_in_attachment, pdf_content=pdf_content, 
res_ids=res_ids)\n  File 
\"/odootest/odootest-server/addons/account/models/ir_actions_report.py\",
 line 23, in _post_pdf\n    raise UserError(_(\"No original vendor bills
 could be found for any of the selected vendor 
bills.\"))\nodoo.exceptions.UserError: ('No original vendor bills could 
be found for any of the selected vendor bills.', '')\n", "message": "No 
original vendor bills could be found for any of the selected vendor 
bills.\n", "arguments": ["No original vendor bills could be found for 
any of the selected vendor bills.", ""], "exception_type": "user_error",
 "context": {}}}

Avatar
Discard
Best Answer

1. Activate Developer Mode

2. Navigate to Settings / Technical / Actions / Reports

3. Search for Invoice and Open each of these actions and verify Save as Attachment Prefix (a field in the Advance Properties Tab) is correctly set: (object.state == 'posted') and ((object.name or 'INV').replace('/','_')+'.pdf')

Avatar
Discard
Author

In Invoice is all correctly. But in Original Bills is 'original_vendor_bill.pdf'. Should I change it ?

Author

Its works, because for every time I have print simple invoice.