2011/10/12 Jerzy Orłowski <[email protected]>:
> 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/

_______________________________________________
Mailing list: https://launchpad.net/~openerp-expert-framework
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-expert-framework
More help   : https://help.launchpad.net/ListHelp

Reply via email to