summaryrefslogtreecommitdiff
path: root/addons/project_long_term/project_long_term.py
diff options
context:
space:
mode:
authorAntonin Bourguignon <abo@openerp.com>2012-09-24 19:54:50 +0200
committerAntonin Bourguignon <abo@openerp.com>2012-09-24 19:54:50 +0200
commit383cb23ec21d8ccfd7fe351ce96e1b0951ec214b (patch)
tree896b7e35185e7cbb04048135f983649e6526683f /addons/project_long_term/project_long_term.py
parent738040e15b9cd49fdf313a0f3c729cc9581e206d (diff)
parent2218270a534518226ed3e44ebb5746dc2711fa4e (diff)
[MERGE] trunk
bzr revid: abo@openerp.com-20120924175450-ppzenjyecdbabvm5
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
-rw-r--r--addons/project_long_term/project_long_term.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py
index d5ac3868a5e..5b88d5209c8 100644
--- a/addons/project_long_term/project_long_term.py
+++ b/addons/project_long_term/project_long_term.py
@@ -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: