openerp-dev team mailing list archive
-
openerp-dev team
-
Mailing list archive
-
Message #00012
Hiding act_window wizards in form views
-
To:
openerp-dev@xxxxxxxxxxxxxxxxxxx
-
From:
Olivier Dony <odo@xxxxxxxxxxx>
-
Date:
Fri, 15 Oct 2010 16:23:23 +0200
-
Organization:
OpenERP s.a.
-
User-agent:
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6
Hello everyone,
Just a quick heads-up: I've just added support for a new attribute
"multi" = True on ir.actions.act_window object (server-trunk rev 2881)
This allows to hide the action in form view, and make it available only
in list views.
You may specify it explicitly as a field on an ir.actions.act_window
record, or pass it to the <act_window> tag.
Here's an example in stock/stock_invoice_onshipping_view.xml:
<act_window name="Create invoice"
res_model="stock.invoice.onshipping"
src_model="stock.picking"
key2="client_action_multi"
multi="True"
view_mode="form"
view_type="form"
target="new"
id="action_stock_invoice_onshipping"/>
This is also support on reports and (old wizards), so you may also use:
<report ... multi="True"/>
Please use this technique, we don't want to see anymore copy/pasted
nonsense inheriting fields_view_get() on an object just to remove an
action from the sidebar.
Thanks!