From e37394cd588e47f9adfee1c3c62d78b9237da110 Mon Sep 17 00:00:00 2001 From: fp Date: Sat, 10 Sep 2011 14:43:55 +0200 Subject: [PATCH] [IMP] useability of timesheet bzr revid: fp@fp-laptop-20110910124355-qkkbtgm3wz6l2w1f --- addons/hr_timesheet/hr_timesheet.py | 4 ++-- .../wizard/hr_timesheet_sign_in_out.py | 2 +- .../hr_timesheet_sheet/hr_timesheet_sheet.py | 10 +++++----- .../hr_timesheet_sheet_view.xml | 20 +++++++++---------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/addons/hr_timesheet/hr_timesheet.py b/addons/hr_timesheet/hr_timesheet.py index 2b33dfbda8d..4613c9251b5 100644 --- a/addons/hr_timesheet/hr_timesheet.py +++ b/addons/hr_timesheet/hr_timesheet.py @@ -66,8 +66,8 @@ class hr_analytic_timesheet(osv.osv): _inherits = {'account.analytic.line': 'line_id'} _order = "id desc" _columns = { - 'line_id': fields.many2one('account.analytic.line', 'Analytic line', ondelete='cascade', required=True), - 'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner Id', relation='res.partner', store=True), + 'line_id': fields.many2one('account.analytic.line', 'Analytic Line', ondelete='cascade', required=True), + 'partner_id': fields.related('account_id', 'partner_id', type='many2one', string='Partner', relation='res.partner', store=True), } def unlink(self, cr, uid, ids, context=None): diff --git a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py index 90c9a5d7b8c..e3f7f0c7acb 100644 --- a/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py +++ b/addons/hr_timesheet/wizard/hr_timesheet_sign_in_out.py @@ -27,7 +27,7 @@ class hr_so_project(osv.osv_memory): _name = 'hr.sign.out.project' _description = 'Sign Out By Project' _columns = { - 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', domain=[('type','=','normal')]), + 'account_id': fields.many2one('account.analytic.account', 'Project / Analytic Account', domain=[('type','=','normal')]), 'info': fields.char('Work Description', size=256, required=True), 'date_start': fields.datetime('Starting Date', readonly=True), 'date': fields.datetime('Closing Date'), diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py index cf4351112a4..4e1eebb5f4c 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet.py +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet.py @@ -264,7 +264,7 @@ class hr_timesheet_sheet(osv.osv): return self.sign(cr,uid,ids,'sign_out',context=None) _columns = { - 'name': fields.char('Description', size=64, select=1, + 'name': fields.char('Note', size=64, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), 'employee_id': fields.many2one('hr.employee', 'Employee', required=True), 'user_id': fields.related('employee_id', 'user_id', type="many2one", relation="res.users", store=True, string="User", required=False, readonly=True),#fields.many2one('res.users', 'User', required=True, select=1, states={'confirm':[('readonly', True)], 'done':[('readonly', True)]}), @@ -280,9 +280,9 @@ class hr_timesheet_sheet(osv.osv): 'attendances_ids' : one2many_mod2('hr.attendance', 'sheet_id', 'Attendances'), 'state' : fields.selection([ ('new', 'New'), - ('draft','Draft'), - ('confirm','Confirmed'), - ('done','Done')], 'State', select=True, required=True, readonly=True, + ('draft','Open'), + ('confirm','Waiting Approval'), + ('done','Approved')], 'State', select=True, required=True, readonly=True, help=' * The \'Draft\' state is used when a user is encoding a new and unconfirmed timesheet. \ \n* The \'Confirmed\' state is used for to confirm the timesheet by user. \ \n* The \'Done\' state is used when users timesheet is accepted by his/her senior.'), @@ -735,7 +735,7 @@ class hr_timesheet_sheet_sheet_account(osv.osv): _auto = False _order='name' _columns = { - 'name': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True), + 'name': fields.many2one('account.analytic.account', 'Project / Analytic Account', readonly=True), 'sheet_id': fields.many2one('hr_timesheet_sheet.sheet', 'Sheet', readonly=True), 'total': fields.float('Total Time', digits=(16,2), readonly=True), 'invoice_rate': fields.many2one('hr_timesheet_invoice.factor', 'Invoice rate', readonly=True), diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml index 321e4c2addd..bb18341f8da 100644 --- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml +++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml @@ -62,14 +62,14 @@
- - - - + + + + @@ -89,19 +89,19 @@ - -