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',
}
Skapa ett konto idag för att ta del av exklusiva funktioner och engagera dig i vår fantastiska community!
Registrera dig| Relaterade inlägg | Svar | Vyer | Verksamhet | |
|---|---|---|---|---|
|
2
mars 24
|
31153 | |||
|
0
mars 15
|
8153 | |||
|
1
mars 15
|
12632 | |||
|
3
mars 15
|
11277 | |||
|
1
mars 15
|
12557 |
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.