Sales order QR on report #12443
|
I'm creating a report which is a package slip on which I want the QR code to be able to use the app to open the SO. In the web interface I can open the QR code and scan it. However, I cannot find the correct information in the report context to generate it: as fas as I can see there is no qr_data like field and the primary key is also not available to construct the string myself. Am I overlooking something? |
Replies: 4 comments 3 replies
|
Try using |
|
Thanks for your suggestion, however it does not see to work. The QR is at the end of the report. Unfortunately, this report gives an "Error rendering template" |
|
don't know whether @SchrodingersGat gets updates, so a tag just in case 😄 |


Use
order.barcode- notbarcodedirectly.e.g.
{% extends "report/inventree_order_report_base.html" %} {% load i18n %} {% load report %} {% load barcode %} {% load inventree_extras %} {% load markdownify %} {% block header_content %} <img class='logo' src='{% qrcode order.barcode %}' alt="{{ customer }}" width='150'> <div class='header-right'> <h3>{% trans "Sales Order" %} {{ prefix }}{{ reference }}</h3> {{ customer.name }} </div> {% endblock header_content %}leads to: