How reduce string length in qweb?
Example:
<p t-field="doc.name" />
return stackoverflow I want remowe last 8 character and get stack
<p><t t-esc="doc.name[:-8] if doc.name else ''"/></p>
For string you can use this:
For float value try this one:
<p><t t-esc="'%.2f'%(t.amount)"/></p>
This will print value to exactly two decimal places
For "char" came from DB (just this works for me, Odoo V11)
<p><span t-if="doc.name" t-esc="str(doc.name)[:-8]"/></p>