İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4782 Görünümler

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
Vazgeç
En İyi Yanıt

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
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Haz 15
4853
1
Mar 15
4604
1
Oca 22
8296
1
Tem 16
24393
0
Haz 16
3725