Ayuda

0

Get the value of "string=" in fields

Avatar
Paolo M

It is possible to access the string of the field?

Example:

privacy = fields.Selection([('y', _("Yes")), ('n', _("No"))], string=_("Generic Privacy")

I want "Generic Privacy"



Thanks in advance



1 Comentario
Avatar
Descartar
Avatar
Gleb
-
1 Respuesta
6
Avatar
Aswani PC
Best Answer

Hi,

You will get field string by adding this in your python code

self._fields['field_name'].string

or  

self.env['model']._fields['field_name'].string

Thanks

2 Comentarios
Avatar
Descartar
Avatar
Paolo M
-

Thank you very much

Avatar
Fabricator
-

It saved time, Thank you so much !