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 form after pressing a custom button?

By
FEDERICO LEONI
on 4/23/15, 4:28 PM 559 views

I created a button on pos.order linked to a server.action to update a custom field. Works fine but I would like to close the form automatically after the update.

I've seen there is the possibility to call a windows action to close it (ir.actions.act_window_close?) but I don't know how to add to my button attributes. 

Here's my (simple) code on form view to call the server action:

<button class="oe_highlight" name="616" string="kot" type="action" states="paid,done,invoiced"/>

How can I modify it without edit the py and xml files? I don't want to affect others databases.

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: 4/23/15, 4:28 PM
Seen: 559 times
Last updated: 4/23/15, 4:32 PM