Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reduce string length in qweb odoo

Tags:

odoo

qweb

How reduce string length in qweb?

Example:

<p t-field="doc.name" />

return stackoverflow I want remowe last 8 character and get stack

like image 575
user_odoo Avatar asked Sep 12 '25 23:09

user_odoo


1 Answers

<p><t t-esc="doc.name[:-8] if doc.name else ''"/></p>
like image 177
Naglis Avatar answered Sep 16 '25 09:09

Naglis



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!