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

Open a wizard when clicking on "save" in a form in edit mode [Odoo 9]

By
Judith
on 8/25/16, 3:33 AM 324 views

[Odoo 9]

Hello,

I am trying to open a wizard when i click on the "Save" Button of a form view (when it is in edit mode). This should appen only in the expense module, when the expense in in state "submit".

So far, i have managed to get an alert when i click on save, but i don't know how to  attach my wizard and how to restrict this action only to "submit" state.

This is the javascript code i used to get the alert:

var popup = document.getElementsByClassName('oe_form_button_save btn btn-primary btn-sm')[0];

popup.addEventListener('click', function()

{

alert('Hello world');

},

false);

The wizard works well when i add an extra button to call it.

Can someone help me with this? 

Thank you :)

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: 8/25/16, 3:33 AM
Seen: 324 times
Last updated: 8/25/16, 3:45 AM