Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
4995 Zobrazení

Hello,

I want to reduce a field value in template like when i use field number with this format ${object.number} it return whole of number, well i want to reduce it from first and last characters, so any one know how to do this?


Avatar
Zrušit
Nejlepší odpověď

You can create a method in the object to do so and call it from the template.

@api.multi
def get_number(self)
# Now you can use any python function
return self.number[1:-1] # Get numbers except first and last


${objeect.get_number()}


Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
čvn 15
5053
1
bře 15
4750
1
led 22
8450
1
čvc 16
24600
0
čvn 16
3866