Odoo Help

3

How can I call a wizard from another module/folder

By
Francisco Castro
on 2/14/14, 1:11 PM 2,392 views

How can I call a wizard from another module/folder??

I know where are the view and the .py what can I do for call that wizard on another menu?

Which one do you want to call? Please tell me the path and i'll give you an answer according your wizard.

GH Mediacloud, Grover Menacho
on 2/14/14, 4:49 PM
10

Openies Services

--Openies Services--
925
| 2 2 4
Vadodara, India
--Openies Services--

We provide Odoo Services.

Contact us on : contact@openies.com

Openies Services
On 2/14/14, 5:33 PM

If you wanted to call a wizard from button you need to write a button like

<button name='%(module_name.window_action)d' type='action' string='Button'/>

and if you have wrote a method in py file then you need to return action like

def your_method(self, cr, uid, ids, context=None):
    .....
    your code
    .....
    return {
       'name': 'Wizard name'
       'type': 'ir.actions.act_window',
       'res_model': 'wizard_model',
       'view_mode': 'form',
       'view_type': 'form',
       'target': 'new',
       'context': context,
    }

In return "target: new" will popup a wizard. This will help you to call a wizard from another module.

I did that but I have an error

raise NotImplementedError('Many2Many columns should not be used as record name (_rec_name)') NotImplementedError: Many2Many columns should not be used as record name (_rec_name)

Francisco Castro
on 2/18/14, 7:33 AM
0
Francisco Castro
On 2/17/14, 7:14 AM

I did that but I have an error

raise NotImplementedError('Many2Many columns should not be used as record name (_rec_name)') NotImplementedError: Many2Many columns should not be used as record name (_rec_name)
What's Happen?

I suppose you have defined many2many field and in that you are giving columns as name field of model, change it by suffix "id" it will work. for eg. model_id.

Openies Services
on 2/19/14, 2:52 AM

I suppose you have defined many2many field and in that you are giving columns as name field of model, change it by suffix "id" it will work. for eg. model_id.

Openies Services
on 2/19/14, 2:57 AM

thanks it works now

Francisco Castro
on 2/19/14, 5:50 AM

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 2/14/14, 1:11 PM
Seen: 2392 times
Last updated: 3/16/15, 8:10 AM