summaryrefslogtreecommitdiff
path: root/addons/project
diff options
context:
space:
mode:
authorAtul Patel (OpenERP) <atp@tinyerp.com>2012-06-26 12:09:59 +0530
committerAtul Patel (OpenERP) <atp@tinyerp.com>2012-06-26 12:09:59 +0530
commit5eaa8f465a186db2b3b2fdfef6f2a0a050d60c4e (patch)
tree2f05b4dbd349758f937c85b58e71cda493ab2a22 /addons/project
parent0a22debf5fb7af0dbf4ebf5039aa6ecbfb054a95 (diff)
parent32826d52f9ecbdfd0d4e39086cb5507d44ad3605 (diff)
[MERGE]: Merged with lp:openobject-addons
bzr revid: atp@tinyerp.com-20120626063959-xexg3fm1iy9zdfnw
Diffstat (limited to 'addons/project')
-rw-r--r--addons/project/project_view.xml6
-rw-r--r--addons/project/res_config.py16
-rw-r--r--addons/project/res_config_view.xml42
3 files changed, 40 insertions, 24 deletions
diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml
index 9521969857d..be4421f126b 100644
--- a/addons/project/project_view.xml
+++ b/addons/project/project_view.xml
@@ -748,9 +748,9 @@
<field name="inherit_id" ref="base.view_company_form"/>
<field name="arch" type="xml">
<page string="Configuration" position="inside">
- <separator string="Project Management" colspan="4"/>
- <field name="project_time_mode_id" domain="[('category_id','=','Working Time')]"/>
- <newline/>
+ <group string="Project Management">
+ <field name="project_time_mode_id" domain="[('category_id','=','Working Time')]"/>
+ </group>
</page>
</field>
</record>
diff --git a/addons/project/res_config.py b/addons/project/res_config.py
index 0d3c548c913..b112506e073 100644
--- a/addons/project/res_config.py
+++ b/addons/project/res_config.py
@@ -20,6 +20,7 @@
##############################################################################
from osv import osv, fields
+from tools.translate import _
class project_configuration(osv.osv_memory):
_name = 'project.config.settings'
@@ -46,6 +47,8 @@ class project_configuration(osv.osv_memory):
'module_project_issue': fields.boolean("Issues and Bug Tracking",
help="""Provides management of issues/bugs in projects.
This installs the module project_issue."""),
+ 'time_unit': fields.many2one('product.uom', 'Working Time Unit', required=True,
+ help="""This will set the unit of measure used in projects and tasks."""),
'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."""),
@@ -55,9 +58,18 @@ class project_configuration(osv.osv_memory):
'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."),
- 'group_manage_delegation_task': fields.boolean("Manage Taks Delegation",
+ 'group_manage_delegation_task': fields.boolean("Manage Task Delegation",
implied_group='project.group_delegate_task',
- help="Allows you to delegate tasks to other users."),
+ help="Allows you to delegate tasks to other users."),
}
+ def get_default_time_unit(self, cr, uid, fields, context=None):
+ user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
+ return {'time_unit': user.company_id.project_time_mode_id.id}
+
+ def set_time_unit(self, cr, uid, ids, context=None):
+ config = self.browse(cr, uid, ids[0], context)
+ user = self.pool.get('res.users').browse(cr, uid, uid, context)
+ user.company_id.write({'project_time_mode_id': config.time_unit.id})
+
# 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 18c7875fcdc..b1daeb66b22 100644
--- a/addons/project/res_config_view.xml
+++ b/addons/project/res_config_view.xml
@@ -1,6 +1,5 @@
<openerp>
<data>
-
<record id="view_config_settings" model="ir.ui.view">
<field name="name">project settings</field>
<field name="model">project.config.settings</field>
@@ -9,26 +8,31 @@
<field name="arch" type="xml">
<form string="Configure Project" version="7.0">
<header>
- <button string="Apply" type="object" name="execute"/>
+ <button string="Apply" type="object" name="execute" class="oe_highlight_on_dirty"/>
<button string="Cancel" special="cancel"/>
</header>
- <group col="4">
- <separator string="Project" colspan="4"/>
- <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"/>
- <field name="group_manage_delegation_task"/>
-
- <separator string="Planning" colspan="4"/>
- <field name="module_project_long_term"/>
-
- <separator string="Helpdesk and Support" colspan="4"/>
- <field name="module_project_issue"/>
- <field name="module_project_issue_sheet"/>
- <group name="support" colspan="4"/>
- </group>
+ <sheet>
+ <group string="Project">
+ <group>
+ <field name="module_project_mrp"/>
+ <field name="module_project_timesheet"/>
+ <field name="module_pad"/>
+ </group>
+ <group>
+ <field name="group_tasks_work_on_tasks"/>
+ <field name="group_time_work_estimation_tasks"/>
+ <field name="group_manage_delegation_task"/>
+ <field name="time_unit" domain="[('category_id.name','=','Working Time')]"/>
+ </group>
+ </group>
+ <group string="Planning">
+ <field name="module_project_long_term"/>
+ </group>
+ <group string="Helpdesk and Support" name="support">
+ <field name="module_project_issue"/>
+ <field name="module_project_issue_sheet"/>
+ </group>
+ </sheet>
</form>
</field>
</record>