Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- 회계
- 재고 관리
- PoS
- Project
- MRP
신고된 질문입니다
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
관련 게시물 | 답글 | 화면 | 활동 | |
---|---|---|---|---|
|
2
5월 22
|
34148 | ||
|
0
3월 19
|
4184 | ||
|
0
1월 19
|
5249 | ||
|
4
2월 24
|
12493 | ||
|
0
1월 18
|
4023 |