77
77
def compute(self, cr, uid, from_currency_id, to_currency_id, from_amount, round=True, context={}, account=None, account_invert=False):
79
79
from_currency_id = to_currency_id
80
xc=self.browse(cr, uid, [from_currency_id,to_currency_id], context=context)
82
xc = self.browse(cr, uid, [from_currency_id,to_currency_id], context=context)
81
83
from_currency = (xc[0].id == from_currency_id and xc[0]) or xc[1]
82
84
to_currency = (xc[0].id == to_currency_id and xc[0]) or xc[1]
83
85
if from_currency['rate'] == 0 or to_currency['rate'] == 0: