Merge lp:~camptocamp/hr-timesheet/6.1-hr_timesheet_print-wrong_dependency into lp:~hr-core-editors/hr-timesheet/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
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_invoice, 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

Description of the change

To post a comment you must log in.
Revision history for this message
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote :

LGTM

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://code.launchpad.net/~c2c/hr-timesheet/7.0-hr_timesheet_print-migr/+merge/139416

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
=== modified file 'hr_timesheet_print/__init__.py'
--- hr_timesheet_print/__init__.py 2011-08-12 12:33:12 +0000
+++ hr_timesheet_print/__init__.py 2012-12-12 10:37:22 +0000
@@ -1,27 +1,21 @@
1# -*- coding: utf-8 -*- 1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3#3#
4# @author Renaville Vincent, ported by Joel Grand-Guillaume4# Author: Vincent Renaville
5# WARNING: This program as such is intended to be used by professional5# Copyright 2012 Camptocamp SA
6# programmers who take the whole responsability of assessing all potential6#
7# consequences resulting from its eventual inadequacies and bugs7# This program is free software: you can redistribute it and/or modify
8# End users who are looking for a ready-to-use solution with commercial8# it under the terms of the GNU Affero General Public License as
9# garantees and support are strongly adviced to contract a Free Software9# published by the Free Software Foundation, either version 3 of the
10# Service Company10# License, or (at your option) any later version.
11#11#
12# This program is Free Software; you can redistribute it and/or12# This program is distributed in the hope that it will be useful,
13# modify it under the terms of the GNU General Public License13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# as published by the Free Software Foundation; either version 214# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# of the License, or (at your option) any later version.15# GNU Affero General Public License for more details.
16#16#
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
18# but WITHOUT ANY WARRANTY; without even the implied warranty of18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25#19#
26##############################################################################20##############################################################################
27import report21import report
2822
=== modified file 'hr_timesheet_print/__openerp__.py'
--- hr_timesheet_print/__openerp__.py 2011-08-12 12:33:12 +0000
+++ hr_timesheet_print/__openerp__.py 2012-12-12 10:37:22 +0000
@@ -1,26 +1,21 @@
1# -*- coding: utf-8 -*- 1# -*- coding: utf-8 -*-
2##############################################################################2##############################################################################
3## @author Bessi Nicolas, ported by Joel Grand-Guillaume3#
4# WARNING: This program as such is intended to be used by professional4# Author: Nicolas Bessi, ported by Joel Grand-Guillaume
5# programmers who take the whole responsability of assessing all potential5# Copyright 2012 Camptocamp SA
6# consequences resulting from its eventual inadequacies and bugs6#
7# End users who are looking for a ready-to-use solution with commercial7# This program is free software: you can redistribute it and/or modify
8# garantees and support are strongly adviced to contract a Free Software8# it under the terms of the GNU Affero General Public License as
9# Service Company9# published by the Free Software Foundation, either version 3 of the
10#10# License, or (at your option) any later version.
11# This program is Free Software; you can redistribute it and/or11#
12# modify it under the terms of the GNU General Public License12# This program is distributed in the hope that it will be useful,
13# as published by the Free Software Foundation; either version 213# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# of the License, or (at your option) any later version.14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15#15# GNU Affero General Public License for more details.
16# This program is distributed in the hope that it will be useful,16#
17# but WITHOUT ANY WARRANTY; without even the implied warranty of17# You should have received a copy of the GNU Affero General Public License
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24#19#
25##############################################################################20##############################################################################
2621
@@ -31,13 +26,14 @@
31detailed of hours passed.26detailed of hours passed.
3227
33 """,28 """,
34 "version" : "1.2",29 "version" : "1.3",
35 "author" : "Camptocamp",30 "author" : "Camptocamp",
36 "category" : "Generic Modules/Projects & Services",31 "category" : "Generic Modules/Projects & Services",
37 "website": "http://www.camptocamp.com",32 "website": "http://www.camptocamp.com",
33 "license": 'AGPL-3',
38 "depends" : [34 "depends" : [
39 "analytic",35 "analytic",
40 "hr_timesheet",36 "hr_timesheet_invoice",
41 ],37 ],
42 "init_xml" : [],38 "init_xml" : [],
43 "update_xml" : [39 "update_xml" : [
4440
=== modified file 'hr_timesheet_print/report.xml'
--- hr_timesheet_print/report.xml 2011-08-12 12:33:12 +0000
+++ hr_timesheet_print/report.xml 2012-12-12 10:37:22 +0000
@@ -3,13 +3,13 @@
3 <data>3 <data>
44
5 <report id="timesheet_hours_report"5 <report id="timesheet_hours_report"
6 string="Timesheet report"6 string="Timesheet Report"
7 model="hr.analytic.timesheet"7 model="hr.analytic.timesheet"
8 name="hr.analytic.timesheet.report"8 name="hr.analytic.timesheet.report"
9 rml="hr_timesheet_print/report/timesheet_report.rml"/>9 rml="hr_timesheet_print/report/timesheet_report.rml"/>
1010
11 <report id="timesheet_hours_report_aal"11 <report id="timesheet_hours_report_aal"
12 string="Timesheet report"12 string="Timesheet Report"
13 model="account.analytic.line"13 model="account.analytic.line"
14 name="analytic.line.timesheet.report"14 name="analytic.line.timesheet.report"
15 rml="hr_timesheet_print/report/timesheet_report.rml"/>15 rml="hr_timesheet_print/report/timesheet_report.rml"/>
1616
=== modified file 'hr_timesheet_print/report/__init__.py'
--- hr_timesheet_print/report/__init__.py 2011-08-12 12:33:12 +0000
+++ hr_timesheet_print/report/__init__.py 2012-12-12 10:37:22 +0000
@@ -1,27 +1,20 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4#
5# WARNING: This program as such is intended to be used by professional
6# programmers who take the whole responsability of assessing all potential
7# consequences resulting from its eventual inadequacies and bugs
8# End users who are looking for a ready-to-use solution with commercial
9# garantees and support are strongly adviced to contract a Free Software
10# Service Company
11#
12# This program is Free Software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation; either version 2
15# of the License, or (at your option) any later version.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25#
26##############################################################################
27import timesheet_report
28\ No newline at end of file1\ No newline at end of file
2# -*- coding: utf-8 -*-
3##############################################################################
4#
5# Copyright 2012 Camptocamp SA
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21import timesheet_report
2922
=== modified file 'hr_timesheet_print/report/timesheet_report.py'
--- hr_timesheet_print/report/timesheet_report.py 2011-09-23 08:28:16 +0000
+++ hr_timesheet_print/report/timesheet_report.py 2012-12-12 10:37:22 +0000
@@ -1,39 +1,30 @@
1# -*- coding: utf-8 -*-
1##############################################################################2##############################################################################
2#3#
3# Copyright (c) 2005-2006 TINY SPRL. (http://tiny.be) All Rights Reserved.4# Copyright 2012 Camptocamp SA
4#5#
5# WARNING: This program as such is intended to be used by professional6# This program is free software: you can redistribute it and/or modify
6# programmers who take the whole responsability of assessing all potential7# it under the terms of the GNU Affero General Public License as
7# consequences resulting from its eventual inadequacies and bugs8# published by the Free Software Foundation, either version 3 of the
8# End users who are looking for a ready-to-use solution with commercial9# License, or (at your option) any later version.
9# garantees and support are strongly adviced to contract a Free Software10#
10# Service Company11# This program is distributed in the hope that it will be useful,
11#12# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# This program is Free Software; you can redistribute it and/or13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# modify it under the terms of the GNU General Public License14# GNU Affero General Public License for more details.
14# as published by the Free Software Foundation; either version 215#
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
16#17# along with this program. If not, see <http://www.gnu.org/licenses/>.
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25#18#
26##############################################################################19##############################################################################
2720
28import time21import time
29from datetime import *22from datetime import datetime
30from report import report_sxw23from openerp.report import report_sxw
31
32#import xml.dom.minidom
33#import re
3424
3525
36class timesheet_report(report_sxw.rml_parse):26class timesheet_report(report_sxw.rml_parse):
27
37 def __init__(self, cr, uid, name, context=None):28 def __init__(self, cr, uid, name, context=None):
38 super(timesheet_report, self).__init__(cr, uid, name, context)29 super(timesheet_report, self).__init__(cr, uid, name, context)
39 self.localcontext.update({30 self.localcontext.update({
@@ -42,11 +33,11 @@
42 })33 })
43 self.context = context34 self.context = context
4435
45 def set_context(self, objects, data, ids, report_type = None):36 def set_context(self, objects, data, ids, report_type=None):
46 super(timesheet_report,self).set_context(objects,data,ids,report_type)
47 self.localcontext['ts_lines'] = objects37 self.localcontext['ts_lines'] = objects
48 self.localcontext['tot_hours'] = self._get_tot_hours(objects)38 self.localcontext['tot_hours'] = self._get_tot_hours(objects)
49 39 super(timesheet_report, self).set_context(objects, data, ids, report_type)
40
50 def _get_tot_hours(self, ts_lines):41 def _get_tot_hours(self, ts_lines):
51 tot = 0.042 tot = 0.0
52 deduced = 0.043 deduced = 0.0
@@ -60,22 +51,19 @@
60 factor_invoicing = 1.051 factor_invoicing = 1.0
61 if line.to_invoice and line.to_invoice.factor != 0.0:52 if line.to_invoice and line.to_invoice.factor != 0.0:
62 factor_invoicing = 1.0 - line.to_invoice.factor / 10053 factor_invoicing = 1.0 - line.to_invoice.factor / 100
63 # deduced += ((line.unit_amount / factor) * factor_invoicing)
64 if factor_invoicing > 1.0:54 if factor_invoicing > 1.0:
65 deduced += ((line.unit_amount / factor) * factor_invoicing)55 deduced += ((line.unit_amount / factor) * factor_invoicing)
66 tot += ((line.unit_amount / factor) * factor_invoicing)56 tot += ((line.unit_amount / factor) * factor_invoicing)
67 elif factor_invoicing <= 1.0:57 elif factor_invoicing <= 1.0:
68 tot += (line.unit_amount / factor)58 tot += (line.unit_amount / factor)
69 deduced += ((line.unit_amount / factor) * factor_invoicing)59 deduced += ((line.unit_amount / factor) * factor_invoicing)
70 60
71 61 return {'total': tot, 'deduced': deduced}
72 return {'total':tot,'deduced':deduced}
73
7462
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):
76 date_formatted = ''64 date_formatted = ''
77 if date_to_format:65 if date_to_format:
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')
79 return date_formatted67 return date_formatted
8068
81report_sxw.report_sxw('report.hr.analytic.timesheet.report', 'hr.analytic.timesheet', 'addons/hr_timesheet_print/report/timesheet_report.rml', parser=timesheet_report)69report_sxw.report_sxw('report.hr.analytic.timesheet.report', 'hr.analytic.timesheet', 'addons/hr_timesheet_print/report/timesheet_report.rml', parser=timesheet_report)
8270
=== modified file 'hr_timesheet_print/report/timesheet_report.rml'
--- hr_timesheet_print/report/timesheet_report.rml 2011-08-12 12:33:12 +0000
+++ hr_timesheet_print/report/timesheet_report.rml 2012-12-12 10:37:22 +0000
@@ -1,22 +1,22 @@
1<?xml version="1.0"?>1<?xml version="1.0"?>
2<document filename="test.pdf">2<document filename="test.pdf">
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">
4 <pageTemplate id="first">4 <pageTemplate id="first">
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"/>
6 <pageGraphics>6 <pageGraphics>
7 <setFont name="Helvetica-Bold" size="9"/>7 <setFont name="Helvetica-Bold" size="9"/>
88
9 <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>9 <drawString x="1.0cm" y="28.1cm">[[ company.name ]]</drawString>
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>
1111
12 <setFont name="Helvetica" size="9"/>12 <setFont name="Helvetica" size="9"/>
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>
14 <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString>14 <drawString x="17.7cm" y="2cm">Page <pageNumber/></drawString>
1515
16 <lineMode width="0.7"/>16 <lineMode width="0.7"/>
17 <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines>17 <lines>0.6cm 27.9cm 20.3cm 27.9cm</lines>
18 <setFont name="Helvetica" size="8"/>18 <setFont name="Helvetica" size="8"/>
19 </pageGraphics> 19 </pageGraphics>
2020
21 </pageTemplate>21 </pageTemplate>
22 </template>22 </template>
@@ -26,7 +26,7 @@
26 <blockValign value="TOP"/>26 <blockValign value="TOP"/>
27 </blockTableStyle>27 </blockTableStyle>
28 <blockTableStyle id="Table1">28 <blockTableStyle id="Table1">
29 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/>29 <lineStyle kind="LINEBELOW" colorName="#ffffff" start="0,0" stop="-1,-1"/>
30 <blockAlignment value="LEFT"/>30 <blockAlignment value="LEFT"/>
31 <blockValign value="TOP"/>31 <blockValign value="TOP"/>
32 <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>32 <blockBackground colorName="#e6e6e6" start="0,0" stop="0,-1"/>
@@ -35,7 +35,7 @@
35 <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>35 <blockBackground colorName="#e6e6e6" start="0,1" stop="0,-1"/>
36 <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>36 <blockBackground colorName="#e6e6e6" start="1,1" stop="1,-1"/>
37 <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>37 <blockBackground colorName="#e6e6e6" start="2,1" stop="2,-1"/>
38 38
39 </blockTableStyle>39 </blockTableStyle>
40 <blockTableStyle id="Table6">40 <blockTableStyle id="Table6">
41 <blockAlignment value="LEFT"/>41 <blockAlignment value="LEFT"/>
@@ -57,7 +57,7 @@
57 <blockTableStyle id="Table2">57 <blockTableStyle id="Table2">
58 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>58 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
59 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>59 <lineStyle kind="LINEBELOW" colorName="#e6e6e6" start="0,1" stop="-1,-1"/>
60 60
61 <blockValign value="TOP"/>61 <blockValign value="TOP"/>
62 <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>62 <blockAlignment value="RIGHT" start="2,1" stop="-1,-1"/>
63 </blockTableStyle>63 </blockTableStyle>
@@ -85,7 +85,7 @@
85 <blockTableStyle id="Table7">85 <blockTableStyle id="Table7">
86 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>86 <lineStyle kind="LINEBELOW" colorName="#000000" start="0,0" stop="-1,0"/>
87 </blockTableStyle>87 </blockTableStyle>
88 88
89 <initialize>89 <initialize>
90 <paraStyle name="all" alignment="justify"/>90 <paraStyle name="all" alignment="justify"/>
91 </initialize>91 </initialize>
@@ -94,7 +94,7 @@
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"/>
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"/>
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"/>
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"/>
98 <paraStyle name="P9b" fontName="Helvetica" fontSize="8" alignment="LEFT"/>98 <paraStyle name="P9b" fontName="Helvetica" fontSize="8" alignment="LEFT"/>
99 <paraStyle name="P9c" fontName="Helvetica" fontSize="8" alignment="RIGHT"/>99 <paraStyle name="P9c" fontName="Helvetica" fontSize="8" alignment="RIGHT"/>
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"/>
@@ -130,64 +130,62 @@
130 </blockTableStyle>130 </blockTableStyle>
131131
132 <paraStyle132 <paraStyle
133 name="Level5" 133 name="Level5"
134 fontName="Helvetica"134 fontName="Helvetica"
135 fontSize="8.0" />135 fontSize="8.0" />
136 <paraStyle136 <paraStyle
137 name="Level4" 137 name="Level4"
138 fontName="Helvetica" 138 fontName="Helvetica"
139 fontSize="8.0" />139 fontSize="8.0" />
140 <paraStyle140 <paraStyle
141 name="Level3" 141 name="Level3"
142 fontName="Helvetica" 142 fontName="Helvetica"
143 fontSize="8.0" />143 fontSize="8.0" />
144 <paraStyle144 <paraStyle
145 name="Level2" 145 name="Level2"
146 firstLineIndent="-0.03cm"146 firstLineIndent="-0.03cm"
147 fontName="Helvetica-Bold" 147 fontName="Helvetica-Bold"
148 fontSize="8.0" />148 fontSize="8.0" />
149 <paraStyle name="Level1"149 <paraStyle name="Level1"
150 fontSize="8.0"150 fontSize="8.0"
151 fontName="Helvetica-Bold" 151 fontName="Helvetica-Bold"
152 />152 />
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"/>
154 <paraStyle name="Index" fontName="Helvetica"/>154 <paraStyle name="Index" fontName="Helvetica"/>
155 </stylesheet>155 </stylesheet>
156 <images/>156 <images/>
157 <story>157 <story>
158158
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>
160 <para style="P1">Spent hours details</para>160 <para style="P1">Spent hours details</para>
161 161
162 <para style="P12a"></para>162 <para style="P12a"></para>
163 <para style="P12a"></para>163 <para style="P12a"></para>
164 <blockTable colWidths="258.0,259.0" style="Table1" repeatRows="1">164 <blockTable colWidths="258.0,259.0" style="Table1" repeatRows="1">
165 <tr>165 <tr>
166 <td>166 <td>
167 <para style="P12a">Report Date : </para>167 <para style="P12a">Report Date: </para>
168 </td>168 </td>
169 <td>169 <td>
170 <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para>170 <para style="P2">[[ time.strftime("%d.%m.%Y", time.localtime()) ]]</para>
171 </td>171 </td>
172 </tr>172 </tr>
173 <tr>173 <tr>
174 <td>174 <td>
175 <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> -->175 <para style="P12a">Total hours: </para>
176 <para style="P12a">Total hours : </para>176 </td>
177 </td>177 <td>
178 <td>178 <para style="P2">[[ round(tot_hours['total'],2) ]]</para>
179 <para style="P2">[[ round(tot_hours['total'],2) ]]</para>179 </td>
180 </td>180 </tr>
181 </tr>181 <tr>
182 <tr>182 <td>
183 <td>183 <para style="P12a">Invoiced hours: </para>
184 <!-- <para style="P12a">[[ o.type == 'hours' and "Quantity of hours" or "Amount"]] used : </para> -->184 </td>
185 <para style="P12a">Invoiced hours : </para>185 <td>
186 </td>186 <para style="P2">[[ round(tot_hours['deduced'], 2) or '0.0' ]]</para>
187 <td>187 </td>
188 <para style="P2">[[ round(tot_hours['deduced'],2) or '0.0' ]]</para>188 </tr>
189 </td>
190 </tr>
191 </blockTable>189 </blockTable>
192 <para style="P12a"></para>190 <para style="P12a"></para>
193 <para style="P12a"></para>191 <para style="P12a"></para>
@@ -210,25 +208,25 @@
210 <para style="P12a">Deduced</para>208 <para style="P12a">Deduced</para>
211 </td>209 </td>
212 </tr>210 </tr>
213 211
214 <tr>212 <tr>
215 [[ repeatIn(objects,'l') ]]213 [[ repeatIn(objects, 'l') ]]
216 <td>214 <td>
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>
218 </td>216 </td>
219 <td>217 <td>
220 <para style="P2">[[ l.name or '' ]]</para>218 <para style="P2">[[ l.name or '' ]]</para>
221 </td>219 </td>
222 <td>220 <td>
223 <para style="P2c">[[ round(l.to_invoice.factor &gt;= 0.0 and l.unit_amount or l.to_invoice.factor &lt;= -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 &gt;= 0.0 and l.unit_amount or l.to_invoice.factor &lt;= -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>
224 </td>222 </td>
225 <td>223 <td>
226 <para style="P2c">[[ l.to_invoice.factor &gt;= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor &lt;= -0.01 and '100%' ]]</para>224 <para style="P2c">[[ l.to_invoice.factor &gt;= 0.0 and l.to_invoice.customer_name or l.to_invoice.factor &lt;= -0.01 and '100%' ]]</para>
227 </td>225 </td>
228 <td>226 <td>
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>
230 </td>228 </td>
231 </tr>229 </tr>
232 </blockTable>230 </blockTable>
233231
234 </story>232 </story>

Subscribers

People subscribed via source and target branches

to all changes: