summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorArnaud Pineux <api@openerp.com>2012-11-13 14:49:11 +0100
committerArnaud Pineux <api@openerp.com>2012-11-13 14:49:11 +0100
commit7b76c5216e64cedd201cd0cab2a3fa80fdc66901 (patch)
tree1efb5083771c94a55d8d143033b43a8f7d1ebbdf /addons/project_long_term/project_long_term.py
parente6541e77913f3d408fe25897810323265d9e9b20 (diff)
parentf8d9112ef7d4f18bb7a3a19fafc6194eb09caa0a (diff)
[MERGE] fix the phone call to opportunity to quotation
lp bug: https://launchpad.net/bugs/1017353 fixed bzr revid: api@openerp.com-20121113134911-gd4o1zj6ixtu83hm
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index d5ac3868a5e..db6c532d503 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -116,8 +116,8 @@ class project_phase(osv.osv):
'user_ids': fields.one2many('project.user.allocation', 'phase_id', "Assigned Users",states={'done':[('readonly',True)], 'cancelled':[('readonly',True)]},
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\'.'),
+ help='If the phase is created the status \'Draft\'.\n If the phase is started, the status becomes \'In Progress\'.\n If review is needed the phase is in \'Pending\' status.\
+ \n If the phase is over, the status is set to \'Done\'.'),
'progress': fields.function(_compute_progress, string='Progress', help="Computed based on related tasks"),
}
_defaults = {
@@ -138,7 +138,7 @@ class project_phase(osv.osv):
if default is None:
default = {}
if not default.get('name', False):
- default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)')
+ default.update(name=_('%s (copy)') % (self.browse(cr, uid, id, context=context).name))
return super(project_phase, self).copy(cr, uid, id, default, context)
def set_draft(self, cr, uid, ids, *args):
@@ -227,7 +227,7 @@ class project(osv.osv):
'phase_ids': fields.one2many('project.phase', 'project_id', "Project Phases"),
'phase_count': fields.function(_phase_count, type='integer', string="Open Phases"),
}
-
+
def schedule_phases(self, cr, uid, ids, context=None):
context = context or {}
if type(ids) in (long, int,):
@@ -250,7 +250,7 @@ class project(osv.osv):
# Maybe it's better to update than unlink/create if it already exists ?
p = getattr(project_gantt, 'Phase_%d' % (phase.id,))
- self.pool.get('project.user.allocation').unlink(cr, uid,
+ self.pool.get('project.user.allocation').unlink(cr, uid,
[x.id for x in phase.user_ids],
context=context
)
@@ -273,9 +273,9 @@ 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:
@@ -292,7 +292,7 @@ account_analytic_account()
class project_task(osv.osv):
_inherit = "project.task"
_columns = {
- 'phase_id': fields.many2one('project.phase', 'Project Phase'),
+ 'phase_id': fields.many2one('project.phase', 'Project Phase', domain="[('project_id', '=', project_id)]"),
}
project_task()