Is there any method to fetch the label of a selection field from its value?
For eg:-
'type': fields.selection([('product','Stockable Product'),('service','Service Product'), ('consu','Consumable Product')],'Type')
if we wish to fetch a product type like product.type
if its value is 'service'
we want to get its label as 'Service Product'
, is there any way to get the label in python or in openerp ?
One solution for this is to make a dictionary like { 'product':'Stockable Product','service':'Service Product', 'consu':'Consumable Product'}. According to the conditions we can fetch the key values from the dictionary
Ok thanks. But is there any method to fetch it directly from the field description itself?