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 to manipulate data before its gets viewed?

By
Adrian
on 7/25/13, 9:47 AM 827 views

I have a Custom module, that has a data that changes as time goes on, and i wish to change that data before its gets viewed. How can i achieve this in the easiest way?

0
Nishant Kashyap
On 7/26/13, 4:01 AM

Check example of Functional Field. link text

0
Alan Bell
On 7/25/13, 1:03 PM

make it a functional field, the value of that type of field is calculated on the fly, you give it a function name in your class and the return value of that function is the field value (it actually has to return a dictionary of values so that it works in tree views as well as form views) there is some documentation on them here: https://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/#functional-fields the main non-obvious trick is that the function definition has to be above the field definition (before the _columns={} bit)

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

0 follower(s)

Stats

Asked: 7/25/13, 9:47 AM
Seen: 827 times
Last updated: 3/16/15, 8:10 AM