~openerp-community/openobject-addons/trunk-addons-community

« back to all changes in this revision

Viewing changes to task_access_restrict/task_access_restrict_view.xml

  • Committer: Serpent Consulting Services
  • Date: 2012-02-24 20:15:02 UTC
  • Revision ID: support@serpentcs.com-20120224201502-gph0suz05gjx7dwl
[ADD] Adding the module task_restrict_access : Normally in a real-time scenario, when one project manager is creating tasks of Projects managed by him; he selects his project and for now, he can choose any member who is non-member of the Project. This is not acceptable in live scenarios. Hence, Serpent Consulting Services contributes a module which will only let the mnager add the members of the project chosen by him.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
    <data>
 
4
 
 
5
                <record model="ir.ui.view" id="view_users_form_tasks_access_restrict">
 
6
            <field name="name">res.users.form.restricted</field>
 
7
            <field name="type">form</field>
 
8
            <field name="model">res.users</field>
 
9
            <field name="inherit_id" ref="base.view_users_form"/>
 
10
            <field name="arch" type="xml">
 
11
                <notebook position="inside">
 
12
                    <page string="Projects" groups="base.group_extended">
 
13
                        <separator string="Projects" colspan="4"/>
 
14
                        <field name="project_ids" nolabel="1" colspan="4"/>
 
15
                    </page>
 
16
                </notebook>
 
17
            </field>
 
18
        </record>
 
19
        
 
20
        <record id="project_task_form_tasks_access_restrict" model="ir.ui.view">
 
21
                        <field name="name">project.task.form.restricted</field>
 
22
                        <field name="model">project.task</field>
 
23
                        <field name="type">form</field>
 
24
                        <field name="inherit_id" ref="project.view_task_form2"/>
 
25
                        <field name="arch" type="xml">
 
26
                                <xpath expr="//field[@name='user_id']" position="attributes">
 
27
                        <attribute name="domain">['|',('id','=',uid),('project_ids','=',project_id)]</attribute>
 
28
                </xpath>
 
29
                        </field>
 
30
                </record>
 
31
        
 
32
        
 
33
        
 
34
    </data>
 
35
</openerp>