Skip to Content
Menu
Dette spørgsmål er blevet anmeldt
1 Svar
5733 Visninger

These are the fields in my import_payment.py

transaction_date = fields.Date(string="Transaction Date",
required=True)
paid_in_ron = fields.Float(string="Amount Paid in RON")
paid_in_euro = fields.Float(string="Amount Paid in EURO")
amount = fields.Float(string="Amount")

Can somebody help me to convert the "paid_in_euro" field based on the "exchange rate" of the "transaction_date" and insert it to "amount" field in "RON(Base currency)"

Sorry I am new at Odoo. Any help would be very much appreciated 


Avatar
Kassér
Bedste svar

You can use odoo's currency conversion function


from_currency._convert(from_amount, to_currency, company, date)
Avatar
Kassér
Forfatter

I had found this functions Sir but I currently don't know how to use it. Can you please provide a sample from the details I had provided from above? Thank you in advance

Related Posts Besvarelser Visninger Aktivitet
1
jun. 18
4442
3
maj 23
20080
2
jan. 19
5742
1
apr. 24
1747
2
jan. 24
1787