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

How to close a pop up window on button action

By
Ratmil Torres
on 8/7/15, 8:13 AM 1,854 views

I have one2many of model A to B.

class A:

    the_bs: fields.one2many("B")

From A form view I click on one of the B items and B form view is shown with a pop up. There I have set a button and I would like to close B form when I click on it.

3

Axel Mendoza

--Axel Mendoza--
10203
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 8/7/15, 2:04 PM

To close the current open window from a button action just:

return {'type': 'ir.actions.act_window_close'}

Hi, Axel. That´s how it is supposed to work but it doesn´t. Eso es lo que se supone que se haga, pero no funciona.

Ratmil Torres
on 8/7/15, 2:15 PM

Then something is breaking your js code. Actionmanager if i remember ok is the one responsible for this. You need to debug to find what is going on

Axel Mendoza
on 8/8/15, 12:50 AM
0
El hadji Dem
On 9/8/15, 11:00 AM

Hi py, I got the same issue, I try your solution https://www.odoo.com/fr_FR/forum/help-1/question/solved-close-window-on-button-press-4348, but It doesn't work, any idea?

0
Ratmil Torres
On 8/7/15, 10:02 AM

Thanks.

I already tried that. The result is that the action takes effect in the background window. The popup stays open.

0
PY
On 8/7/15, 9:47 AM

Maybe make the button returns the action of the A form view (if A record still in context, else, just return A tree view)

Update:

you can try this then https://www.odoo.com/fr_FR/forum/help-1/question/solved-close-window-on-button-press-4348

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

2 follower(s)

Stats

Asked: 8/7/15, 8:13 AM
Seen: 1854 times
Last updated: 9/8/15, 11:01 AM