Odoo Help

0

0
1 Answer
0
Avatar
--deep--

Techno-Functional Associate with 7+ years of experience in Odoo (formerly known as OpenERP).

deep อินเดีย
15/5/17 06:34

In your code, you have not specified from which currency you are trying to convert.

According to your code:

res = self.env['res.currency'].browse(FROM_CURRENCY).compute(move_line.amount_currency,

                                                    move_line.company_id.currency_id)


Refer below example: w.r.t Invoice for more details


inv = self.env['account.invoice'].browse(invoice_id)
currency = inv.currency_id.with_context(date=inv.date_invoice) # Invoice Currency
company_currency = inv.company_id.currency_id # Company Currency
currency.compute(AMOUNT, company_currency) # From Invoice Currency, amount is converted to Company's Currency
Ask a Question
Writer
ป้ายกำกับ
Keep Informed
1 ผู้ติดตาม
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now