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.

3

How can I call a wizard from another module/folder

By
Francisco Castro
on 2/14/14, 1:11 PM 2,140 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

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: 2/14/14, 1:11 PM
Seen: 2140 times
Last updated: 3/16/15, 8:10 AM