summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorPurnendu Singh (OpenERP) <psi@tinyerp.com>2012-08-06 11:41:13 +0530
committerPurnendu Singh (OpenERP) <psi@tinyerp.com>2012-08-06 11:41:13 +0530
commit2bbdc47dc8d791cd502c8fc37ec9a5273ee10292 (patch)
treebc8dbba2cad6cc3eb2d9b343b1552d53698b6987 /addons/project_long_term/project_long_term.py
parentd72386f18fff4abc3e7dcd2b9223a25028375a19 (diff)
parent0d2d7ee5855ecbd463ccc6fd902f3af54c504410 (diff)
[MERGE] merge with main addons
bzr revid: psi@tinyerp.com-20120806061113-1ck1nrda2sdq06im
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index a4df1eb6917..d5ac3868a5e 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -114,7 +114,7 @@ class project_phase(osv.osv):
'task_ids': fields.one2many('project.task', 'phase_id', "Project Tasks", states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]}),
'user_force_ids': fields.many2many('res.users', string='Force Assigned Users'),
'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]},
- help="The ressources on the project can be computed automatically by the scheduler"),
+ help="The resources on the project can be computed automatically by the scheduler."),
'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'), ('pending', 'Pending'), ('done', 'Done')], 'Status', readonly=True, required=True,
help='If the phase is created the state \'Draft\'.\n If the phase is started, the state becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' state.\
\n If the phase is over, the states is set to \'Done\'.'),
@@ -275,6 +275,13 @@ class account_analytic_account(osv.osv):
_columns = {
'use_phases': fields.boolean('Phases Planing', help="Check this field if project manages phases"),
}
+
+ def on_change_template(self, cr, uid, ids, template_id, context=None):
+ res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, context=context)
+ if template_id and 'value' in res:
+ template = self.browse(cr, uid, template_id, context=context)
+ res['value']['use_phases'] = template.use_phases
+ return res
def _trigger_project_creation(self, cr, uid, vals, context=None):
res= super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)