تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
5624 أدوات العرض

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 


الصورة الرمزية
إهمال
أفضل إجابة

You can use odoo's currency conversion function


from_currency._convert(from_amount, to_currency, company, date)
الصورة الرمزية
إهمال
الكاتب

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

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يونيو 18
4380
3
مايو 23
19977
2
يناير 19
5691
1
أبريل 24
1665
2
يناير 24
1749