Odoo Help


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.


Additionnal several fields in opportunity menu

on 5/7/13, 9:00 AM 710 views


In opportunity menu : I created three new fields : licence, support and development I would like to know the total and transfer the values to expected revenue

For example : Licence = 500 Support = 200 Development = 400 Expected revenue = Licence + support + development Expected revenue = 1 100

Do you have an idea? Thanks in advance.

On 5/7/13, 9:07 AM

You can make Expected revenue a functional field which contain total of all there fields or you can make onchange method on all there fields on change transfer total value to the Expected revenue field

def expexted_revenue(self, cr, uid, ids, field_name, arg, context=None):
            res = {'planned_revenue': 0.0}
            for line in self.browse(cr, uid, ids, context=context):
                res[line.id]['planned_revenue'] = line.license + line.support + line.development
            return res

Ok, Thanks jamesbale. I received your mail the last time. Thanks

on 5/7/13, 9:09 AM

For you , What is the best solution?

on 5/8/13, 1:03 PM

Could you give me an example to create it?

on 5/8/13, 2:20 PM

i update in answer

on 5/9/13, 8:36 AM

Thanks Jamesbale, it working! I used onchange solution. Thanks a million for you help :)

on 5/10/13, 6:31 AM

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

0 follower(s)


Asked: 5/7/13, 9:00 AM
Seen: 710 times
Last updated: 3/16/15, 8:10 AM