Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
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
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
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
|
2
Mai 22
|
33761 | ||
|
0
März 19
|
3927 | ||
|
0
Jan. 19
|
4965 | ||
|
4
Feb. 24
|
12174 | ||
|
0
Jan. 18
|
3853 |