Adding Task Creator to Project / Task View
OpenERP Project Management module provides great set of features in managing daily tasks within the organization.
By default, the Task Detail page does not display the person who created the task. As the task assigner, it is really important to identify the person who has created/assigned a particular task.
With the OpenERP's rich support/flexibility in customizations, this can be resolved in no time.
In the database, the OpenERP task table (project_task) already contains a field to store the ID of the person who created particular record. We can use this field in implementing our requirement.
Table : project_task
Column : create_uid
We start customization from the model, then move on to the view.
- Find out the model related to Project-Task. As it is used as a default OpenERP installation on Ubuntu, path used here appears like this.
Note that whatever the way you installed OpenERP server, all the modules go in side the ‘addons’ directory in your installation directory.
- Locate the class definition for Task.
i.e. class task(osv.osv):
- Append a new column definition to the columns declaration in task class as follows. (i.e. _columns)
'create_uid': fields.many2one('res.users', 'Created By'),
Save the file.
- It might be necessary to reload/restart OpenERP server to apply the change made.
Now changing Model is done and we can continue to View part.
- Login to the system through Web-Client as the administrator.
- There are alternatives, but one path followed is given below.
Project Mangement (from main menu) >> Tasks >> All Tasks
- On the “All Tasks” page, you’d be able to locate a small button/link named [CUSTOMIZE] at the left-bottom corner of the page (just below the “import | export” links). Click on it, small menu will appear.
- Select “Manage View”.
- Select the view name “project.task.form” from the pop-up window then click Edit.
- To add the new field below the progress bar in task description page, click on the (+) sign in front of progress-bar XML element.
(i.e. ). Small pop-up window will appear.
- Select Node type “Field”, then “create_uid” in next drop down, then select “Update” link.
- On the Properties window that appears next, custom field properties accordingly. Also, selecting the correct group will be necessary.
That’s all. Click on a task and move to Task Detail view. Newly added field should appear there (anyway it should be read-only property).
What is explained above is a simple illustration of OpenERP's flexibility in customization. Similarly it is possible to introduce new fields to the system according to the organizational needs. In this case specifically for the Project Management Module.