summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorAntonin Bourguignon <abo@openerp.com>2012-09-11 16:05:07 +0200
committerAntonin Bourguignon <abo@openerp.com>2012-09-11 16:05:07 +0200
commitdaa2b3e813f14421d25921944d9dd412a4c2d114 (patch)
tree6739c5b63f80e3aee54901a89085fb316f3e573c /addons/project_long_term/project_long_term.py
parentb0e6046f73d616fb8b940773afd15319c9b78cce (diff)
parent6c8c793fd9b4b6120beff0935d872d6591f537ad (diff)
[MERGE] latest trunk
bzr revid: abo@openerp.com-20120911140507-1cizcowa4xewvqf8
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index a4df1eb6917..2eab5fa6ac6 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\'.'),
@@ -273,9 +273,16 @@ class account_analytic_account(osv.osv):
_inherit = 'account.analytic.account'
_description = 'Analytic Account'
_columns = {
- 'use_phases': fields.boolean('Phases Planing', help="Check this field if project manages phases"),
+ 'use_phases': fields.boolean('Phases', help="Check this field if you plan to use phase-based scheduling"),
}
+ 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)
return res or vals.get('use_phases')