[MERGE] trunk-ir_ui_view_access_rights-mdi (add field groups_id on views)

bzr revid: rco@openerp.com-20120829123539-5m718m71c8o06ujz
This commit is contained in:
Raphael Collet 2012-08-29 14:35:39 +02:00
commit 750165e94d
2 changed files with 11 additions and 2 deletions

View File

@ -599,8 +599,15 @@
<field name="xml_id"/>
</group>
</group>
<field name="arch"/>
</sheet>
<notebook>
<page string="Architecture">
<field name="arch"/>
</page>
<page string="Groups">
<field name="groups_id"/>
</page>
</notebook>
</sheet>
</form>
</field>
</record>

View File

@ -78,6 +78,8 @@ class view(osv.osv):
'field_parent': fields.char('Child Field',size=64),
'xml_id': fields.function(osv.osv.get_xml_id, type='char', size=128, string="External ID",
help="ID of the view defined in xml file"),
'groups_id': fields.many2many('res.groups', 'ir_ui_view_group_rel', 'view_id', 'group_id',
string='Groups', help="If this field is empty, the view applies to all users. Otherwise, the view applies to the users of those groups only."),
}
_defaults = {
'arch': '<?xml version="1.0"?>\n<tree string="My view">\n\t<field name="name"/>\n</tree>',