i have a model preliminary.details, and created a new button create new file in its form view.
What i want is when i click on the button create new file, i want to create and view a new record in the model complete.details(i have already made a model complete.details)
How can it made possible?
Thanks in advance..
try this method for your button object:
def button_function(self, cr, uid, ids, context):
mod_obj = self.pool.get('ir.model.data')
res = mod_obj.get_object_reference(cr, uid, 'complete_details (your module name)', 'complete_details_form_view (your_form_view_id)')
res_id = res and res or False
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: 3/10/15, 5:02 AM|
|Seen: 472 times|
|Last updated: 3/16/15, 8:10 AM|