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