Skip to Content
Menu
This question has been flagged
1 Reply
3339 Views

i need to make a wizard to edit one2many field.

i made a button to call the wizard to edit the first record but the page will refresh after I save the form.

how can I change the button to reload the wizard but not reloading the page?

Avatar
Discard
Best Answer

Dear Willie,

Use this:

Updated answer.

from openerp.tools.translate import _

Syntax

dummy, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'your_module_name', 'your_wizard_view_id') #in module name like 'hospital_management' and your_wizard_view_id like 'view_wiz_hospital'

Example

dummy, view_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'hospital_management', 'view_wiz_hospital')

return {

'name':_("Display Name"),#Name You want to display on wizard

'view_mode': 'form',

'view_id': view_id,

'view_type': 'form',

'res_model': 'wiz.hospital',# With . Example sale.order

'type': 'ir.actions.act_window',

'target': 'new',

#'domain': '[]',

'nodestroy': True,

'context': context,

#'res_id': ids[0],

}

This code may be help for you.

Thanks & Regards,

Ankit H Gandhi

Avatar
Discard