Merge lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency into lp:~hr-core-editors/hr-timesheet/6.1
- 6.1-hr_timesheet_print-wrong_dependency
- Merge into 6.1
Proposed by
Guewen Baconnier @ Camptocamp
Status: | Merged |
---|---|
Merge reported by: | Joël Grand-Guillaume @ camptocamp |
Merged at revision: | not available |
Proposed branch: | lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency |
Merge into: | lp:~hr-core-editors/hr-timesheet/6.1 |
Diff against target: |
531 lines (+167/-198) 6 files modified
hr_timesheet_print/__init__.py (+16/-22) hr_timesheet_print/__openerp__.py (+20/-24) hr_timesheet_print/report.xml (+2/-2) hr_timesheet_print/report/__init__.py (+20/-27) hr_timesheet_print/report/timesheet_report.py (+24/-36) hr_timesheet_print/report/timesheet_report.rml (+85/-87) |
To merge this branch: | bzr merge lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Guewen Baconnier @ Camptocamp | Abstain | ||
Alexandre Fayolle - camptocamp | code review, no test | Approve | |
Review via email: mp+139414@code.launchpad.net |
Commit message
[FIX] hr_timesheet_print requires hr_timesheet_
Most of the changes are styling issues.
Corrected a wrong copyright attribution and changed the license to AGPLv3
Description of the change
fix lp:1089267
To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
review:
Approve
(code review, no test)
- 39. By Guewen Baconnier @ Camptocamp <email address hidden>
-
[IMP] backport the changes done for the 7.0 migration
Most of the changes are styling issues.
Corrected a wrong copyright attribution and changed the license to AGPLv3
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
I updated my merge with all the others changes done on https:/
They are compatible with version 6.1
review:
Needs Resubmitting
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) : | # |
review:
Abstain
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'hr_timesheet_print/__init__.py' | |||
2 | --- hr_timesheet_print/__init__.py 2011-08-12 12:33:12 +0000 | |||
3 | +++ hr_timesheet_print/__init__.py 2012-12-12 10:37:22 +0000 | |||
4 | @@ -1,27 +1,21 @@ | |||
6 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
7 | 2 | ############################################################################## | 2 | ############################################################################## |
8 | 3 | # | 3 | # |
30 | 4 | # @author Renaville Vincent, ported by Joel Grand-Guillaume | 4 | # Author: Vincent Renaville |
31 | 5 | # WARNING: This program as such is intended to be used by professional | 5 | # Copyright 2012 Camptocamp SA |
32 | 6 | # programmers who take the whole responsability of assessing all potential | 6 | # |
33 | 7 | # consequences resulting from its eventual inadequacies and bugs | 7 | # This program is free software: you can redistribute it and/or modify |
34 | 8 | # End users who are looking for a ready-to-use solution with commercial | 8 | # it under the terms of the GNU Affero General Public License as |
35 | 9 | # garantees and support are strongly adviced to contract a Free Software | 9 | # published by the Free Software Foundation, either version 3 of the |
36 | 10 | # Service Company | 10 | # License, or (at your option) any later version. |
37 | 11 | # | 11 | # |
38 | 12 | # This program is Free Software; you can redistribute it and/or | 12 | # This program is distributed in the hope that it will be useful, |
39 | 13 | # modify it under the terms of the GNU General Public License | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
40 | 14 | # as published by the Free Software Foundation; either version 2 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
41 | 15 | # of the License, or (at your option) any later version. | 15 | # GNU Affero General Public License for more details. |
42 | 16 | # | 16 | # |
43 | 17 | # This program is distributed in the hope that it will be useful, | 17 | # You should have received a copy of the GNU Affero General Public License |
44 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
24 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 | 20 | # GNU General Public License for more details. | ||
26 | 21 | # | ||
27 | 22 | # You should have received a copy of the GNU General Public License | ||
28 | 23 | # along with this program; if not, write to the Free Software | ||
29 | 24 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
45 | 25 | # | 19 | # |
46 | 26 | ############################################################################## | 20 | ############################################################################## |
47 | 27 | import report | 21 | import report |
48 | 28 | 22 | ||
49 | === modified file 'hr_timesheet_print/__openerp__.py' | |||
50 | --- hr_timesheet_print/__openerp__.py 2011-08-12 12:33:12 +0000 | |||
51 | +++ hr_timesheet_print/__openerp__.py 2012-12-12 10:37:22 +0000 | |||
52 | @@ -1,26 +1,21 @@ | |||
54 | 1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
55 | 2 | ############################################################################## | 2 | ############################################################################## |
77 | 3 | ## @author Bessi Nicolas, ported by Joel Grand-Guillaume | 3 | # |
78 | 4 | # WARNING: This program as such is intended to be used by professional | 4 | # Author: Nicolas Bessi, ported by Joel Grand-Guillaume |
79 | 5 | # programmers who take the whole responsability of assessing all potential | 5 | # Copyright 2012 Camptocamp SA |
80 | 6 | # consequences resulting from its eventual inadequacies and bugs | 6 | # |
81 | 7 | # End users who are looking for a ready-to-use solution with commercial | 7 | # This program is free software: you can redistribute it and/or modify |
82 | 8 | # garantees and support are strongly adviced to contract a Free Software | 8 | # it under the terms of the GNU Affero General Public License as |
83 | 9 | # Service Company | 9 | # published by the Free Software Foundation, either version 3 of the |
84 | 10 | # | 10 | # License, or (at your option) any later version. |
85 | 11 | # This program is Free Software; you can redistribute it and/or | 11 | # |
86 | 12 | # modify it under the terms of the GNU General Public License | 12 | # This program is distributed in the hope that it will be useful, |
87 | 13 | # as published by the Free Software Foundation; either version 2 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
88 | 14 | # of the License, or (at your option) any later version. | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
89 | 15 | # | 15 | # GNU Affero General Public License for more details. |
90 | 16 | # This program is distributed in the hope that it will be useful, | 16 | # |
91 | 17 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | # You should have received a copy of the GNU Affero General Public License |
92 | 18 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
72 | 19 | # GNU General Public License for more details. | ||
73 | 20 | # | ||
74 | 21 | # You should have received a copy of the GNU General Public License | ||
75 | 22 | # along with this program; if not, write to the Free Software | ||
76 | 23 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
93 | 24 | # | 19 | # |
94 | 25 | ############################################################################## | 20 | ############################################################################## |
95 | 26 | 21 | ||
96 | @@ -31,13 +26,14 @@ | |||
97 | 31 | detailed of hours passed. | 26 | detailed of hours passed. |
98 | 32 | 27 | ||
99 | 33 | """, | 28 | """, |
101 | 34 | "version" : "1.2", | 29 | "version" : "1.3", |
102 | 35 | "author" : "Camptocamp", | 30 | "author" : "Camptocamp", |
103 | 36 | "category" : "Generic Modules/Projects & Services", | 31 | "category" : "Generic Modules/Projects & Services", |
104 | 37 | "website": "http://www.camptocamp.com", | 32 | "website": "http://www.camptocamp.com", |
105 | 33 | "license": 'AGPL-3', | ||
106 | 38 | "depends" : [ | 34 | "depends" : [ |
107 | 39 | "analytic", | 35 | "analytic", |
109 | 40 | "hr_timesheet", | 36 | "hr_timesheet_invoice", |
110 | 41 | ], | 37 | ], |
111 | 42 | "init_xml" : [], | 38 | "init_xml" : [], |
112 | 43 | "update_xml" : [ | 39 | "update_xml" : [ |
113 | 44 | 40 | ||
114 | === modified file 'hr_timesheet_print/report.xml' | |||
115 | --- hr_timesheet_print/report.xml 2011-08-12 12:33:12 +0000 | |||
116 | +++ hr_timesheet_print/report.xml 2012-12-12 10:37:22 +0000 | |||
117 | @@ -3,13 +3,13 @@ | |||
118 | 3 | <data> | 3 | <data> |
119 | 4 | 4 | ||
120 | 5 | <report id="timesheet_hours_report" | 5 | <report id="timesheet_hours_report" |
122 | 6 | string="Timesheet report" | 6 | string="Timesheet Report" |
123 | 7 | model="hr.analytic.timesheet" | 7 | model="hr.analytic.timesheet" |
124 | 8 | name="hr.analytic.timesheet.report" | 8 | name="hr.analytic.timesheet.report" |
125 | 9 | rml="hr_timesheet_print/report/timesheet_report.rml"/> | 9 | rml="hr_timesheet_print/report/timesheet_report.rml"/> |
126 | 10 | 10 | ||
127 | 11 | <report id="timesheet_hours_report_aal" | 11 | <report id="timesheet_hours_report_aal" |
129 | 12 | string="Timesheet report" | 12 | string="Timesheet Report" |
130 | 13 | model="account.analytic.line" | 13 | model="account.analytic.line" |
131 | 14 | name="analytic.line.timesheet.report" | 14 | name="analytic.line.timesheet.report" |
132 | 15 | rml="hr_timesheet_print/report/timesheet_report.rml"/> | 15 | rml="hr_timesheet_print/report/timesheet_report.rml"/> |
133 | 16 | 16 | ||
134 | === modified file 'hr_timesheet_print/report/__init__.py' | |||
135 | --- hr_timesheet_print/report/__init__.py 2011-08-12 12:33:12 +0000 | |||
136 | +++ hr_timesheet_print/report/__init__.py 2012-12-12 10:37:22 +0000 | |||
137 | @@ -1,27 +1,20 @@ | |||
138 | 1 | # -*- encoding: utf-8 -*- | ||
139 | 2 | ############################################################################## | ||
140 | 3 | # | ||
141 | 4 | # | ||
142 | 5 | # WARNING: This program as such is intended to be used by professional | ||
143 | 6 | # programmers who take the whole responsability of assessing all potential | ||
144 | 7 | # consequences resulting from its eventual inadequacies and bugs | ||
145 | 8 | # End users who are looking for a ready-to-use solution with commercial | ||
146 | 9 | # garantees and support are strongly adviced to contract a Free Software | ||
147 | 10 | # Service Company | ||
148 | 11 | # | ||
149 | 12 | # This program is Free Software; you can redistribute it and/or | ||
150 | 13 | # modify it under the terms of the GNU General Public License | ||
151 | 14 | # as published by the Free Software Foundation; either version 2 | ||
152 | 15 | # of the License, or (at your option) any later version. | ||
153 | 16 | # | ||
154 | 17 | # This program is distributed in the hope that it will be useful, | ||
155 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
156 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
157 | 20 | # GNU General Public License for more details. | ||
158 | 21 | # | ||
159 | 22 | # You should have received a copy of the GNU General Public License | ||
160 | 23 | # along with this program; if not, write to the Free Software | ||
161 | 24 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
162 | 25 | # | ||
163 | 26 | ############################################################################## | ||
164 | 27 | import timesheet_report | ||
165 | 28 | \ No newline at end of file | 1 | \ No newline at end of file |
166 | 2 | # -*- coding: utf-8 -*- | ||
167 | 3 | ############################################################################## | ||
168 | 4 | # | ||
169 | 5 | # Copyright 2012 Camptocamp SA | ||
170 | 6 | # | ||
171 | 7 | # This program is free software: you can redistribute it and/or modify | ||
172 | 8 | # it under the terms of the GNU Affero General Public License as | ||
173 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
174 | 10 | # License, or (at your option) any later version. | ||
175 | 11 | # | ||
176 | 12 | # This program is distributed in the hope that it will be useful, | ||
177 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
178 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
179 | 15 | # GNU Affero General Public License for more details. | ||
180 | 16 | # | ||
181 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
182 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
183 | 19 | # | ||
184 | 20 | ############################################################################## | ||
185 | 21 | import timesheet_report | ||
186 | 29 | 22 | ||
187 | === modified file 'hr_timesheet_print/report/timesheet_report.py' | |||
188 | --- hr_timesheet_print/report/timesheet_report.py 2011-09-23 08:28:16 +0000 | |||
189 | +++ hr_timesheet_print/report/timesheet_report.py 2012-12-12 10:37:22 +0000 | |||
190 | @@ -1,39 +1,30 @@ | |||
191 | 1 | # -*- coding: utf-8 -*- | ||
192 | 1 | ############################################################################## | 2 | ############################################################################## |
193 | 2 | # | 3 | # |
216 | 3 | # Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. | 4 | # Copyright 2012 Camptocamp SA |
217 | 4 | # | 5 | # |
218 | 5 | # WARNING: This program as such is intended to be used by professional | 6 | # This program is free software: you can redistribute it and/or modify |
219 | 6 | # programmers who take the whole responsability of assessing all potential | 7 | # it under the terms of the GNU Affero General Public License as |
220 | 7 | # consequences resulting from its eventual inadequacies and bugs | 8 | # published by the Free Software Foundation, either version 3 of the |
221 | 8 | # End users who are looking for a ready-to-use solution with commercial | 9 | # License, or (at your option) any later version. |
222 | 9 | # garantees and support are strongly adviced to contract a Free Software | 10 | # |
223 | 10 | # Service Company | 11 | # This program is distributed in the hope that it will be useful, |
224 | 11 | # | 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
225 | 12 | # This program is Free Software; you can redistribute it and/or | 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
226 | 13 | # modify it under the terms of the GNU General Public License | 14 | # GNU Affero General Public License for more details. |
227 | 14 | # as published by the Free Software Foundation; either version 2 | 15 | # |
228 | 15 | # of the License, or (at your option) any later version. | 16 | # You should have received a copy of the GNU Affero General Public License |
229 | 16 | # | 17 | # along with this program. If not, see <http://www.gnu.org/licenses/>. |
208 | 17 | # This program is distributed in the hope that it will be useful, | ||
209 | 18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
210 | 19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
211 | 20 | # GNU General Public License for more details. | ||
212 | 21 | # | ||
213 | 22 | # You should have received a copy of the GNU General Public License | ||
214 | 23 | # along with this program; if not, write to the Free Software | ||
215 | 24 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
230 | 25 | # | 18 | # |
231 | 26 | ############################################################################## | 19 | ############################################################################## |
232 | 27 | 20 | ||
233 | 28 | import time | 21 | import time |
239 | 29 | from datetime import * | 22 | from datetime import datetime |
240 | 30 | from report import report_sxw | 23 | from openerp.report import report_sxw |
236 | 31 | |||
237 | 32 | #import xml.dom.minidom | ||
238 | 33 | #import re | ||
241 | 34 | 24 | ||
242 | 35 | 25 | ||
243 | 36 | class timesheet_report(report_sxw.rml_parse): | 26 | class timesheet_report(report_sxw.rml_parse): |
244 | 27 | |||
245 | 37 | def __init__(self, cr, uid, name, context=None): | 28 | def __init__(self, cr, uid, name, context=None): |
246 | 38 | super(timesheet_report, self).__init__(cr, uid, name, context) | 29 | super(timesheet_report, self).__init__(cr, uid, name, context) |
247 | 39 | self.localcontext.update({ | 30 | self.localcontext.update({ |
248 | @@ -42,11 +33,11 @@ | |||
249 | 42 | }) | 33 | }) |
250 | 43 | self.context = context | 34 | self.context = context |
251 | 44 | 35 | ||
254 | 45 | def set_context(self, objects, data, ids, report_type = None): | 36 | def set_context(self, objects, data, ids, report_type=None): |
253 | 46 | super(timesheet_report,self).set_context(objects,data,ids,report_type) | ||
255 | 47 | self.localcontext['ts_lines'] = objects | 37 | self.localcontext['ts_lines'] = objects |
256 | 48 | self.localcontext['tot_hours'] = self._get_tot_hours(objects) | 38 | self.localcontext['tot_hours'] = self._get_tot_hours(objects) |
258 | 49 | 39 | super(timesheet_report, self).set_context(objects, data, ids, report_type) | |
259 | 40 | |||
260 | 50 | def _get_tot_hours(self, ts_lines): | 41 | def _get_tot_hours(self, ts_lines): |
261 | 51 | tot = 0.0 | 42 | tot = 0.0 |
262 | 52 | deduced = 0.0 | 43 | deduced = 0.0 |
263 | @@ -60,22 +51,19 @@ | |||
264 | 60 | factor_invoicing = 1.0 | 51 | factor_invoicing = 1.0 |
265 | 61 | if line.to_invoice and line.to_invoice.factor != 0.0: | 52 | if line.to_invoice and line.to_invoice.factor != 0.0: |
266 | 62 | factor_invoicing = 1.0 - line.to_invoice.factor / 100 | 53 | factor_invoicing = 1.0 - line.to_invoice.factor / 100 |
267 | 63 | # deduced += ((line.unit_amount / factor) * factor_invoicing) | ||
268 | 64 | if factor_invoicing > 1.0: | 54 | if factor_invoicing > 1.0: |
269 | 65 | deduced += ((line.unit_amount / factor) * factor_invoicing) | 55 | deduced += ((line.unit_amount / factor) * factor_invoicing) |
270 | 66 | tot += ((line.unit_amount / factor) * factor_invoicing) | 56 | tot += ((line.unit_amount / factor) * factor_invoicing) |
271 | 67 | elif factor_invoicing <= 1.0: | 57 | elif factor_invoicing <= 1.0: |
272 | 68 | tot += (line.unit_amount / factor) | 58 | tot += (line.unit_amount / factor) |
273 | 69 | deduced += ((line.unit_amount / factor) * factor_invoicing) | 59 | deduced += ((line.unit_amount / factor) * factor_invoicing) |
278 | 70 | 60 | ||
279 | 71 | 61 | return {'total': tot, 'deduced': deduced} | |
276 | 72 | return {'total':tot,'deduced':deduced} | ||
277 | 73 | |||
280 | 74 | 62 | ||
281 | 75 | def _get_and_change_date_format_for_swiss(self, date_to_format): | 63 | def _get_and_change_date_format_for_swiss(self, date_to_format): |
282 | 76 | date_formatted = '' | 64 | date_formatted = '' |
283 | 77 | if date_to_format: | 65 | if date_to_format: |
285 | 78 | date_formatted = strptime(date_to_format, '%Y-%m-%d').strftime('%d.%m.%Y') | 66 | date_formatted = datetime.strptime(date_to_format, '%Y-%m-%d').strftime('%d.%m.%Y') |
286 | 79 | return date_formatted | 67 | return date_formatted |
287 | 80 | 68 | ||
288 | 81 | report_sxw.report_sxw('report.hr.analytic.timesheet.report', 'hr.analytic.timesheet', 'addons/hr_timesheet_print/report/timesheet_report.rml', parser=timesheet_report) | 69 | report_sxw.report_sxw('report.hr.analytic.timesheet.report', 'hr.analytic.timesheet', 'addons/hr_timesheet_print/report/timesheet_report.rml', parser=timesheet_report) |
289 | 82 | 70 | ||
290 | === modified file 'hr_timesheet_print/report/timesheet_report.rml' | |||
291 | --- hr_timesheet_print/report/timesheet_report.rml 2011-08-12 12:33:12 +0000 | |||
292 | +++ hr_timesheet_print/report/timesheet_report.rml 2012-12-12 10:37:22 +0000 | |||
293 | @@ -1,22 +1,22 @@ | |||
294 | 1 | <?xml version="1.0"?> | 1 | <?xml version="1.0"?> |
295 | 2 | <document filename="test.pdf"> | 2 | <document filename="test.pdf"> |
297 | 3 | <template pageSize="(595.0,842.0)" title="Test" author="Martin Simon" allowSplitting="20"> | 3 | <template pageSize="(595.0,842.0)" title="Timesheet Report" author="" allowSplitting="20"> |
298 | 4 | <pageTemplate id="first"> | 4 | <pageTemplate id="first"> |
299 | 5 | <frame id="first" x1="35.0" y1="35.0" width="525" height="772"/> | 5 | <frame id="first" x1="35.0" y1="35.0" width="525" height="772"/> |
314 | 6 | <pageGraphics> | 6 | <pageGraphics> |
315 | 7 | <setFont name="Helvetica-Bold" size="9"/> | 7 | <setFont name="Helvetica-Bold" size="9"/> |
316 | 8 | 8 | ||
317 | 9 | <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString> | 9 | <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString> |
318 | 10 | <drawString x="17.7cm" y="28.1cm">Maintenance And Support Summary</drawString> | 10 | <drawString x="17.7cm" y="28.1cm">Maintenance And Support Summary</drawString> |
319 | 11 | 11 | ||
320 | 12 | <setFont name="Helvetica" size="9"/> | 12 | <setFont name="Helvetica" size="9"/> |
321 | 13 | <drawString x="1.0cm" y="2cm"> [[ time.strftime("%m-%d-%y %H:%M", time.localtime()) ]]</drawString> | 13 | <drawString x="1.0cm" y="2cm"> [[ time.strftime("%m-%d-%y %H:%M", time.localtime()) ]]</drawString> |
322 | 14 | <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString> | 14 | <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString> |
323 | 15 | 15 | ||
324 | 16 | <lineMode width="0.7"/> | 16 | <lineMode width="0.7"/> |
325 | 17 | <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines> | 17 | <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines> |
326 | 18 | <setFont name="Helvetica" size="8"/> | 18 | <setFont name="Helvetica" size="8"/> |
327 | 19 | </pageGraphics> | 19 | </pageGraphics> |
328 | 20 | 20 | ||
329 | 21 | </pageTemplate> | 21 | </pageTemplate> |
330 | 22 | </template> | 22 | </template> |
331 | @@ -26,7 +26,7 @@ | |||
332 | 26 | <blockValign value="TOP"/> | 26 | <blockValign value="TOP"/> |
333 | 27 | </blockTableStyle> | 27 | </blockTableStyle> |
334 | 28 | <blockTableStyle id="Table1"> | 28 | <blockTableStyle id="Table1"> |
336 | 29 | <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/> | 29 | <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/> |
337 | 30 | <blockAlignment value="LEFT"/> | 30 | <blockAlignment value="LEFT"/> |
338 | 31 | <blockValign value="TOP"/> | 31 | <blockValign value="TOP"/> |
339 | 32 | <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/> | 32 | <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/> |
340 | @@ -35,7 +35,7 @@ | |||
341 | 35 | <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/> | 35 | <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/> |
342 | 36 | <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/> | 36 | <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/> |
343 | 37 | <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/> | 37 | <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/> |
345 | 38 | 38 | ||
346 | 39 | </blockTableStyle> | 39 | </blockTableStyle> |
347 | 40 | <blockTableStyle id="Table6"> | 40 | <blockTableStyle id="Table6"> |
348 | 41 | <blockAlignment value="LEFT"/> | 41 | <blockAlignment value="LEFT"/> |
349 | @@ -57,7 +57,7 @@ | |||
350 | 57 | <blockTableStyle id="Table2"> | 57 | <blockTableStyle id="Table2"> |
351 | 58 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> | 58 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> |
352 | 59 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/> | 59 | <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/> |
354 | 60 | 60 | ||
355 | 61 | <blockValign value="TOP"/> | 61 | <blockValign value="TOP"/> |
356 | 62 | <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/> | 62 | <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/> |
357 | 63 | </blockTableStyle> | 63 | </blockTableStyle> |
358 | @@ -85,7 +85,7 @@ | |||
359 | 85 | <blockTableStyle id="Table7"> | 85 | <blockTableStyle id="Table7"> |
360 | 86 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> | 86 | <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/> |
361 | 87 | </blockTableStyle> | 87 | </blockTableStyle> |
363 | 88 | 88 | ||
364 | 89 | <initialize> | 89 | <initialize> |
365 | 90 | <paraStyle name="all" alignment="justify"/> | 90 | <paraStyle name="all" alignment="justify"/> |
366 | 91 | </initialize> | 91 | </initialize> |
367 | @@ -94,7 +94,7 @@ | |||
368 | 94 | <paraStyle name="P2c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | 94 | <paraStyle name="P2c" fontName="Helvetica" fontSize="8.0" leading="10" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
369 | 95 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> | 95 | <paraStyle name="P3" fontName="Helvetica" fontSize="8.0" leading="10" alignment="RIGHT" spaceBefore="0.0" spaceAfter="6.0"/> |
370 | 96 | <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/> | 96 | <paraStyle name="P10" fontName="Helvetica" fontSize="8.0" leading="14" spaceBefore="0.0" spaceAfter="6.0" alignment="RIGHT"/> |
372 | 97 | <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/> | 97 | <paraStyle name="P9" fontName="Helvetica-Bold" alignment="CENTER" fontSize="14.5" leftIndent="-5.0"/> |
373 | 98 | <paraStyle name="P9b" fontName="Helvetica" fontSize="8" alignment="LEFT"/> | 98 | <paraStyle name="P9b" fontName="Helvetica" fontSize="8" alignment="LEFT"/> |
374 | 99 | <paraStyle name="P9c" fontName="Helvetica" fontSize="8" alignment="RIGHT"/> | 99 | <paraStyle name="P9c" fontName="Helvetica" fontSize="8" alignment="RIGHT"/> |
375 | 100 | <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> | 100 | <paraStyle name="P12" fontName="Helvetica" fontSize="8.0" leading="14" alignment="CENTER" spaceBefore="0.0" spaceAfter="6.0"/> |
376 | @@ -130,64 +130,62 @@ | |||
377 | 130 | </blockTableStyle> | 130 | </blockTableStyle> |
378 | 131 | 131 | ||
379 | 132 | <paraStyle | 132 | <paraStyle |
396 | 133 | name="Level5" | 133 | name="Level5" |
397 | 134 | fontName="Helvetica" | 134 | fontName="Helvetica" |
398 | 135 | fontSize="8.0" /> | 135 | fontSize="8.0" /> |
399 | 136 | <paraStyle | 136 | <paraStyle |
400 | 137 | name="Level4" | 137 | name="Level4" |
401 | 138 | fontName="Helvetica" | 138 | fontName="Helvetica" |
402 | 139 | fontSize="8.0" /> | 139 | fontSize="8.0" /> |
403 | 140 | <paraStyle | 140 | <paraStyle |
404 | 141 | name="Level3" | 141 | name="Level3" |
405 | 142 | fontName="Helvetica" | 142 | fontName="Helvetica" |
406 | 143 | fontSize="8.0" /> | 143 | fontSize="8.0" /> |
407 | 144 | <paraStyle | 144 | <paraStyle |
408 | 145 | name="Level2" | 145 | name="Level2" |
409 | 146 | firstLineIndent="-0.03cm" | 146 | firstLineIndent="-0.03cm" |
410 | 147 | fontName="Helvetica-Bold" | 147 | fontName="Helvetica-Bold" |
411 | 148 | fontSize="8.0" /> | 148 | fontSize="8.0" /> |
412 | 149 | <paraStyle name="Level1" | 149 | <paraStyle name="Level1" |
416 | 150 | fontSize="8.0" | 150 | fontSize="8.0" |
417 | 151 | fontName="Helvetica-Bold" | 151 | fontName="Helvetica-Bold" |
418 | 152 | /> | 152 | /> |
419 | 153 | <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/> | 153 | <paraStyle name="Caption" fontName="Helvetica" fontSize="10.0" leading="13" spaceBefore="6.0" spaceAfter="6.0"/> |
420 | 154 | <paraStyle name="Index" fontName="Helvetica"/> | 154 | <paraStyle name="Index" fontName="Helvetica"/> |
421 | 155 | </stylesheet> | 155 | </stylesheet> |
422 | 156 | <images/> | 156 | <images/> |
423 | 157 | <story> | 157 | <story> |
424 | 158 | 158 | ||
428 | 159 | <para style="P2">[[ objects and objects[0] and setLang(objects[0].account_id.partner_id.lang) ]]</para> | 159 | <para style="P2">[[ objects and objects[0] and setLang(objects[0].account_id.partner_id.lang) ]]</para> |
429 | 160 | <para style="P1">Spent hours details</para> | 160 | <para style="P1">Spent hours details</para> |
430 | 161 | 161 | ||
431 | 162 | <para style="P12a"></para> | 162 | <para style="P12a"></para> |
432 | 163 | <para style="P12a"></para> | 163 | <para style="P12a"></para> |
433 | 164 | <blockTable colWidths="258.0,259.0" style="Table1" repeatRows="1"> | 164 | <blockTable colWidths="258.0,259.0" style="Table1" repeatRows="1"> |
460 | 165 | <tr> | 165 | <tr> |
461 | 166 | <td> | 166 | <td> |
462 | 167 | <para style="P12a">Report Date : </para> | 167 | <para style="P12a">Report Date: </para> |
463 | 168 | </td> | 168 | </td> |
464 | 169 | <td> | 169 | <td> |
465 | 170 | <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para> | 170 | <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para> |
466 | 171 | </td> | 171 | </td> |
467 | 172 | </tr> | 172 | </tr> |
468 | 173 | <tr> | 173 | <tr> |
469 | 174 | <td> | 174 | <td> |
470 | 175 | <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> --> | 175 | <para style="P12a">Total hours: </para> |
471 | 176 | <para style="P12a">Total hours : </para> | 176 | </td> |
472 | 177 | </td> | 177 | <td> |
473 | 178 | <td> | 178 | <para style="P2">[[ round(tot_hours['total'],2) ]]</para> |
474 | 179 | <para style="P2">[[ round(tot_hours['total'],2) ]]</para> | 179 | </td> |
475 | 180 | </td> | 180 | </tr> |
476 | 181 | </tr> | 181 | <tr> |
477 | 182 | <tr> | 182 | <td> |
478 | 183 | <td> | 183 | <para style="P12a">Invoiced hours: </para> |
479 | 184 | <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> --> | 184 | </td> |
480 | 185 | <para style="P12a">Invoiced hours : </para> | 185 | <td> |
481 | 186 | </td> | 186 | <para style="P2">[[ round(tot_hours['deduced'], 2) or '0.0' ]]</para> |
482 | 187 | <td> | 187 | </td> |
483 | 188 | <para style="P2">[[ round(tot_hours['deduced'],2) or '0.0' ]]</para> | 188 | </tr> |
458 | 189 | </td> | ||
459 | 190 | </tr> | ||
484 | 191 | </blockTable> | 189 | </blockTable> |
485 | 192 | <para style="P12a"></para> | 190 | <para style="P12a"></para> |
486 | 193 | <para style="P12a"></para> | 191 | <para style="P12a"></para> |
487 | @@ -210,25 +208,25 @@ | |||
488 | 210 | <para style="P12a">Deduced</para> | 208 | <para style="P12a">Deduced</para> |
489 | 211 | </td> | 209 | </td> |
490 | 212 | </tr> | 210 | </tr> |
510 | 213 | 211 | ||
511 | 214 | <tr> | 212 | <tr> |
512 | 215 | [[ repeatIn(objects,'l') ]] | 213 | [[ repeatIn(objects, 'l') ]] |
513 | 216 | <td> | 214 | <td> |
514 | 217 | <para style="P2">[[ l.date and format_date(l.date) or '' ]]</para> | 215 | <para style="P2">[[ l.date and format_date(l.date) or '' ]]</para> |
515 | 218 | </td> | 216 | </td> |
516 | 219 | <td> | 217 | <td> |
517 | 220 | <para style="P2">[[ l.name or '' ]]</para> | 218 | <para style="P2">[[ l.name or '' ]]</para> |
518 | 221 | </td> | 219 | </td> |
519 | 222 | <td> | 220 | <td> |
520 | 223 | <para style="P2c">[[ round(l.to_invoice.factor >= 0.0 and l.unit_amount or l.to_invoice.factor <= -0.01 and l.unit_amount and ((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or '0.0') or '0.0',2) ]]</para> | 221 | <para style="P2c">[[ round(l.to_invoice.factor >= 0.0 and l.unit_amount or l.to_invoice.factor <= -0.01 and l.unit_amount and ((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or 0.0), 2) or '0.0' ]]</para> |
521 | 224 | </td> | 222 | </td> |
522 | 225 | <td> | 223 | <td> |
523 | 226 | <para style="P2c">[[ l.to_invoice.factor >= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor <= -0.01 and '100%' ]]</para> | 224 | <para style="P2c">[[ l.to_invoice.factor >= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor <= -0.01 and '100%' ]]</para> |
524 | 227 | </td> | 225 | </td> |
525 | 228 | <td> | 226 | <td> |
526 | 229 | <para style="P2c">[[ round((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or '0.0', 2) ]]</para> | 227 | <para style="P2c">[[ round((l.unit_amount and l.to_invoice) and (l.unit_amount - (l.unit_amount * l.to_invoice.factor) / 100 ) or 0.0, 2) or '0.0' ]]</para> |
527 | 230 | </td> | 228 | </td> |
528 | 231 | </tr> | 229 | </tr> |
529 | 232 | </blockTable> | 230 | </blockTable> |
530 | 233 | 231 | ||
531 | 234 | </story> | 232 | </story> |
LGTM