コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
3621 ビュー

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
8月 25
191
0
6月 25
746
3
5月 25
1858
0
4月 25
3
0
4月 25
838