diff options
| author | Antonin Bourguignon <abo@openerp.com> | 2012-09-25 12:33:05 +0200 |
|---|---|---|
| committer | Antonin Bourguignon <abo@openerp.com> | 2012-09-25 12:33:05 +0200 |
| commit | 8a4bd2e816a7293653b1db42f29a9b87f473bf06 (patch) | |
| tree | 79e47872809e337d34ca4a6c58ead571bd464e0f /addons/project_long_term/project_long_term.py | |
| parent | 642e4c02b1fa3685bb386b5821c4216e98681812 (diff) | |
| parent | 7debc08809d8836995d0e79c6299ca91bdee1dfe (diff) | |
[MERGE] latest trunk
bzr revid: abo@openerp.com-20120925103305-6g4bwz3bmf7edmdt
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
| -rw-r--r-- | addons/project_long_term/project_long_term.py | 10 |
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: |
