تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
3630 أدوات العرض

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.

الصورة الرمزية
إهمال
أفضل إجابة

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

الكاتب

For you , What is the best solution?

الكاتب

Could you give me an example to create it?

i update in answer

الكاتب

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
0
أغسطس 25
192
0
يونيو 25
747
3
مايو 25
1859
0
أبريل 25
3
0
أبريل 25
840