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()}
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
Registrati| Post correlati | Risposte | Visualizzazioni | Attività | |
|---|---|---|---|---|
|
2
giu 15
|
5675 | |||
|
Why can't Odoo find my view?
Risolto
|
1
mar 15
|
5359 | ||
|
1
gen 22
|
8994 | |||
|
1
lug 16
|
25257 | |||
|
0
giu 16
|
4340 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.