summaryrefslogtreecommitdiff
path: root/addons/project
diff options
context:
space:
mode:
authorTanguy Charlier <tac@odoo.com>2016-02-18 01:24:33 +0100
committerAntony Lesuisse <al@openerp.com>2016-02-18 01:25:55 +0100
commit16bf40f7c4827c933dd3c679022987cdb44330c4 (patch)
tree5c2f4f5e5f22be555a032f4ec710ed78bdd9304d /addons/project
parentf3a9f83ff16024140e4eba64bb2a9499568cc450 (diff)
[IMP] hr_timesheet: Timesheet entries are now related to projects
- Hide account_id field and add a required project_id field on timesheet entries - Remove is_timesheet field: as project_id is only required for timesheet entries and not for other analytic lines, it can be used to determine wether a line is a timeheet entry or not. - Remove project_timesheet module as all its functionalities are moved to hr_timesheet - Replace timesheets on contract option on products by timesheets on project - Small fixes and improvements in timesheets and projects views and groups
Diffstat (limited to 'addons/project')
-rw-r--r--addons/project/company.py2
-rw-r--r--addons/project/project_view.xml4
-rw-r--r--addons/project/res_config.py13
-rw-r--r--addons/project/res_config_view.xml2
-rw-r--r--addons/project/security/project_security.xml6
5 files changed, 2 insertions, 25 deletions
diff --git a/addons/project/company.py b/addons/project/company.py
index 5dfb3e0d574..7a08da8071f 100644
--- a/addons/project/company.py
+++ b/addons/project/company.py
@@ -9,7 +9,7 @@ class res_company(osv.osv):
_columns = {
'project_time_mode_id': fields.many2one('product.uom', 'Project Time Unit',
help='This will set the unit of measure used in projects and tasks.\n' \
-"If you use the timesheet linked to projects (project_timesheet module), don't " \
+"If you use the timesheet linked to projects, don't " \
"forget to setup the right unit of measure in your employees.",
),
}
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 48876926d19..52b8e9f0680 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -265,9 +265,6 @@
<field name="user_id"
on_change="onchange_user_id(user_id, context)"
options='{"no_open": True}'/>
- <field name="planned_hours" widget="float_time"
- groups="project.group_time_work_estimation_tasks"
- on_change="onchange_planned(planned_hours)"/>
<field name="legend_blocked" invisible="1"/>
<field name="legend_normal" invisible="1"/>
<field name="legend_done" invisible="1"/>
@@ -391,7 +388,6 @@
<field name="name"/>
<field name="project_id" invisible="context.get('user_invisible', False)"/>
<field name="user_id" invisible="context.get('user_invisible', False)"/>
- <field name="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="stage_id" invisible="context.get('set_visible',False)"/>
</tree>
diff --git a/addons/project/res_config.py b/addons/project/res_config.py
index b5f2b40a27a..657746c7c1b 100644
--- a/addons/project/res_config.py
+++ b/addons/project/res_config.py
@@ -24,14 +24,6 @@ class project_configuration(osv.osv_memory):
help='Lets the company customize which Pad installation should be used to link to new pads '
'(for example: http://ietherpad.com/).\n'
'-This installs the module pad.'),
- 'module_project_timesheet': fields.selection([
- (0, "Do not record timesheets on tasks"),
- (1, "Record timesheet lines per tasks")
- ], "Timesheets on Project",
- 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.\n'
- '-This installs the module project_timesheet.'),
'module_rating_project': fields.selection([
(0, "No customer rating"),
(1, 'Allow activating customer rating on projects, at issue completion')
@@ -58,11 +50,6 @@ class project_configuration(osv.osv_memory):
'module_project_forecast': fields.boolean("Forecasts, planning and Gantt charts"),
}
- def onchange_time_estimation_project_timesheet(self, cr, uid, ids, group_time_work_estimation_tasks):
- if group_time_work_estimation_tasks:
- return {'value': {'group_tasks_work_on_tasks': True}}
- return {}
-
def set_default_generate_project_alias(self, cr, uid, ids, context=None):
config_value = self.browse(cr, uid, ids, context=context).generate_project_alias
self.pool.get('ir.values').set_default(cr, uid, 'project.config.settings', 'generate_project_alias', config_value)
diff --git a/addons/project/res_config_view.xml b/addons/project/res_config_view.xml
index 470f0cdff60..e860f0b8326 100644
--- a/addons/project/res_config_view.xml
+++ b/addons/project/res_config_view.xml
@@ -14,7 +14,7 @@
<group string="Project Management" name="project_management">
<field name="module_sale_service" widget="radio"/>
<field name="module_pad" widget="radio"/>
- <field name="group_time_work_estimation_tasks" on_change="onchange_time_estimation_project_timesheet(group_time_work_estimation_tasks)" widget="radio"/>
+ <field name="group_time_work_estimation_tasks" widget="radio"/>
<label for="id" string="Forecasts"/>
<div>
<div>
diff --git a/addons/project/security/project_security.xml b/addons/project/security/project_security.xml
index 2d8dc77ee81..bda3e201b7a 100644
--- a/addons/project/security/project_security.xml
+++ b/addons/project/security/project_security.xml
@@ -19,14 +19,8 @@
<field name="groups_id" eval="[(4,ref('project.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>