Odoo Help

2

0
5 Answers
4
Avatar

Atchuthan - Technical Consultant, Sodexis Inc India

--Atchuthan - Technical Consultant, Sodexis Inc--
4337
| 6 6 10
Puducherry, India
--Atchuthan - Technical Consultant, Sodexis Inc--
Passionate coder in Python/Odoo(formerly known as OpenERP).

Contact me via GMail: atchuthantu@gmail.com via Skype: atchuthan_skype
via Linkedin: http://in.linkedin.com/in/atchuthantu
Atchuthan - Technical Consultant, Sodexis Inc India
5/12/15, 1:14 AM

The problem is due to the use of @api.one.  If you use @api.multi, then you could open any wizard or so.    

    @api.multi
def my_method(self):
return {
'type': 'ir.actions.act_window',
'res_model': 'openacademy.course',
'view_type': 'form',
'view_mode': 'form',
'target': 'new',
}

Check an example available at Account module in this link.
2 Comments
Eduardo BP Spain
5/12/15, 8:33 AM

Thank you very much @Atchuthan. You have my positive vote. Now, the problem is when the course form view pop-up window is opened and I create a new course, the form pop-up window doesn't dissapear. After creating a course in this pop-up window I would like to go back to the form view course (a step back). Is it possible?.

Atchuthan - Technical Consultant, Sodexis Inc India
5/14/15, 12:58 AM

When you click on a button available in the pop-up window, you need to return {'type': 'ir.actions.act_window_close'}

1
Fernando Gomes Portugal
5/5/16, 7:54 PM

Hello all.


I am having the same problem. I can generate the popup but the cancel button doesn't do anything and the save button saves the new record but doesn't close the window.

Since I am using the standard popup generated by Odoo I don't have access to the buttons's python code to add the return type ir.actions.act_window_close ...


Any hint on how to make cancel close the popup window and to use "Save & Close" instead of the "Save" button?


Thanks,


Fernando

Ask a Question
Writer
Keep Informed
2 follower(s)
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