<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data noupdate="0">
        <!-- Web Note User Group -->
        <record model="res.groups" id="group_web_note_user">
            <field name="name">Web Note / User</field>
            <field name="users" eval="[(4, ref('base.user_root'))]"/>
        </record>
        <!-- Record Rules for Notes -->
        <record id="rule_web_note_private" model="ir.rule">
            <field name="name">Note Private</field>
            <field name="model_id" ref="web_note.model_web_note"/>
            <field name="groups" eval="[(4,ref('group_web_note_user'))]"/>
            <field name="domain_force">['|',('type', '!=', 'private'),'&amp;' ,('type', '=', 'private'), ('create_uid', '=', user.id)]</field>
            <field name="perm_create" eval="True"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_unlink" eval="True"/>
        </record>
        <!-- Record Rules for Notes Containers -->
        <record id="rule_web_note_container_private" model="ir.rule">
            <field name="name">Note Container Private</field>
            <field name="model_id" ref="web_note.model_web_note_container"/>
            <field name="groups" eval="[(4,ref('group_web_note_user'))]"/>
            <field name="domain_force">['|',('type', '!=', 'private'),'&amp;', ('type', '=', 'private'), ('create_uid', '=', user.id)]</field>
            <field name="perm_create" eval="True"/>
            <field name="perm_read" eval="True"/>
            <field name="perm_write" eval="True"/>
            <field name="perm_unlink" eval="True"/>
        </record>
    </data>
</openerp>