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
Ratmil Torres
On 2/26/16, 8:15 AM

Thank you very much for your answers. I guess there is no way to know the id of the object that will be used to edit in this form.

0
Wilbert Tan
On 2/26/16, 4:58 AM

Hi,

fields_view_get() method will be called whenever you clicked your form view.

This is a sample:

def fields_view_get(self, cr, uid, view_id=None, view_type='form', context=None, toolbar=False, submenu=False):

     res = super(class_name, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar)

     #your modification

     return res

0

Akhil P Sivan

--Akhil P Sivan--
3423
| 5 3 6
Kochi, India
--Akhil P Sivan--

Interested in exploring Odoo both technically & functionality wise.

email-id : akhilpsivan01@gmail.com

Akhil P Sivan
On 2/25/16, 8:50 PM

Hi,

If you want to do something while opening a form view, you may either override the fields_view_get() method or you may go for a functional field. 

Overriding the fields_view_get() method would be better, and you may find some example references in Odoo addons folder.

Refer this link also: 

http://stackoverflow.com/questions/33654347/how-to-use-fields-view-get-in-odoo-8

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: 2/25/16, 3:20 PM
Seen: 333 times
Last updated: 2/26/16, 8:15 AM