I have a field with a default value that uses the translation function (underscore):
so_code=fields.Char(string='Κωδικός',copy=False,readonly=True,default=lambda self:_('New'))
It's working and the field gets stored translated depending on the user's language.
But how can I use the field's value in an if statement?
For example, this doesn't work and fails to detect translated values of the field:
if (self["so_code"]==_('New')):