İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4599 Görünümler
En İyi Yanıt

there is a standard get_rate function which uses the currency_id and date as parameters to return the correct rate - either reference this or copy the code

 

This is from account/account_move_line.py

cur_obj = self.pool.get('res.currency')

tmp_amount = cur_obj.compute(cr, uid, line.account_id.company_id.currency_id.id, context.get('currency_id',False), abs(line.debit-line.credit), context={'date': line.date})

 

the function is compute not get_rate

 

Avatar
Vazgeç
Üretici

Thank you Kevin, how can i use this? If i use like res=get_rate(invoiceline.company_id.currency_id,invoiceline.date_invoice) it is giving "global name 'get_rate' is not defined " error

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
May 22
33790
0
Mar 19
3938
0
Oca 19
4982
4
Şub 24
12192
0
Oca 18
3861