[IMP] project : Override the 'on_change_template' method.

bzr revid: mdi@tinyerp.com-20120723120754-a1tjp5tpbooxskhk
This commit is contained in:
Divyesh Makwana (Open ERP)
2012-07-23 17:37:54 +05:30
parent 69d9a3d4e2
commit 8ee2cca822
+7
View File
@@ -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):
'''