diff --git a/addons/project/project.py b/addons/project/project.py index aa9316aec1b..f446d8b6900 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -1225,6 +1225,13 @@ class account_analytic_account(osv.osv): 'use_tasks': fields.boolean('Tasks Mgmt.',help="If check,this contract will be available in the project menu and you will be able to manage tasks or track issues"), 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'), } + + 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_tasks'] = template.use_tasks + return res def _trigger_project_creation(self, cr, uid, vals, context=None): '''