Odoo Help

0

Additionnal several fields in opportunity menu

By
anthony
on 5/7/13, 9:00 AM 993 views

Hi,

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.

1
jamesbale
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

anthony
on 5/7/13, 9:09 AM

For you , What is the best solution?

anthony
on 5/8/13, 1:03 PM

Could you give me an example to create it?

anthony
on 5/8/13, 2:20 PM

i update in answer

jamesbale
on 5/9/13, 8:36 AM

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

anthony
on 5/10/13, 6:31 AM

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.

Register

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

0 follower(s)

Stats

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