diff options
| author | Rvo (Open ERP) <rvo@tinyerp.co.in> | 2010-09-18 11:22:11 +0530 |
|---|---|---|
| committer | Rvo (Open ERP) <rvo@tinyerp.co.in> | 2010-09-18 11:22:11 +0530 |
| commit | 050344d175dc19e6b3cfa306bb2c01ddc977100a (patch) | |
| tree | 5832c147cd1107b473b9f4c7ed484c8138d1da49 /addons/project_long_term/project_long_term.py | |
| parent | 4186820ee1a85a6474ef474cbe297fde92ac003a (diff) | |
[IMP]: Usability Improvements
bzr revid: rvo@tinyerp.co.in-20100918055211-3kuyw3k8nagxvb7t
Diffstat (limited to 'addons/project_long_term/project_long_term.py')
| -rw-r--r-- | addons/project_long_term/project_long_term.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/project_long_term/project_long_term.py b/addons/project_long_term/project_long_term.py index 79baff679cc..b795dda557e 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -214,6 +214,13 @@ class project_phase(osv.osv): self._check_date_end(cr, uid, next_phase, dt_end, context=context) return super(project_phase, self).write(cr, uid, ids, vals, context=context) + def copy(self, cr, uid, id, default=None, context=None): + if default is None: + default = {} + if not default.get('name', False): + default['name'] = self.browse(cr, uid, id, context=context).name + _(' (copy)') + return super(project_phase, self).copy(cr, uid, id, default, context) + def set_draft(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state': 'draft'}) return True |
