Merge lp:~openerp-dev/openobject-addons/trunk-opw-577041-port-mma into lp:openobject-addons

Proposed by Mayur Maheshwari(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-opw-577041-port-mma
Merge into: lp:openobject-addons
Diff against target: 64 lines (+16/-12)
2 files modified
hr_attendance/report/timesheet.py (+5/-1)
hr_attendance/report/timesheet.xsl (+11/-11)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-opw-577041-port-mma
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+132856@code.launchpad.net

Description of the change

Hello,

   Issues:
    --> The report "Attendance Per Week" in Employee form contains some static string comes from xsl file is not translated
     Code is forward port from 6.1

Thanks
Mayur

To post a comment you must log in.

Unmerged revisions

7952. By Mayur Maheshwari(OpenERP)

[FIX]hr_attendance : The labels in xsl file is not translated in other language while generating the report of attendace_by_week of employee

7951. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

7950. By Fabien (Open ERP)

[MERGE] fix multi-company for pos

7949. By Fabien (Open ERP)

[FIX] bug pos

7948. By Fabien (Open ERP)

[FIX] POS close session without cash register

7947. By Fabien (Open ERP)

[MERGE] trunk

7946. By Fabien (Open ERP)

[FIX] POS

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hr_attendance/report/timesheet.py'
2--- hr_attendance/report/timesheet.py 2012-11-02 09:05:24 +0000
3+++ hr_attendance/report/timesheet.py 2012-11-05 10:00:15 +0000
4@@ -41,6 +41,7 @@
5
6 def create_xml(self, cr, uid, ids, datas, context=None):
7 obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
8+ res_lang_obj = pooler.get_pool(cr.dbname).get('res.lang')
9
10 emp_ids = datas['active_ids']
11 start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
12@@ -99,7 +100,10 @@
13 ldt = dt
14
15 # Week xml representation
16- week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % (n_monday - relativedelta(days=1)).strftime('%Y-%m-%d')]
17+ user_lang_code = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid, context).context_lang
18+ lang_id = res_lang_obj.search(cr, uid, [('code', '=', user_lang_code)])
19+ lang_dict = res_lang_obj.read(cr, uid, lang_id, ['date_format'])[0]
20+ week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime(lang_dict.get('date_format')), '<weekend>%s</weekend>' % n_monday.strftime(lang_dict.get('date_format'))]
21 for idx in range(7):
22 week_repr.append('<%s>' % num2day[idx])
23 if idx in week_wh:
24
25=== modified file 'hr_attendance/report/timesheet.xsl'
26--- hr_attendance/report/timesheet.xsl 2012-11-02 06:39:33 +0000
27+++ hr_attendance/report/timesheet.xsl 2012-11-05 10:00:15 +0000
28@@ -60,25 +60,25 @@
29 <xsl:template match="user">
30 <spacer length="1cm" />
31 <para style="emp">
32- <b>Employee: </b>
33+ <b t="1">Employee: </b>
34 <i><xsl:value-of select="name" /></i>
35 </para>
36 <spacer length="0.5cm" />
37 <xsl:for-each select="week">
38 <blockTable colWidths="8cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm" style="week">
39 <tr>
40- <td>From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
41- <td>Mon</td>
42- <td>Tue</td>
43- <td>Wed</td>
44- <td>Thu</td>
45- <td>Fri</td>
46- <td>Sat</td>
47- <td>Sun</td>
48- <td>Total</td>
49+ <td t="1">From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
50+ <td t="1">Mon</td>
51+ <td t="1">Tue</td>
52+ <td t="1">Wed</td>
53+ <td t="1">Thu</td>
54+ <td t="1">Fri</td>
55+ <td t="1">Sat</td>
56+ <td t="1">Sun</td>
57+ <td t="1">Total</td>
58 </tr>
59 <tr>
60- <td>Worked hours</td>
61+ <td t="1">Worked hours</td>
62 <td>
63 <xsl:choose>
64 <xsl:when test="Monday/workhours">

Subscribers

People subscribed via source and target branches

to all changes: