Merge lp:~openerp-dev/openobject-addons/trunk-bug-1073246-Jaydeep into lp:openobject-addons

Proposed by Jaydeep Barot(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1073246-Jaydeep
Merge into: lp:openobject-addons
Diff against target: 22 lines (+5/-1)
1 file modified
hr_timesheet_sheet/hr_timesheet_sheet.py (+5/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1073246-Jaydeep
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+169338@code.launchpad.net

Description of the change

To be change the header on the "My Current Timesheet" dialog is e.g. "October". Instead it is "Week 40" (first week of October).

Thanks,
Jaydeep Barot

To post a comment you must log in.
Revision history for this message
Jaydeep Barot(OpenERP) (jaydeep.barot-openerp) wrote :

Hello,

I have Fixed in https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-1073246-Jaydeep
Revision ID: <email address hidden>
revision no :- 8665

Thanks,
Jaydeep Barot.

Unmerged revisions

8665. By Jaydeep Barot(OpenERP)

[FIX] Change of employee My current timesheet header instead of week 40 to First week of October

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_timesheet_sheet/hr_timesheet_sheet.py'
2--- hr_timesheet_sheet/hr_timesheet_sheet.py 2013-05-21 12:23:59 +0000
3+++ hr_timesheet_sheet/hr_timesheet_sheet.py 2013-06-14 05:37:46 +0000
4@@ -26,6 +26,7 @@
5 from openerp.osv import fields, osv
6 from openerp.tools.translate import _
7
8+_week=['First','Second','Third','Forth','Fifth']
9 class hr_timesheet_sheet(osv.osv):
10 _name = "hr_timesheet_sheet.sheet"
11 _inherit = "mail.thread"
12@@ -198,7 +199,10 @@
13 return []
14 if isinstance(ids, (long, int)):
15 ids = [ids]
16- return [(r['id'], _('Week ')+datetime.strptime(r['date_from'], '%Y-%m-%d').strftime('%U')) \
17+ for r in self.read(cr, uid, ids, ['date_from'], context=context):
18+ day_of_month = datetime.strptime(r['date_from'],'%Y-%m-%d').strftime('%d')
19+ week_number = ( int(day_of_month) - 1 ) // 7 + 1
20+ return [(r['id'], _(_week[week_number-1] + ' Week Of ' )+datetime.strptime(r['date_from'], '%Y-%m-%d').strftime('%B')) \
21 for r in self.read(cr, uid, ids, ['date_from'],
22 context=context, load='_classic_write')]
23

Subscribers

People subscribed via source and target branches

to all changes: