Reputation: 497
I am trying to get a form/pop-up when i click on 'Save' button.
How can we do this?
What i tried is:
def create(self, cr, uid, ids, context=None):
global globvar
globvar = 1
view_ref = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'cornerstone', 'enroll_program')
view_id = view_ref and view_ref[1] or False
return {
'type': 'ir.actions.act_window',
'name': _('If required add another Program for Learner'),
'res_model': 'learner.info',
'view_type': 'form',
'res_id': ids[0], # this will open particular Learner Details,
'view_id': view_id,
'view_mode': 'form',
'nodestroy': True,
'target':'new',
}
Is there any other method to get pop/up when we click on 'Save' button.
Upvotes: 0
Views: 64
Reputation: 10189
Unfortunately, the create
method is an ORM method, and it is not possible to modify an ORM method to make it return a pop-up instead of a recordset. Take a look at this post:
How to call a wizard from a function in OpenERP7?
Upvotes: 1