Merge lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_repair_webkit-afe into lp:~openerp-community-reviewer/openerp-mrp-reports/7.0
- 7.0-add_serpentcs_mrp_repair_webkit-afe
- Merge into 7.0
Status: | Rejected |
---|---|
Rejected by: | Alexandre Fayolle - camptocamp |
Proposed branch: | lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_repair_webkit-afe |
Merge into: | lp:~openerp-community-reviewer/openerp-mrp-reports/7.0 |
Diff against target: |
597 lines (+566/-0) 6 files modified
mrp_repair_webkit/__init__.py (+23/-0) mrp_repair_webkit/__openerp__.py (+41/-0) mrp_repair_webkit/mrp_repair_report.xml (+194/-0) mrp_repair_webkit/report/__init__.py (+24/-0) mrp_repair_webkit/report/order.mako (+235/-0) mrp_repair_webkit/report/order.py (+49/-0) |
To merge this branch: | bzr merge lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_repair_webkit-afe |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yannick Vaucher @ Camptocamp | Abstain | ||
Lorenzo Battistini (community) | Needs Fixing | ||
Review via email: mp+209044@code.launchpad.net |
Commit message
Description of the change
Extraction of mrp_repair_report from lp:~serpentcs/openobject-addons/7.0-webkit-reports for inclusion in OCA
- 4. By Yannick Vaucher @ Camptocamp
-
[PEP8]
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote : | # |
mrp_repair_
mrp_repair_
mrp_repair_
mrp_repair_
Those are due to serpents copyrights :/
Don't have they a better copyright ?
Lorenzo Battistini (elbati) wrote : | # |
On 03/21/2014 05:51 PM, Yannick Vaucher @ Camptocamp wrote:
> mrp_repair_
> mrp_repair_
> mrp_repair_
> mrp_repair_
>
> Those are due to serpents copyrights :/
>
> Don't have they a better copyright ?
Can we send
'(<http://
to the following line?
Yannick Vaucher @ Camptocamp (yvaucher-c2c) : | # |
Alexandre Fayolle - camptocamp (alexandre-fayolle-c2c) wrote : | # |
submitted to github
Unmerged revisions
- 4. By Yannick Vaucher @ Camptocamp
-
[PEP8]
- 3. By Alexandre Fayolle - camptocamp
-
[REF] small code cleanup
- 2. By Hemangini
-
[ADD]Added sale_delivery_exact module
(/home/afayolle/ work/community_ addons/ serpentcs/ 7.0-webkit- reports rev 14) - 1. By Hemangini
-
[ADD] Added Module converted rml reports into webkit: mrp_repair_webkit .
(/home/afayolle/ work/community_ addons/ serpentcs/ 7.0-webkit- reports rev 5)
Preview Diff
1 | === added directory 'mrp_repair_webkit' | |||
2 | === added file 'mrp_repair_webkit/__init__.py' | |||
3 | --- mrp_repair_webkit/__init__.py 1970-01-01 00:00:00 +0000 | |||
4 | +++ mrp_repair_webkit/__init__.py 2014-03-21 16:49:59 +0000 | |||
5 | @@ -0,0 +1,23 @@ | |||
6 | 1 | # -*- coding: utf-8 -*- | ||
7 | 2 | ############################################################################## | ||
8 | 3 | # | ||
9 | 4 | # This module uses OpenERP, Open Source Management Solution Framework. | ||
10 | 5 | # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>) | ||
11 | 6 | # | ||
12 | 7 | # This program is free software: you can redistribute it and/or modify | ||
13 | 8 | # it under the terms of the GNU General Public License as published by | ||
14 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
15 | 10 | # (at your option) any later version. | ||
16 | 11 | # | ||
17 | 12 | # This program is distributed in the hope that it will be useful, | ||
18 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | 15 | # GNU General Public License for more details. | ||
21 | 16 | # | ||
22 | 17 | # You should have received a copy of the GNU General Public License | ||
23 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/> | ||
24 | 19 | # | ||
25 | 20 | ############################################################################## | ||
26 | 21 | from . import report | ||
27 | 22 | |||
28 | 23 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
29 | 0 | 24 | ||
30 | === added file 'mrp_repair_webkit/__openerp__.py' | |||
31 | --- mrp_repair_webkit/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
32 | +++ mrp_repair_webkit/__openerp__.py 2014-03-21 16:49:59 +0000 | |||
33 | @@ -0,0 +1,41 @@ | |||
34 | 1 | # -*- coding: utf-8 -*- | ||
35 | 2 | ############################################################################## | ||
36 | 3 | # | ||
37 | 4 | # This module uses OpenERP, Open Source Management Solution Framework. | ||
38 | 5 | # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>) | ||
39 | 6 | # | ||
40 | 7 | # This program is free software: you can redistribute it and/or modify | ||
41 | 8 | # it under the terms of the GNU General Public License as published by | ||
42 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
43 | 10 | # (at your option) any later version. | ||
44 | 11 | # | ||
45 | 12 | # This program is distributed in the hope that it will be useful, | ||
46 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
47 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
48 | 15 | # GNU General Public License for more details. | ||
49 | 16 | # | ||
50 | 17 | # You should have received a copy of the GNU General Public License | ||
51 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/> | ||
52 | 19 | # | ||
53 | 20 | ############################################################################## | ||
54 | 21 | |||
55 | 22 | { | ||
56 | 23 | 'name': 'Repairs Management', | ||
57 | 24 | 'version': '1.0', | ||
58 | 25 | 'category': 'Manufacturing', | ||
59 | 26 | 'description': """ | ||
60 | 27 | The aim is to have a complete module to manage all products repairs. | ||
61 | 28 | ==================================================================== | ||
62 | 29 | It is conversion of rml report to Webkit Report. | ||
63 | 30 | |||
64 | 31 | """, | ||
65 | 32 | 'author': 'Serpent Consulting Services Pvt. Ltd.', | ||
66 | 33 | 'website': 'http://www.serpentcs.com', | ||
67 | 34 | 'depends': ['mrp_repair', 'report_webkit'], | ||
68 | 35 | 'data': [ | ||
69 | 36 | 'mrp_repair_report.xml', | ||
70 | 37 | ], | ||
71 | 38 | 'installable': True, | ||
72 | 39 | 'auto_install': False, | ||
73 | 40 | } | ||
74 | 41 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
75 | 0 | 42 | ||
76 | === added file 'mrp_repair_webkit/mrp_repair_report.xml' | |||
77 | --- mrp_repair_webkit/mrp_repair_report.xml 1970-01-01 00:00:00 +0000 | |||
78 | +++ mrp_repair_webkit/mrp_repair_report.xml 2014-03-21 16:49:59 +0000 | |||
79 | @@ -0,0 +1,194 @@ | |||
80 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
81 | 2 | <openerp> | ||
82 | 3 | <data> | ||
83 | 4 | <record id="mrp_header" model="ir.header_webkit"> | ||
84 | 5 | <field name="footer_html"><![CDATA[ | ||
85 | 6 | <html> | ||
86 | 7 | <head> | ||
87 | 8 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
88 | 9 | <script> | ||
89 | 10 | function subst() { | ||
90 | 11 | var vars={}; | ||
91 | 12 | var x=document.location.search.substring(1).split('&'); | ||
92 | 13 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
93 | 14 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
94 | 15 | for(var i in x) { | ||
95 | 16 | var y = document.getElementsByClassName(x[i]); | ||
96 | 17 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
97 | 18 | } | ||
98 | 19 | } | ||
99 | 20 | </script> | ||
100 | 21 | <style type="text/css"> | ||
101 | 22 | |||
102 | 23 | ${css} | ||
103 | 24 | </style> | ||
104 | 25 | </head> | ||
105 | 26 | <body style="border:0; margin: 0;" onload="subst()"> | ||
106 | 27 | <table class="header" style="border-top: 1px solid black; width: 100%"> | ||
107 | 28 | <tr > | ||
108 | 29 | <td style="text-align:center;font-size:12;" >${ company.rml_footer or '' }</td> | ||
109 | 30 | </tr> | ||
110 | 31 | <tr > | ||
111 | 32 | <td style="text-align:center;font-size:12;" >Contact : ${ user.name }</td> | ||
112 | 33 | </tr> | ||
113 | 34 | </table> ${_debug or ''|n} </body> | ||
114 | 35 | </html> | ||
115 | 36 | ]]></field> | ||
116 | 37 | <field name="orientation">Portrait</field> | ||
117 | 38 | <field name="format">A4</field> | ||
118 | 39 | <field name="html"><![CDATA[ | ||
119 | 40 | <html> | ||
120 | 41 | <head> | ||
121 | 42 | <meta content="text/html; charset=UTF-8" http-equiv="content-type"/> | ||
122 | 43 | <script> | ||
123 | 44 | function subst() { | ||
124 | 45 | var vars={}; | ||
125 | 46 | var x=document.location.search.substring(1).split('&'); | ||
126 | 47 | for(var i in x) {var z=x[i].split('=',2);vars[z[0]] = unescape(z[1]);} | ||
127 | 48 | var x=['frompage','topage','page','webpage','section','subsection','subsubsection']; | ||
128 | 49 | for(var i in x) { | ||
129 | 50 | var y = document.getElementsByClassName(x[i]); | ||
130 | 51 | for(var j=0; j<y.length; ++j) y[j].textContent = vars[x[i]]; | ||
131 | 52 | } | ||
132 | 53 | } | ||
133 | 54 | </script> | ||
134 | 55 | <style type="text/css"> | ||
135 | 56 | |||
136 | 57 | ${css} | ||
137 | 58 | </style> | ||
138 | 59 | </head> | ||
139 | 60 | <body style="border:0; margin: 0;" onload="subst()"> | ||
140 | 61 | <table class="header" style="border-bottom: 1px solid black; width: 100%"> | ||
141 | 62 | <tr > | ||
142 | 63 | <td style="text-align:left;font-size:12;" width="20%">${ helper.embed_image('png',company.logo,200,50)|n }</td> | ||
143 | 64 | <td style="text-align:right;font-size:12;" width="80%"></br></br>${ company.rml_header1 }</td> | ||
144 | 65 | </tr> | ||
145 | 66 | </table> ${_debug or ''|n} </body> | ||
146 | 67 | <p style="text-align:left;font-size:12;">${company.name}</p></br></br> | ||
147 | 68 | <table width="100%"> | ||
148 | 69 | <tr> | ||
149 | 70 | <td style="text-align:left;font-size:10;" width="25%"> | ||
150 | 71 | Phone: ${company.phone or ''} | ||
151 | 72 | </td> | ||
152 | 73 | <td width="75%"></td> | ||
153 | 74 | </tr> | ||
154 | 75 | |||
155 | 76 | <tr> | ||
156 | 77 | <td style="text-align:left;font-size:10; border-bottom: 1px solid black;" width="25%"> | ||
157 | 78 | Mail: ${company.email} | ||
158 | 79 | </td> | ||
159 | 80 | <td width="75%"></td> | ||
160 | 81 | </tr> | ||
161 | 82 | </table> | ||
162 | 83 | </html>]]> | ||
163 | 84 | </field> | ||
164 | 85 | <field eval="45.0" name="margin_top"/> | ||
165 | 86 | <field eval="25.0" name="margin_bottom"/> | ||
166 | 87 | <field name="css"><![CDATA[ | ||
167 | 88 | |||
168 | 89 | body, table, td, span, div { | ||
169 | 90 | font-family: Helvetica; | ||
170 | 91 | } | ||
171 | 92 | |||
172 | 93 | body { | ||
173 | 94 | font-family; | ||
174 | 95 | font-size:9; | ||
175 | 96 | |||
176 | 97 | } | ||
177 | 98 | |||
178 | 99 | |||
179 | 100 | .header { | ||
180 | 101 | margin-left:0; | ||
181 | 102 | text-align:left; | ||
182 | 103 | width:300px; | ||
183 | 104 | font-size:12; | ||
184 | 105 | } | ||
185 | 106 | .title { | ||
186 | 107 | font-size:16px; | ||
187 | 108 | font-weight: bold; | ||
188 | 109 | font-family: Helvetica; | ||
189 | 110 | padding-bottom:20px; | ||
190 | 111 | padding-top:20px; | ||
191 | 112 | } | ||
192 | 113 | |||
193 | 114 | |||
194 | 115 | .basic_table{ | ||
195 | 116 | width:100%; | ||
196 | 117 | text-align:center; | ||
197 | 118 | border:1px solid lightGrey; | ||
198 | 119 | border-collapse: collapse; | ||
199 | 120 | font-family: Helvetica; | ||
200 | 121 | padding-bottom:20px; | ||
201 | 122 | padding-top:20px; | ||
202 | 123 | } | ||
203 | 124 | |||
204 | 125 | .basic_table td { | ||
205 | 126 | border:1px solid lightGrey; | ||
206 | 127 | font-size:11px; | ||
207 | 128 | font-family: Helvetica; | ||
208 | 129 | padding:3px 3px 3px 3px; | ||
209 | 130 | } | ||
210 | 131 | |||
211 | 132 | .list_table { | ||
212 | 133 | border-bottom:1px solid black; | ||
213 | 134 | font-size:13px; | ||
214 | 135 | border-collapse: collapse; | ||
215 | 136 | font-family: Helvetica; | ||
216 | 137 | font-weight: bold; | ||
217 | 138 | width:100%; | ||
218 | 139 | padding-top:30px; | ||
219 | 140 | } | ||
220 | 141 | .add{ | ||
221 | 142 | width:100%; | ||
222 | 143 | font-size:12px; | ||
223 | 144 | font-family: Helvetica; } | ||
224 | 145 | .tbl_header{ | ||
225 | 146 | width:100%; | ||
226 | 147 | font-size:10px; | ||
227 | 148 | font-family: Helvetica; | ||
228 | 149 | border:1px solid lightGrey; | ||
229 | 150 | border-collapse: collapse; | ||
230 | 151 | } | ||
231 | 152 | .tr_bottom_line{ | ||
232 | 153 | border-bottom: thin solid black; | ||
233 | 154 | width:100%; | ||
234 | 155 | font-size:12px; | ||
235 | 156 | font-family: Helvetica; | ||
236 | 157 | } | ||
237 | 158 | .tr_bottom_line_dark_grey{ | ||
238 | 159 | border-bottom: thin solid #ccc; | ||
239 | 160 | width:100%; | ||
240 | 161 | font-size:12px; | ||
241 | 162 | font-family: Helvetica; | ||
242 | 163 | padding-left: 3px ; | ||
243 | 164 | } | ||
244 | 165 | .tr_top{ | ||
245 | 166 | border-top: 1px solid black; | ||
246 | 167 | width:100%; | ||
247 | 168 | font-size:12px; | ||
248 | 169 | font-family: Helvetica; | ||
249 | 170 | } | ||
250 | 171 | |||
251 | 172 | .td_f12{ | ||
252 | 173 | font-size:12px; | ||
253 | 174 | font-family: Helvetica; | ||
254 | 175 | } | ||
255 | 176 | |||
256 | 177 | |||
257 | 178 | |||
258 | 179 | ]]> | ||
259 | 180 | </field> | ||
260 | 181 | <field name="name">MRP Header</field> | ||
261 | 182 | </record> | ||
262 | 183 | |||
263 | 184 | <report | ||
264 | 185 | id="report_mrp_repair_webkit" | ||
265 | 186 | string="Quotation / Order" | ||
266 | 187 | model="mrp.repair" | ||
267 | 188 | name="repair.order.webkit" | ||
268 | 189 | file="mrp_repair_webkit/report/order.mako" | ||
269 | 190 | auto="False" | ||
270 | 191 | report_type="webkit" | ||
271 | 192 | webkit_header="mrp_header"/> | ||
272 | 193 | </data> | ||
273 | 194 | </openerp> | ||
274 | 0 | 195 | ||
275 | === added directory 'mrp_repair_webkit/report' | |||
276 | === added file 'mrp_repair_webkit/report/__init__.py' | |||
277 | --- mrp_repair_webkit/report/__init__.py 1970-01-01 00:00:00 +0000 | |||
278 | +++ mrp_repair_webkit/report/__init__.py 2014-03-21 16:49:59 +0000 | |||
279 | @@ -0,0 +1,24 @@ | |||
280 | 1 | # -*- coding: utf-8 -*- | ||
281 | 2 | ############################################################################## | ||
282 | 3 | # | ||
283 | 4 | # This module uses OpenERP, Open Source Management Solution Framework. | ||
284 | 5 | # Copyright (C) 2013-Today Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>) | ||
285 | 6 | # | ||
286 | 7 | # This program is free software: you can redistribute it and/or modify | ||
287 | 8 | # it under the terms of the GNU General Public License as published by | ||
288 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
289 | 10 | # (at your option) any later version. | ||
290 | 11 | # | ||
291 | 12 | # This program is distributed in the hope that it will be useful, | ||
292 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
293 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
294 | 15 | # GNU General Public License for more details. | ||
295 | 16 | # | ||
296 | 17 | # You should have received a copy of the GNU General Public License | ||
297 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/> | ||
298 | 19 | # | ||
299 | 20 | ############################################################################## | ||
300 | 21 | |||
301 | 22 | from . import order | ||
302 | 23 | |||
303 | 24 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
304 | 0 | 25 | ||
305 | === added file 'mrp_repair_webkit/report/order.mako' | |||
306 | --- mrp_repair_webkit/report/order.mako 1970-01-01 00:00:00 +0000 | |||
307 | +++ mrp_repair_webkit/report/order.mako 2014-03-21 16:49:59 +0000 | |||
308 | @@ -0,0 +1,235 @@ | |||
309 | 1 | <html> | ||
310 | 2 | <head> | ||
311 | 3 | <style type="text/css"> | ||
312 | 4 | ${css} | ||
313 | 5 | </style> | ||
314 | 6 | <title>qutation_order.pdf</title> | ||
315 | 7 | </head> | ||
316 | 8 | <body> | ||
317 | 9 | %for o in objects: | ||
318 | 10 | <table class="add"> | ||
319 | 11 | <tr> | ||
320 | 12 | <td width="70%"> | ||
321 | 13 | </br> | ||
322 | 14 | <b>Shipping address :</b></br> | ||
323 | 15 | ${ o.partner_id.name }</br> | ||
324 | 16 | ${ o.address_id.street or '' }</br> | ||
325 | 17 | ${ o.address_id.city or '' } ${ o.address_id.zip or '' }</br> | ||
326 | 18 | ${ o.address_id.country_id.name or '' }</br> | ||
327 | 19 | %if (o.address_id.phone): | ||
328 | 20 | Tel. : ${ o.address_id.phone or '' }</br> | ||
329 | 21 | %endif | ||
330 | 22 | %if o.address_id.fax: | ||
331 | 23 | Fax : ${ o.address_id.fax or '' }</br> | ||
332 | 24 | %endif | ||
333 | 25 | %if o.address_id.vat: | ||
334 | 26 | ${ o.address_id.vat or '' }</br> | ||
335 | 27 | %endif | ||
336 | 28 | |||
337 | 29 | |||
338 | 30 | </td> | ||
339 | 31 | <td width="30%" colspan="2"> | ||
340 | 32 | ${ o.partner_id.name or '' } | ||
341 | 33 | ${ o.default_address_id.street or '' }</br> | ||
342 | 34 | ${ o.default_address_id.city or '' } ${ o.default_address_id.zip or '' }</br> | ||
343 | 35 | ${ o.default_address_id.country_id.name or '' }</br> | ||
344 | 36 | %if (o.default_address_id.phone): | ||
345 | 37 | Tel. : ${ o.default_address_id.phone or '' }</br> | ||
346 | 38 | %endif | ||
347 | 39 | %if o.default_address_id.fax: | ||
348 | 40 | Fax : ${ o.default_address_id.fax or '' }</br> | ||
349 | 41 | %endif | ||
350 | 42 | %if o.default_address_id.vat: | ||
351 | 43 | ${ o.default_address_id.vat or '' } | ||
352 | 44 | %endif | ||
353 | 45 | </td> | ||
354 | 46 | </tr> | ||
355 | 47 | <tr> | ||
356 | 48 | <td> | ||
357 | 49 | <b>Invoice address :</b></br> | ||
358 | 50 | ${ o.partner_id and o.partner_id.property_payment_term.name or ''}</br> | ||
359 | 51 | ${ o.partner_invoice_id.name or ''}</br> | ||
360 | 52 | ${ o.partner_invoice_id.street or '' }</br> | ||
361 | 53 | ${ o.partner_invoice_id.city or '' } ${ o.partner_invoice_id.zip or '' }</br> | ||
362 | 54 | ${ o.partner_invoice_id.country_id.name or '' }</br> | ||
363 | 55 | %if (o.partner_invoice_id.phone): | ||
364 | 56 | Tel. : ${ o.partner_invoice_id.phone or '' }</br> | ||
365 | 57 | %endif | ||
366 | 58 | %if o.partner_invoice_id.fax: | ||
367 | 59 | Fax : ${ o.partner_invoice_id.fax or '' }</br> | ||
368 | 60 | %endif | ||
369 | 61 | %if o.partner_invoice_id.vat: | ||
370 | 62 | ${ o.partner_invoice_id.vat or '' } | ||
371 | 63 | %endif | ||
372 | 64 | |||
373 | 65 | </td> | ||
374 | 66 | </tr> | ||
375 | 67 | </table> | ||
376 | 68 | <p class="title"> | ||
377 | 69 | %if o.state <> 'draft' or '': | ||
378 | 70 | Repair Quotation N° : ${ o.name } | ||
379 | 71 | %endif | ||
380 | 72 | %if o.state=='draft' or '' : | ||
381 | 73 | Repair Order N° : ${ o.name } | ||
382 | 74 | %endif | ||
383 | 75 | </p> | ||
384 | 76 | <table class="basic_table"> | ||
385 | 77 | <tr> | ||
386 | 78 | <td class="25%"> | ||
387 | 79 | <b>${_("Product to Repair")} </b> | ||
388 | 80 | </td> | ||
389 | 81 | <td class="25%"> | ||
390 | 82 | <b>${_("Lot Number")}</b> | ||
391 | 83 | </td> | ||
392 | 84 | <td class="25%"> | ||
393 | 85 | <b>${_("Guarantee Limit")}</b> | ||
394 | 86 | </td> | ||
395 | 87 | <td class="25%"> | ||
396 | 88 | <b>${_("Printing Date")}</b> | ||
397 | 89 | </td> | ||
398 | 90 | </tr> | ||
399 | 91 | <tr> | ||
400 | 92 | <td class="25%"> | ||
401 | 93 | ${ o.product_id.name or '' } | ||
402 | 94 | </td> | ||
403 | 95 | <td class="25%"> | ||
404 | 96 | ${ o.prodlot_id.name or ' ' } | ||
405 | 97 | </td> | ||
406 | 98 | <td class="25%"> | ||
407 | 99 | ${ formatLang(o.guarantee_limit,date = True) } | ||
408 | 100 | </td> | ||
409 | 101 | <td class="25%"> | ||
410 | 102 | ${ formatLang(time.strftime('%Y-%m-%d'),date = True)} | ||
411 | 103 | </td> | ||
412 | 104 | </tr> | ||
413 | 105 | </table> | ||
414 | 106 | </br> | ||
415 | 107 | <table class="list_table"> | ||
416 | 108 | <tr> | ||
417 | 109 | <td width="57%"> | ||
418 | 110 | ${_("Description")} | ||
419 | 111 | </td> | ||
420 | 112 | <td width="10%"> | ||
421 | 113 | ${_("Tax")} | ||
422 | 114 | </td> | ||
423 | 115 | <td width="10%" align="right"> | ||
424 | 116 | ${_("Quantity")} | ||
425 | 117 | </td> | ||
426 | 118 | <td width="8%" align="right"> | ||
427 | 119 | ${_("Unit Price")} | ||
428 | 120 | </td> | ||
429 | 121 | <td width="15%" align="right"> | ||
430 | 122 | ${_("Price")} | ||
431 | 123 | </td> | ||
432 | 124 | </tr> | ||
433 | 125 | </table> | ||
434 | 126 | <h3><b>Operation Line(s)</b></h3> | ||
435 | 127 | %for line in o.operations: | ||
436 | 128 | %if line['to_invoice']==True: | ||
437 | 129 | <table class="tr_bottom_line_dark_grey"> | ||
438 | 130 | <tr> | ||
439 | 131 | <td width="57%"> | ||
440 | 132 | %if line.type == 'add' or '': | ||
441 | 133 | (Add)${ line.name } | ||
442 | 134 | %endif | ||
443 | 135 | %if line.type == 'remove' or '': | ||
444 | 136 | (Remove) ${ line.name } | ||
445 | 137 | %endif | ||
446 | 138 | </td> | ||
447 | 139 | <td width="10%"> | ||
448 | 140 | ${ ','.join(map( lambda x: x.name, line.tax_id)) } | ||
449 | 141 | </td> | ||
450 | 142 | <td width="10%" align="right"> | ||
451 | 143 | ${ formatLang(line.product_uom_qty) } ${ line.product_uom.name } | ||
452 | 144 | </td> | ||
453 | 145 | <td width="8%" align="right"> | ||
454 | 146 | ${ formatLang(line.price_unit) } | ||
455 | 147 | </td> | ||
456 | 148 | <td width="15%" align="right"> | ||
457 | 149 | ${ formatLang(line.price_subtotal, currency_obj = o.pricelist_id.currency_id) } | ||
458 | 150 | </td> | ||
459 | 151 | </tr> | ||
460 | 152 | </table> | ||
461 | 153 | %endif | ||
462 | 154 | %endfor | ||
463 | 155 | %if len(o.fees_lines) != 0 : | ||
464 | 156 | |||
465 | 157 | <h3><b>Fees Line(s)</b></h3> | ||
466 | 158 | %for fees in o.fees_lines: | ||
467 | 159 | %if fees.to_invoice==True: | ||
468 | 160 | <table class="tr_bottom_line_dark_grey"> | ||
469 | 161 | <tr> | ||
470 | 162 | <td width="57%"> | ||
471 | 163 | ${ fees.name } | ||
472 | 164 | </td> | ||
473 | 165 | <td width="10%"> | ||
474 | 166 | ${ ','.join(map( lambda x: x.name, fees.tax_id)) } | ||
475 | 167 | </td> | ||
476 | 168 | <td width="10%" align="right"> | ||
477 | 169 | ${ formatLang(fees.product_uom_qty) } ${ fees.product_uom.name } | ||
478 | 170 | </td> | ||
479 | 171 | <td width="8" align="right"> | ||
480 | 172 | ${ formatLang(fees.price_unit) } | ||
481 | 173 | </td> | ||
482 | 174 | <td width="15%" align="right"> | ||
483 | 175 | ${ formatLang(fees.price_subtotal, currency_obj = o.pricelist_id.currency_id) } | ||
484 | 176 | </td> | ||
485 | 177 | </tr> | ||
486 | 178 | </table> | ||
487 | 179 | %endif | ||
488 | 180 | %endfor | ||
489 | 181 | %endif | ||
490 | 182 | <table width="100%"> | ||
491 | 183 | <tr> | ||
492 | 184 | <td width="70%"> | ||
493 | 185 | </td> | ||
494 | 186 | <td width="30%"> | ||
495 | 187 | <table class="tr_top"> | ||
496 | 188 | <tr> | ||
497 | 189 | <td> | ||
498 | 190 | <b>Net Total :</b> | ||
499 | 191 | </td> | ||
500 | 192 | <td align="right"> | ||
501 | 193 | ${ formatLang(o.amount_untaxed, dp='Sale Price', currency_obj=o.pricelist_id.currency_id) } | ||
502 | 194 | </td> | ||
503 | 195 | </tr> | ||
504 | 196 | <tr> | ||
505 | 197 | <td> | ||
506 | 198 | <b>${_("Taxes:")}</b> | ||
507 | 199 | </td> | ||
508 | 200 | <td align="right"> | ||
509 | 201 | ${ formatLang(o.amount_tax, dp='Account', currency_obj=o.pricelist_id.currency_id) } | ||
510 | 202 | </td> | ||
511 | 203 | </tr> | ||
512 | 204 | </table> | ||
513 | 205 | </td> | ||
514 | 206 | </tr> | ||
515 | 207 | <tr> | ||
516 | 208 | <td width="70%"> | ||
517 | 209 | </td> | ||
518 | 210 | <td width="30%"> | ||
519 | 211 | <table class="tr_top"> | ||
520 | 212 | <tr> | ||
521 | 213 | <td><b> | ||
522 | 214 | ${_("Total :")}</b> | ||
523 | 215 | </td> | ||
524 | 216 | <td align="right"> <b> | ||
525 | 217 | ${ formatLang(total(o), dp='Sale Price', currency_obj=o.pricelist_id.currency_id) }</b> | ||
526 | 218 | </td> | ||
527 | 219 | </tr> | ||
528 | 220 | </table> | ||
529 | 221 | </td> | ||
530 | 222 | </tr> | ||
531 | 223 | </table> | ||
532 | 224 | <table width="100%"> | ||
533 | 225 | <tr> | ||
534 | 226 | <td class="td_f12"> | ||
535 | 227 | ${ o.quotation_notes or '' } | ||
536 | 228 | </td> | ||
537 | 229 | </tr> | ||
538 | 230 | </table> | ||
539 | 231 | <p style="page-break-after:always"> | ||
540 | 232 | </p> | ||
541 | 233 | %endfor | ||
542 | 234 | </body> | ||
543 | 235 | </html> | ||
544 | 0 | 236 | ||
545 | === added file 'mrp_repair_webkit/report/order.py' | |||
546 | --- mrp_repair_webkit/report/order.py 1970-01-01 00:00:00 +0000 | |||
547 | +++ mrp_repair_webkit/report/order.py 2014-03-21 16:49:59 +0000 | |||
548 | @@ -0,0 +1,49 @@ | |||
549 | 1 | # -*- coding: utf-8 -*- | ||
550 | 2 | ############################################################################## | ||
551 | 3 | # | ||
552 | 4 | # This module uses OpenERP, Open Source Management Solution Framework. | ||
553 | 5 | # Copyright (C) 2012-Today Serpent Consulting Services Pvt. Ltd.(<http://www.serpentcs.com>) | ||
554 | 6 | # | ||
555 | 7 | # This program is free software: you can redistribute it and/or modify | ||
556 | 8 | # it under the terms of the GNU General Public License as published by | ||
557 | 9 | # the Free Software Foundation, either version 3 of the License, or | ||
558 | 10 | # (at your option) any later version. | ||
559 | 11 | # | ||
560 | 12 | # This program is distributed in the hope that it will be useful, | ||
561 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
562 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
563 | 15 | # GNU General Public License for more details. | ||
564 | 16 | # | ||
565 | 17 | # You should have received a copy of the GNU General Public License | ||
566 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/> | ||
567 | 19 | # | ||
568 | 20 | ############################################################################## | ||
569 | 21 | import time | ||
570 | 22 | |||
571 | 23 | from openerp.report import report_sxw | ||
572 | 24 | |||
573 | 25 | |||
574 | 26 | class order(report_sxw.rml_parse): | ||
575 | 27 | def __init__(self, cr, uid, name, context): | ||
576 | 28 | super(order, self).__init__(cr, uid, name, context=context) | ||
577 | 29 | self.localcontext.update({ | ||
578 | 30 | 'time': time, | ||
579 | 31 | 'total': self.total, | ||
580 | 32 | }) | ||
581 | 33 | |||
582 | 34 | def total(self, repair): | ||
583 | 35 | print "repair", repair | ||
584 | 36 | total = 0.0 | ||
585 | 37 | for operation in repair.operations: | ||
586 | 38 | total += operation.price_subtotal | ||
587 | 39 | for fee in repair.fees_lines: | ||
588 | 40 | total += fee.price_subtotal | ||
589 | 41 | total = total + repair.amount_tax | ||
590 | 42 | return total | ||
591 | 43 | |||
592 | 44 | report_sxw.report_sxw('report.repair.order.webkit', | ||
593 | 45 | 'mrp.repair', | ||
594 | 46 | 'addons/mrp_repair_webkit/report/order.mako', | ||
595 | 47 | parser=order) | ||
596 | 48 | |||
597 | 49 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
Hello Alexandre,
just checked with https:/ /code.launchpad .net/~savoirfai relinux- openerp/ lp-community- utils/checkout- pep8
$ ./checkout- flake8. sh lp:~camptocamp/openerp-mrp-reports/7.0-add_serpentcs_mrp_repair_webkit-afe mrp_repair_webkit flake/~ camptocamp. openerp- mrp-reports. 7.0-add_ serpentcs_ mrp_repair_ webkit- afe
Making a temp directory
branching to /tmp/checkout-
Branched 3 revisions.
mrp_repair_ webkit/ __init_ _.py:24: 1: W391 blank line at end of file webkit/ report/ __init_ _.py:25: 1: W391 blank line at end of file webkit/ report/ order.py: 25:1: E302 expected 2 blank lines, found 1 webkit/ report/ order.py: 34:23: E231 missing whitespace after ',' webkit/ report/ order.py: 37:12: E111 indentation is not a multiple of four webkit/ report/ order.py: 39:12: E111 indentation is not a multiple of four webkit/ report/ order.py: 49:1: W391 blank line at end of file
mrp_repair_
mrp_repair_
mrp_repair_
mrp_repair_
mrp_repair_
mrp_repair_
mrp_repair_ webkit/ __init_ _.py:5: 80: E501 line too long (95 > 79 characters) webkit/ __openerp_ _.py:5: 80: E501 line too long (95 > 79 characters) webkit/ report/ __init_ _.py:5: 80: E501 line too long (95 > 79 characters) webkit/ report/ order.py: 5:80: E501 line too long (95 > 79 characters)
mrp_repair_
mrp_repair_
mrp_repair_
Thanks