openerp-expert-framework team mailing list archive
-
openerp-expert-framework team
-
Mailing list archive
-
Message #00653
Re: Overriding <act_window>
2011/10/12 Jerzy Orłowski <jerzy.orlowski@xxxxxxxxxxxx>:
> Hello
>
> I have an <act window.../> in module "A" which displays on the right side of
> form of object X.
> Is there any way to hide it in module "B" without changing the XMLs in
> module "A"?
Hi,
you can modify act windows ('ir.actions.act_window') like every other record.
You have to add to your module an XML node similar to:
<record id="ACT_WIN_ID_MODULE_A" model="ir.actions.act_window">
<field name="groups_id" eval="[(6, 0, [ref('base.group_erp_manager')])]"/>
</record>
This setting says that ACT_WIN_ID_MODULE_A will be seeable by
'base.group_erp_manager' only, that is 'Administration / Access
Rights'. You can even use a group like 'base.group_no_one'
('Useability / No One').
The syntax used by 'eval' is described here
http://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/methods.html#osv.osv.osv.write
(groups_id) is many2many
Ciao
--
Lorenzo Battistini
http://planet.domsense.com/en/author/elbati/
References