diff options
| author | Divyesh Makwana (Open ERP) <mdi@tinyerp.com> | 2012-07-24 11:53:03 +0530 |
|---|---|---|
| committer | Divyesh Makwana (Open ERP) <mdi@tinyerp.com> | 2012-07-24 11:53:03 +0530 |
| commit | 6dcf691e70315d70a4a79845da51091866b6c77b (patch) | |
| tree | 35383c61d4517c71b71092ebc9b090662d991539 /addons/project_long_term/project_long_term.py | |
| parent | a89ae52f15a6668935674cb3eb50e132deca15de (diff) | |
[IMP] project_long_term : Override the 'on_change_template' method.
bzr revid: mdi@tinyerp.com-20120724062303-xoc4l9ye72x5lz3f
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 a4df1eb6917..25aa98016e9 100644 --- a/addons/project_long_term/project_long_term.py +++ b/addons/project_long_term/project_long_term.py @@ -275,6 +275,13 @@ class account_analytic_account(osv.osv): _columns = { 'use_phases': fields.boolean('Phases Planing', help="Check this field if project manages phases"), } + + 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) |
