'This function convert the amount given in company currency. It takes either the rate in the voucher (if the
payment_rate_currency_id is relevant) either the rate encoded in the system.
:param amount: float. The amount to convert
:param voucher: id of the voucher on which we want the conversion
:param context: to context to use for the conversion. It may contain the key \'date\' set to the voucher date
field in order to select the good rate to use.
:return: the amount in the currency of the voucher\'s company
:rtype: float'

@api.multi
def _convert_amount(self, amount):

    for voucher in self:
        return voucher.currency_id.compute(amount, voucher.company_id.currency_id)
