Odoo Help

Welcome!

This community 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.

0

How do openerp reports get value?

By
willie ho
on 10/30/14, 11:08 PM 606 views

I am modifying some report and I want to know where do the values come from?

for example,

[[ formatLang(o.amount_total, digits=get_digits(dp='Account') ) ]] [[ o.pricelist_id.currency_id. symbol ]]

Where does the amount_total come from?

0

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 10/31/14, 12:35 AM

Check corresponding .py file. Usually, the data is defined in __init__ method.
 

0
Mariusz Mizgier
On 10/31/14, 2:21 AM

I guess that you.are editing sale_order.rml file, where o. stands for object, for which current report is being processed and amount_total for the field which is defined in current model - to see, which field is called how, enable developer mode and see from there by hovering on each of fields label.

Adding on Mariusz' answer: the o actually comes from a for loop, something like repeatIn(objects, 'o') in RML definition. The information is passed to the RML file during rendering as objects variable.

Ivan
on 10/31/14, 9:09 AM

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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 10/30/14, 11:08 PM
Seen: 606 times
Last updated: 3/16/15, 8:10 AM