Odoo Help


How to retrieve the selected value of a selection field inside a function definition?

John Baldwin
on 1/27/15, 1:25 AM 915 views

I want a simple function too read and return the value of the "type" field (in the crm module) of the current record. When I assign self.type to the value all I get is [] returned, yet I know the selected value is 'lead'? I'm trying to write a dynamic name based on lead or opportunity... Any help would be appreciated.

Kibong Moon
On 1/27/15, 3:41 AM

I guess you missed using @api.one decorator right above the function defnition.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 1/27/15, 1:25 AM
Seen: 915 times
Last updated: 3/16/15, 8:10 AM