Odoo Help

0

How can I print the exchange rate in invoice

By
Victor Tanvuia
on 1/8/14, 1:16 PM 916 views

I'd like to display the current exchange rate to the company's base currency at the bottom of the invoice. What object/value/function am I looking for.

As a side note, is there a reference of the various fields available within a report?

Thanks.

0
Cesar Ortiz
On 9/21/17, 12:36 AM

HI All, I know is more than three years, but I came across the same need and I have a solution in odoo 9.

Modify the report  ->  report_invoice_document
And Add the following code, it may not be pretty but it works for me and it can give the idea on what to do :


<div class="row" t-if="o.move_id.line_ids[0].amount_currency > 0"> <div class="col-xs-6"> <table class="table table-condensed"> <thead> <tr> <th>Currency</th> <th>Rate</th> </tr> </thead> <tbody> <tr> <td> <span t-field="o.currency_id"/> </td> <td> <t t-if="o.move_id.line_ids[0].debit >0"> <t t-set="therate" t-value="o.move_id.line_ids[0].debit/ o.move_id.line_ids[0].amount_currency"/> </t> <t t-if="o.move_id.line_ids[0].credit >0"> <t t-set="therate" t-value="o.move_id.line_ids[0].credit / o.move_id.line_ids[0].amount_currency"/> </t> $<span t-esc="therate"/> </td> </tr> </tbody> </table> </div> </div>

Hope this helps

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 1/8/14, 1:16 PM
Seen: 916 times
Last updated: 9/21/17, 12:36 AM