[IMP] hr_timesheet : Override the 'on_change_template' method.
bzr revid: mdi@tinyerp.com-20120723121029-9manyfm4brhsbuf0
This commit is contained in:
@@ -198,6 +198,13 @@ class account_analytic_account(osv.osv):
|
||||
_columns = {
|
||||
'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"),
|
||||
}
|
||||
|
||||
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_timesheets'] = template.use_timesheets
|
||||
return res
|
||||
|
||||
account_analytic_account()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user