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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
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()}
Create an account today to enjoy exclusive features and engage with our awesome community!
РеєстраціяRelated Posts | Відповіді | Переглядів | Дія | |
---|---|---|---|---|
|
2
черв. 15
|
4868 | ||
Why can't Odoo find my view?
Вирішено
|
|
1
бер. 15
|
4611 | |
Can I determine object type in QWeb?
Вирішено
|
|
1
січ. 22
|
8319 | |
|
1
лип. 16
|
24400 | ||
|
0
черв. 16
|
3737 |