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()}
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
2
6월 15
|
4902 | ||
|
1
3월 15
|
4677 | ||
|
1
1월 22
|
8356 | ||
|
1
7월 16
|
24428 | ||
|
0
6월 16
|
3769 |