Hi guys !
I want to add a field who has all the time the same value (for every objects of his class).
How can i do that ?
Thanks.
Hi guys !
I want to add a field who has all the time the same value (for every objects of his class).
How can i do that ?
Thanks.
You can create a field in python like that :
_columns = {
'my_field' : fields.char('My static field', size=64),
}
_defaults = {
'my_field': lambda *a: 'The default value',
}
Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!
Inscrever-se| Publicações relacionadas | Respostas | Visualizações | Atividade | |
|---|---|---|---|---|
|
2
mar. 24
|
31148 | |||
|
0
mar. 15
|
8149 | |||
|
1
mar. 15
|
12629 | |||
|
3
mar. 15
|
11275 | |||
|
1
mar. 15
|
12553 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.