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

Wizard and smart button

By
Jihen BEN ALI
on 3/18/16, 6:20 AM 443 views

Hello everyone,

Could I use smart button to open wizard??? if yes could you give me a sample example.

Thanks

0
Motez
On 3/18/16, 10:38 AM

You can call wizard directly with type action button:

<button  type="action"  name="%(my_action)d" />

could you give me an example please

Jihen BEN ALI
on 3/18/16, 11:01 AM
it is in the account_invoice_view.xml of the account module. You need to place that button in the form you want to add it into
Motez
on 3/18/16, 11:16 AM

I found it thanks for the help

Jihen BEN ALI
on 3/18/16, 11:30 AM

welcome :)

Motez
on 3/18/16, 11:36 AM
0

Jignesh Mehta

--Jignesh Mehta--
2081
| 6 4 8
Surat, India
--Jignesh Mehta--


Jignesh Mehta
On 3/18/16, 8:09 AM

Hello Jihen,


Try this :-

<button class="oe_stat_button" type="object" name="open_tracebility" icon="fa-arrows-v" string="Tracebility" widget="statinfo"/>


@api.multi

def open_tracebility(self):

    res = self.env['ir.actions.act_window'].for_xml_id('custom_module_name', 'wizard_action')

    return res


Hope it works for you.

Thanks,

Thanks for your help but I didn't understand why I'm getting "External ID not found in the system" the wizard view: Comment Wizard school.comment.wizard 30

the button action: @api.multi def create_comment(self): res = self.env['ir.actions.act_window'].for_xml_id('school.comment.wizard', 'view_comment_wizrd_form') return res

Jihen BEN ALI
on 3/18/16, 9:27 AM

Folder name is there instead of school.comment.wizard. Thanks,

Jignesh Mehta
on 3/18/16, 9:32 AM

When I put it the folder name instead of school.comment.wizard I get this error return self.read(cr, uid, [res_id], [], context)[0]

Jihen BEN ALI
on 3/18/16, 10:17 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: 3/18/16, 6:20 AM
Seen: 443 times
Last updated: 3/25/16, 5:17 AM