Hello Odoo Community,
My main currency is IQD, and the transaction currency sometimes is IQD and sometimes USD. I have added two fields in the journal items and used Studio to write the following code in Compute field :
self[:1].currency_id._convert(self.debit, self[:1].company_id.currency_id, self[:1].company_id, self[:1].date) if self else 0
self[:1].currency_id._convert(self.credit, self[:1].company_id.currency_id, self[:1].company_id, self[:1].date) if self else 0
However, when I create a transaction, I want to see USD Debit and USD Credit correctly displayed in the journal items.
Can anyone help me achieve this? Am I missing something in my approach?
or any other way to solve for see debit and credit in use?
Thanks in advance!