Odoo Help

Welcome!

This community 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.

0

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

By
John Baldwin
on 1/27/15, 1:25 AM 633 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.

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

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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