Odoo Help


How to add unit price after discount to sales order report?

on 12/11/14, 9:05 AM 870 views

How to operate with fields in reports? I would like to add own column with unit price after discount. 

This is the way, how it doesnt work, but I am sure you know what i am trying to do here:

                        <td class="text-right">
                            <span t-field="l.price_unit*(1-l.discount)"/>

Thanks for any help



| 6 4 7
Lodz, Poland

On 12/11/14, 10:15 AM

You use: t-esc

<span t-esc="l.price_unit*(1-l.discount)"/>

On 12/11/14, 11:30 PM

It works, thank you!

Just note for others: value of discount is not stored in %, so it should be like this  

<span t-esc="l.price_unit*(1-l.discount/100)"/>

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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)


Asked: 12/11/14, 9:05 AM
Seen: 870 times
Last updated: 3/16/15, 8:10 AM