Odoo Help

0

0
1 Answer
1
Avatar

Bejaoui Souheil

--Bejaoui Souheil--
1131
| 2 1 7
Waterloo, بلجيكا
--Bejaoui Souheil--

Odoo developer,  functional and technical consultant

souheil_bejaoui@hotmail.fr

Bejaoui Souheil
28‏/9‏/2016 4:21 ص

Hi,

You can use the fields_view_get method of models.Model.

This method is called whenever odoo is rendering a view of the model.

It gets the correct view given the context and returns the data of the field.

This \tutorial may help.

http://elico-corp.com.sg/2015/10/01/how-to-tech-dynamically-modify-your-view/

Best regards.

2 Comments
Rui Franco
28‏/9‏/2016 5:07 ص

Thanks Bejaoui. That's what I had done: I put a query inside this method But, somewhow, I believe there must be some more... "elegant" way of doing this.

Bejaoui Souheil
28‏/9‏/2016 5:31 ص

For me, i use this method every time i need to dynamically modify a view based on some condition. You can find several examples in the standard addons.

Is there other way to do it? Possible, why not :)

Welcome.

Ask a Question
Writer
Keep Informed
1 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now