I want to replace the dot (.) with comma (,) and the comma with colon, that's it, a swap of the characters.
Is there any swap function in QWeb?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want to replace the dot (.) with comma (,) and the comma with colon, that's it, a swap of the characters.
Is there any swap function in QWeb?
use python string.replace in t-raw, watch for the order.
....
<t t-raw="'this string includes . , . , . '.replace(',',':').replace('.' , ',')" />
...
Thanks, but that's exactly what am I doing, with an extra intermediate replace. I want to know if there is a swap function to avoid the 3 calls to replace function.
nope. unless you add it yourself.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Oct 23
|
3002 | ||
|
2
Jul 23
|
6306 | ||
|
1
Jun 23
|
4324 | ||
|
1
Apr 23
|
5046 | ||
|
1
Nov 22
|
3756 |
I meant to say:
I want to replace the dot (.) with comma (,) and the comma with dot, that's it, a swap of the characters.
I don't know why I cannot edit my own post...