Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5156 Vistas

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
Descartar
Mejor respuesta

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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
2
jun 15
5221
1
mar 15
4925
1
ene 22
8589
1
jul 16
24795
0
jun 16
4003