Hello Dan Cliff,
In Odoo Online (Studio environment), you don't have access to custom Python modules, but you can still add barcodes to your reports using QWeb XML directly inside Studio. The barcode images are generated dynamically by Odoo's built-in /report/barcode/ controller.
Here is how you can achieve it step by step:
- Open the Report in Studio
- Go to the app and open the report you want to modify (eg, Sales Order ).
- Click the Studio (wrench) icon to edit the layout.

- Insert a Field Area
- Add a field, column, or block in the place where you want your barcode to appear.
- This will create a space in the layout.

- Edit Report Sources (XML)
- In Studio, click EDIT SOURCES .
- This will open the underlying QWeb XML code.
- Insert the Barcode Snippet
Add the following XML code where you want the barcode to display:
""""""""""""""""""""""""""""""""
<div>
<div class="col-5">
<span style="margin-left:-60px;">
<img t-if="doc.client_order_ref"style="width:400px;height:70px;"t-att-src="'/report/barcode/?barcode_type=%s&value=%s&width=%s&height=%s' % ('EAN13', doc.client_order_ref, 265, 80)"/>
</span>
<div style="margin-left:100px" t-field="doc.client_order_ref"/>
</div>
</div>
"""""""""""""""""""""""""""""""""""""
- Replace doc.client_order_ref with the field you want to encode as a barcode.
Examples:
- Sales Order Number → doc.name
- Customer Reference → doc.client_order_ref
- Invoice Number → doc.move_name
- Save and Preview
- Click Save in Studio.
- Preview or print the report.
- You will now see both the reference text and a scannable barcode.
If you have any questions, feel free to reach out to us.
Hope this helps!
Thanks & Regards,
Email : odoo@aktivsoftware.com