From 03176d176bfaa740eef12a21f9092759653a83c1 Mon Sep 17 00:00:00 2001 From: "Chirag Dodiya (OpenERP)" Date: Mon, 23 Dec 2013 15:30:35 +0530 Subject: [PATCH] [IMP]Improved code to set use_timesheets default true and added action for menu Timesheets Accounts bzr revid: cod@tinyerp.com-20131223100035-us5sljbq2iyq9shs --- addons/hr_timesheet/hr_timesheet.py | 3 +++ addons/hr_timesheet/hr_timesheet_view.xml | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 5baf8ec262b..dabc5b5a125 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -206,6 +206,9 @@ class account_analytic_account(osv.osv): _columns = { 'use_timesheets': fields.boolean('Timesheets', help="Check this field if this project manages timesheets"), } + _defaults = { + 'use_timesheets': True + } 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) diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml index e9f06db6919..1a4ccf5953d 100644 --- a/addons/hr_timesheet/hr_timesheet_view.xml +++ b/addons/hr_timesheet/hr_timesheet_view.xml @@ -125,8 +125,17 @@ + + + Timesheet Accounts + ir.actions.act_window + account.analytic.account + form + tree,form + [('use_timesheets','=', True)] + - + Timesheet Activities