Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
5719 Lượt xem

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 


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

You can use odoo's currency conversion function


from_currency._convert(from_amount, to_currency, company, date)
Ảnh đại diện
Huỷ bỏ
Tác giả

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

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 18
4435
3
thg 5 23
20070
2
thg 1 19
5729
1
thg 4 24
1739
2
thg 1 24
1773