Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Odoo 7.0. how to reload wizard

By
willie ho
on 11/16/15, 4:47 AM 363 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?

0

Ankit H Gandhi(AHG)

--Ankit H Gandhi(AHG)--
996
| 5 3 6
Rajkot, India
--Ankit H Gandhi(AHG)--

Learning Python..

Ankit H Gandhi(AHG)
On 11/17/15, 9:19 AM

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

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/16/15, 4:47 AM
Seen: 363 times
Last updated: 11/18/15, 5:33 AM