I am using the fields_view_get function to change certain properties of the form. However, I am facing 2 issues:
1) the fields_view_get function gets invoked everytime when I click on tree view but only the first time when I click on form view . I want it to be invoked each time I click on the form view.
2) Using context.get('active_ids') always returns None, when I use it inside fields_view_get.
Code Snippet:
def fields_view_get(self, cr, uid, view_id=None, view_type=False, context=None, toolbar=False, submenu=False):
res = super(hr_travel_allowance_request, self).fields_view_get(cr, uid, view_id=view_id, view_type=view_type, context=context, toolbar=toolbar,submenu=submenu)
active_id=context.get('active_ids')
print "Context",active_id
print res
return res
Is there something I am doing wrong when I invoke it?
P.S. Please tell me how to add formatted code to my question. I couldn't find an option to do it.