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?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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?
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
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
Aanmelden
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.