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
=== modified file 'hr_attendance/report/timesheet.py'
--- hr_attendance/report/timesheet.py 2012-11-02 09:05:24 +0000
+++ hr_attendance/report/timesheet.py 2012-11-05 10:00:15 +0000
@@ -41,6 +41,7 @@
4141
42 def create_xml(self, cr, uid, ids, datas, context=None):42 def create_xml(self, cr, uid, ids, datas, context=None):
43 obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')43 obj_emp = pooler.get_pool(cr.dbname).get('hr.employee')
44 res_lang_obj = pooler.get_pool(cr.dbname).get('res.lang')
4445
45 emp_ids = datas['active_ids']46 emp_ids = datas['active_ids']
46 start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')47 start_date = datetime.strptime(datas['form']['init_date'], '%Y-%m-%d')
@@ -99,7 +100,10 @@
99 ldt = dt100 ldt = dt
100101
101 # Week xml representation102 # Week xml representation
102 week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime('%Y-%m-%d'), '<weekend>%s</weekend>' % (n_monday - relativedelta(days=1)).strftime('%Y-%m-%d')]103 user_lang_code = pooler.get_pool(cr.dbname).get('res.users').browse(cr, uid, uid, context).context_lang
104 lang_id = res_lang_obj.search(cr, uid, [('code', '=', user_lang_code)])
105 lang_dict = res_lang_obj.read(cr, uid, lang_id, ['date_format'])[0]
106 week_repr = ['<week>', '<weekstart>%s</weekstart>' % monday.strftime(lang_dict.get('date_format')), '<weekend>%s</weekend>' % n_monday.strftime(lang_dict.get('date_format'))]
103 for idx in range(7):107 for idx in range(7):
104 week_repr.append('<%s>' % num2day[idx])108 week_repr.append('<%s>' % num2day[idx])
105 if idx in week_wh:109 if idx in week_wh:
106110
=== modified file 'hr_attendance/report/timesheet.xsl'
--- hr_attendance/report/timesheet.xsl 2012-11-02 06:39:33 +0000
+++ hr_attendance/report/timesheet.xsl 2012-11-05 10:00:15 +0000
@@ -60,25 +60,25 @@
60 <xsl:template match="user">60 <xsl:template match="user">
61 <spacer length="1cm" />61 <spacer length="1cm" />
62 <para style="emp">62 <para style="emp">
63 <b>Employee: </b>63 <b t="1">Employee: </b>
64 <i><xsl:value-of select="name" /></i>64 <i><xsl:value-of select="name" /></i>
65 </para>65 </para>
66 <spacer length="0.5cm" />66 <spacer length="0.5cm" />
67 <xsl:for-each select="week">67 <xsl:for-each select="week">
68 <blockTable colWidths="8cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm" style="week">68 <blockTable colWidths="8cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm,2cm" style="week">
69 <tr>69 <tr>
70 <td>From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>70 <td t="1">From <xsl:value-of select="weekstart" /> to <xsl:value-of select="weekend" /></td>
71 <td>Mon</td>71 <td t="1">Mon</td>
72 <td>Tue</td>72 <td t="1">Tue</td>
73 <td>Wed</td>73 <td t="1">Wed</td>
74 <td>Thu</td>74 <td t="1">Thu</td>
75 <td>Fri</td>75 <td t="1">Fri</td>
76 <td>Sat</td>76 <td t="1">Sat</td>
77 <td>Sun</td>77 <td t="1">Sun</td>
78 <td>Total</td>78 <td t="1">Total</td>
79 </tr>79 </tr>
80 <tr>80 <tr>
81 <td>Worked hours</td>81 <td t="1">Worked hours</td>
82 <td>82 <td>
83 <xsl:choose>83 <xsl:choose>
84 <xsl:when test="Monday/workhours">84 <xsl:when test="Monday/workhours">

Subscribers

People subscribed via source and target branches

to all changes: