Here you go
xxxxxxxxxx
<t t-esc='doc.partner_id.phone' t-options="{'widget': 'barcode', 'quiet': 0, 'symbology': 'auto', 'img_style': barcode_size}"/>
other ways of doing it is
xxxxxxxxxx
<table>
<tr>
<td>
<img alt="barcode"
t-att-src="'/report/barcode/?type=%s&value=%s&width=%s&height=%s' % ('Code128', doc.barcode, 600, 120)"
style="max-height:50pt;max-width:100%;"/>
</td>
</tr>
</table>