I have a Qweb report that should display a barcode, but what is shown is the blank where it should be the barcode, below the full code of the report, and the displayed error when the controller /report/barcode is called, any idea?
report definition:
| <report id="roll_label_report" string="Product label" model="mrp.production.product" report_type="qweb-pdf" file="mrp.product_label_document" name="mrp.product_label_document" /> |
report template
<?xml version="1.0" encoding="utf-8"?> |
| call report: |
| def get_label(self, cr, uid, ids, context=None): if ids: if not isinstance(ids, list): ids = [ids] context = dict(context or {}, active_ids=ids, active_model=self._name) return { 'type': 'ir.actions.report.xml', 'report_name': 'mrp.product_label_document', 'context': context, } |
| 404 error: |
| 2015-10-15 20:09:16,239 24721 INFO None werkzeug: 127.0.0.1 - - [15/Oct/2015 20:09:16] "GET /report/barcode/Code128/test-0001 HTTP/1.1" 404 - |
I tried http://localhost:8069/report/barcode/Code128/test-0001 and the barcode is returned without problem, I have another report which also shows one barcode and it works perfectly, but with this example I get a 404 Error, the unique difference is the way of calling the report, the report that show me the barcode is called from Print option at page header, and this report is called from method.