I am trying to convert a float amount from one currency to another currency (odoo version 8), amount_currency is a float field. for example amount_currency has a usd currency then I want to convert it to company currency.
below is my code, tell me where I am wrong.
@api.onchange('amount_currency')
def currency_onchange(self):
for move_line in self.amount_currency:
res = self.env['res.currency'].compute(move_line.amount_currency,
move_line.company_id.currency_id)