diff options
| author | DBR (OpenERP) <dbr@tinyerp.com> | 2012-05-04 10:43:26 +0530 |
|---|---|---|
| committer | DBR (OpenERP) <dbr@tinyerp.com> | 2012-05-04 10:43:26 +0530 |
| commit | 5dacfd5148ad3e577ab32f8b0c49d0f9c19a93ee (patch) | |
| tree | 182b978a85aad47185ddb6f977a44e798de082ba /addons/project | |
| parent | 92c675ed55c863a027c190c74cb32f57b7c25d6a (diff) | |
| parent | 6b82c9cd0ce7c099d6a4d0b06d086964c70c45e1 (diff) | |
[Merge]with :lp:~openerp-dev/openobject-addons/trunk-settings-wizards-improvements-jap
bzr revid: dbr@tinyerp.com-20120504051326-oqvpc74t3devixlr
Diffstat (limited to 'addons/project')
| -rw-r--r-- | addons/project/project.py | 2 | ||||
| -rw-r--r-- | addons/project/project_view.xml | 17 | ||||
| -rw-r--r-- | addons/project/res_config.py | 8 | ||||
| -rw-r--r-- | addons/project/res_config_view.xml | 2 | ||||
| -rw-r--r-- | addons/project/security/project_security.xml | 11 |
5 files changed, 30 insertions, 10 deletions
diff --git a/addons/project/project.py b/addons/project/project.py index 0335b7cb540..83bba62fb67 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -165,7 +165,7 @@ class project(osv.osv): 'members': fields.many2many('res.users', 'project_user_rel', 'project_id', 'uid', 'Project Members', help="Project's members are users who can have an access to the tasks related to this project.", states={'close':[('readonly',True)], 'cancelled':[('readonly',True)]}), - 'tasks': fields.one2many('project.task', 'project_id', "Project tasks"), + 'tasks': fields.one2many('project.task', 'project_id', "Task Activities"), 'planned_hours': fields.function(_progress_rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.", store = { 'project.project': (_get_project_and_parents, ['tasks', 'parent_id', 'child_ids'], 10), diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 956b159a0bb..7db8d3c3481 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -239,10 +239,10 @@ <group colspan="6" col="6"> <field name="name" select="1"/> <field name="project_id" select="1" on_change="onchange_project(project_id)"/> - <field name="total_hours" widget="float_time"/> + <field name="total_hours" widget="float_time" groups="project.group_tasks_work_on_tasks"/> <field name="date_deadline" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/> <field name="user_id" select="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/> - <field name="progress" widget="progressbar"/> + <field name="progress" widget="progressbar" groups="project.group_tasks_work_on_tasks"/> </group> <notebook colspan="4"> <page string="Information"> @@ -251,18 +251,19 @@ name="planned_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" + groups="project.group_time_work_estimation_tasks" on_change="onchange_planned(planned_hours, effective_hours)"/> <field name="effective_hours" - widget="float_time" invisible="1"/> + widget="float_time" invisible="1" groups="project.group_tasks_work_on_tasks"/> </group> <group col="3" colspan="2"> - <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2"/> + <field name="remaining_hours" widget="float_time" attrs="{'readonly':[('state','!=','draft')]}" colspan="2" groups="project.group_time_work_estimation_tasks"/> <button name="%(action_project_task_reevaluate)d" string="Reevaluate" type="action" colspan="1" target="new" states="open,pending" icon="gtk-edit"/> </group> <field colspan="4" name="description" nolabel="1" attrs="{'readonly':[('state','=','done')]}"/> - <field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}"> + <field colspan="4" name="work_ids" nolabel="1" attrs="{'readonly':[('state','in',['done','draft'])]}" groups="project.group_tasks_work_on_tasks"> <tree string="Task Work" editable="top"> <field name="name" /> <field name="hours" widget="float_time" sum="Spent Hours"/> @@ -332,7 +333,7 @@ <field name="sequence"/> <field name="state"/> <field name="kanban_state"/> - <field name="remaining_hours" sum="Remaining Time"/> + <field name="remaining_hours" sum="Remaining Time" groups="project.group_time_work_estimation_tasks"/> <field name="date_deadline"/> <templates> <t t-name="task_details"> @@ -422,9 +423,9 @@ <field name="user_id" invisible="context.get('user_invisible', False)"/> <field name="delegated_user_id" invisible="context.get('show_delegated', True)"/> <field name="total_hours" invisible="1"/> - <field name="planned_hours" invisible="context.get('set_visible',False)"/> + <field name="planned_hours" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/> <field name="effective_hours" widget="float_time" sum="Spent Hours" invisible="1"/> - <field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)"/> + <field name="remaining_hours" widget="float_time" sum="Remaining Hours" on_change="onchange_remaining(remaining_hours,planned_hours)" invisible="context.get('set_visible',False)" groups="project.group_time_work_estimation_tasks"/> <field name="date_deadline" invisible="context.get('deadline_visible',True)"/> <field name="type_id" invisible="context.get('set_visible',False)"/> <button name="next_type" invisible="context.get('set_visible',False)" diff --git a/addons/project/res_config.py b/addons/project/res_config.py index 17f3a1cfbb5..5bd0f4ffd7f 100644 --- a/addons/project/res_config.py +++ b/addons/project/res_config.py @@ -35,7 +35,7 @@ class project_configuration(osv.osv_memory): help="""Lets the company customize which Pad installation should be used to link to new pads (by default, http://ietherpad.com/). This installs the module pad."""), - 'module_project_timesheet': fields.boolean("Timesheets and Invoices", + 'module_project_timesheet': fields.boolean("Timesheets per Task", help="""This allows you to transfer the entries under tasks defined for Project Management to the timesheet line entries for particular date and user, with the effect of creating, editing and deleting either ways. @@ -49,6 +49,12 @@ class project_configuration(osv.osv_memory): 'module_project_issue_sheet': fields.boolean("Track and invoice issues working time", help="""Provides timesheet support for the issues/bugs management in project. This installs the module project_issue_sheet."""), + 'group_tasks_work_on_tasks': fields.boolean("Task's Work on Tasks", + implied_group='project.group_tasks_work_on_tasks', + help="Allows you to compute work on tasks."), + 'group_time_work_estimation_tasks': fields.boolean("Time Estimation on Tasks", + implied_group='project.group_time_work_estimation_tasks', + help="Allows you to compute Time Estimation on tasks."), } # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/project/res_config_view.xml b/addons/project/res_config_view.xml index f1221ea0a44..cdf4620a032 100644 --- a/addons/project/res_config_view.xml +++ b/addons/project/res_config_view.xml @@ -17,6 +17,8 @@ <field name="module_project_mrp"/> <field name="module_project_timesheet"/> <field name="module_pad"/> + <field name="group_tasks_work_on_tasks"/> + <field name="group_time_work_estimation_tasks"/> <separator string="Planning" colspan="4"/> <field name="module_project_long_term"/> diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml index a1ead6aa72c..2bfe967e675 100644 --- a/addons/project/security/project_security.xml +++ b/addons/project/security/project_security.xml @@ -18,6 +18,17 @@ <field name="groups_id" eval="[(6,0,[ref('group_project_manager')])]"/> </record> + <record id="group_tasks_work_on_tasks" model="res.groups"> + <field name="name">Task's Work on Tasks</field> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + + <record id="group_time_work_estimation_tasks" model="res.groups"> + <field name="name">Time Estimation on Tasks</field> + <field name="implied_ids" eval="[(4, ref('group_tasks_work_on_tasks'))]"/> + <field name="category_id" ref="base.module_category_hidden"/> + </record> + <record model="ir.rule" id="project_comp_rule"> <field name="name">Project multi-company</field> <field name="model_id" ref="model_project_project"/> |
