+ def on_change_template(self, cr, uid, id, template_id, context=None):
+ res = super(account_analytic_account, self).on_change_template(cr, uid, id, template_id, context=context)
+ if template_id and 'value' in res:
+ template = self.browse(cr, uid, template_id, context=context)
+ res['value']['charge_expenses'] = template.charge_expenses
+ res['value']['expense_max'] = template.expense_max
+ return res
+