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