Merge lp:~camptocamp/sale-reports/vre-sale_order_proformat into lp:~sale-core-editors/sale-reports/7.0

Proposed by Vincent Renaville@camptocamp
Status: Merged
Approved by: Yannick Vaucher @ Camptocamp
Approved revision: 31
Merged at revision: 28
Proposed branch: lp:~camptocamp/sale-reports/vre-sale_order_proformat
Merge into: lp:~sale-core-editors/sale-reports/7.0
Diff against target: 874 lines (+837/-0)
7 files modified
sale_order_proforma_webkit/__init__.py (+21/-0)
sale_order_proforma_webkit/__openerp__.py (+43/-0)
sale_order_proforma_webkit/i18n/en.po (+114/-0)
sale_order_proforma_webkit/i18n/fr.po (+116/-0)
sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot (+114/-0)
sale_order_proforma_webkit/report.xml (+23/-0)
sale_order_proforma_webkit/report/sale_proforma.mako (+406/-0)
To merge this branch: bzr merge lp:~camptocamp/sale-reports/vre-sale_order_proformat
Reviewer Review Type Date Requested Status
Yannick Vaucher @ Camptocamp code review, no test Approve
Nicolas Bessi - Camptocamp (community) Approve
Romain Deheele - Camptocamp (community) code review Approve
Pedro Manuel Baeza code review and test Approve
Review via email: mp+223563@code.launchpad.net

Description of the change

Hello,

This add a report for proforma required for the customs.

Thanks,

Vincent

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Vincent,

Thanks you very much for this module. It's something that I have also on my pendings. I have tested, and these are the issues I have found:

- Module doesn't install because you have on __init__.py "from . import report", but there is no __init__.py on that folder. Please remove this line.
- Module title put "ProFormat" instead of "Pro Forma"
- When I try to print the report, I get:

SyntaxError: JSON.parse: unexpected end of data at line 2 column 1 of the JSON data

Regards.

review: Needs Fixing (code review and test)
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

Thanks for the Review, I have test on customer branches instead of a fresh one (bad idea).

I have fixed according to your review and test it on a fresh instance.

Sorry for the mistake.

Vincent

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the changes, Vincent. Now it works as intended. Only one last fix: please put at the end of the mako file this:

%if inv != objects[-1]:
    <p style="page-break-after:always"/>
%endif

That is because depending on the wkhtmltopdf version, you get an extra blank page at the end. With this, you always get the same result.

Regards.

review: Needs Fixing (code review and test)
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

Many thanks for the review and the fix suggestion , I was not aware of it.

I have push a version according to your last review.

thanks for your help,

Vincent

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Thanks for the changes!

Regards.

review: Approve (code review and test)
Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Hi Vincent,

I'm not sure but I think it's better to put ## -*- coding: utf-8 -*- at the start of mako file.

other small things:
l.10,36 : comma is misplaced between our 2 names
l.62 : s/base_header_webkit/base_headers_webkit

Thanks for porting this addon here,

Romain

review: Needs Fixing (code review)
Revision history for this message
Vincent Renaville@camptocamp (vrenaville-c2c) wrote :

Hello,

Thanks for review Romain,

I have made the fix according to your comment.

thanks,

Vincent

Revision history for this message
Romain Deheele - Camptocamp (romaindeheele) wrote :

Thanks Vincent, LGTM

review: Approve (code review)
Revision history for this message
Nicolas Bessi - Camptocamp (nbessi-c2c-deactivatedaccount) wrote :

LGTM

review: Approve
Revision history for this message
Yannick Vaucher @ Camptocamp (yvaucher-c2c) wrote :

Fixed mark down in __openerp__.py and improved it a bit.

LGTM

review: Approve (code review, no test)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'sale_order_proforma_webkit'
2=== added file 'sale_order_proforma_webkit/__init__.py'
3--- sale_order_proforma_webkit/__init__.py 1970-01-01 00:00:00 +0000
4+++ sale_order_proforma_webkit/__init__.py 2014-06-26 09:28:04 +0000
5@@ -0,0 +1,21 @@
6+# -*- coding: utf-8 -*-
7+##############################################################################
8+#
9+# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
10+# @author Romain Deheele, Vincent Renaville
11+#
12+# This program is free software: you can redistribute it and/or modify
13+# it under the terms of the GNU Affero General Public License as
14+# published by the Free Software Foundation, either version 3 of the
15+# 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 Affero General Public License for more details.
21+#
22+# You should have received a copy of the GNU Affero General Public License
23+# along with this program. If not, see <http://www.gnu.org/licenses/>.
24+#
25+##############################################################################
26+
27
28=== added file 'sale_order_proforma_webkit/__openerp__.py'
29--- sale_order_proforma_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
30+++ sale_order_proforma_webkit/__openerp__.py 2014-06-26 09:28:04 +0000
31@@ -0,0 +1,43 @@
32+# -*- coding: utf-8 -*-
33+##############################################################################
34+#
35+# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
36+# @author Romain Deheele, Vincent Renaville
37+#
38+# This program is free software: you can redistribute it and/or modify
39+# it under the terms of the GNU Affero General Public License as
40+# published by the Free Software Foundation, either version 3 of the
41+# License, or (at your option) any later version.
42+#
43+# This program is distributed in the hope that it will be useful,
44+# but WITHOUT ANY WARRANTY; without even the implied warranty of
45+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
46+# GNU Affero General Public License for more details.
47+#
48+# You should have received a copy of the GNU Affero General Public License
49+# along with this program. If not, see <http://www.gnu.org/licenses/>.
50+#
51+##############################################################################
52+
53+{'name': 'Sales Order ProForma Report using Webkit Library',
54+ 'version': '1.1.1',
55+ 'category': 'Reports/Webkit',
56+ 'description': """
57+Sale order webkit
58+#################
59+
60+* Add a sale proforma report in webkit .
61+
62+Depends on base_headers_webkit community addon available here:
63+`https://launchpad.net/webkit-utils <https://launchpad.net/webkit-utils>`_
64+ """,
65+ 'author': 'Camptocamp',
66+ 'website': 'http://www.camptocamp.com',
67+ 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'sale'],
68+ 'data': ['report.xml',
69+ ],
70+ 'demo_xml': [],
71+ 'test': [],
72+ 'installable': True,
73+ 'active': False,
74+ }
75
76=== added directory 'sale_order_proforma_webkit/i18n'
77=== added file 'sale_order_proforma_webkit/i18n/en.po'
78--- sale_order_proforma_webkit/i18n/en.po 1970-01-01 00:00:00 +0000
79+++ sale_order_proforma_webkit/i18n/en.po 2014-06-26 09:28:04 +0000
80@@ -0,0 +1,114 @@
81+#. module: sale_report_proforma
82+#: report:addons/sale_report_proforma/report/sale_proforma.mako:301
83+msgid "Thank you for your prompt payment"
84+msgstr "Thank you for your prompt payment"
85+
86+
87+#. module: sale_report_proforma
88+#: report:addons/sale_report_proforma/report/sale_proforma.mako:218
89+msgid "Responsible"
90+msgstr "Responsible"
91+
92+#. module: sale_report_proforma
93+#: report:addons/sale_report_proforma/report/sale_proforma.mako:211
94+msgid "Subject : "
95+msgstr "Subject : "
96+
97+
98+#. module: sale_report_proforma
99+#: report:addons/sale_report_proforma/report/sale_proforma.mako:243
100+msgid "Unit Price"
101+msgstr "Unit Price"
102+
103+
104+#. module: sale_report_proforma
105+#: report:addons/sale_report_proforma/report/sale_proforma.mako:245
106+msgid "Disc.(%)"
107+msgstr "Disc.(%)"
108+
109+#. module: sale_report_proforma
110+#: report:addons/sale_report_proforma/report/sale_proforma.mako:208
111+msgid "PRO-FORMA"
112+msgstr "PRO-FORMA"
113+
114+#. module: sale_report_proforma
115+#: report:addons/sale_report_proforma/report/sale_proforma.mako:280
116+msgid "Taxes:"
117+msgstr "Taxes:"
118+
119+
120+#. module: sale_report_proforma
121+#: report:addons/sale_report_proforma/report/sale_proforma.mako:240
122+msgid "Description"
123+msgstr "Description"
124+
125+#. module: sale_report_proforma
126+#: report:addons/sale_report_proforma/report/sale_proforma.mako:220
127+msgid "Our reference"
128+msgstr "Our reference"
129+
130+
131+#. module: sale_report_proforma
132+#: report:addons/sale_report_proforma/report/sale_proforma.mako:216
133+msgid "Invoice Date"
134+msgstr "Invoice Date"
135+
136+
137+#. module: sale_report_proforma
138+#: report:addons/sale_report_proforma/report/sale_proforma.mako:217
139+msgid "Due Date"
140+msgstr "Due Date"
141+
142+
143+#. module: sale_report_proforma
144+#: report:addons/sale_report_proforma/report/sale_proforma.mako:242
145+msgid "UoM"
146+msgstr "UoM"
147+
148+#. module: sale_report_proforma
149+#: report:addons/sale_report_proforma/report/sale_proforma.mako:244
150+msgid "Taxes"
151+msgstr "Taxes"
152+
153+
154+#. module: sale_report_proforma
155+#: report:addons/sale_report_proforma/report/sale_proforma.mako:187
156+msgid "Shipping address:"
157+msgstr "Shipping address:"
158+
159+
160+#. module: sale_report_proforma
161+#: report:addons/sale_report_proforma/report/sale_proforma.mako:288
162+msgid "Total:"
163+msgstr "Total:"
164+
165+
166+#. module: sale_report_proforma
167+#: report:addons/sale_report_proforma/report/sale_proforma.mako:219
168+msgid "Payment Term"
169+msgstr "Payment Term"
170+
171+#. module: sale_report_proforma
172+#: report:addons/sale_report_proforma/report/sale_proforma.mako:241
173+msgid "Qty"
174+msgstr "Qty"
175+
176+
177+
178+#. module: sale_report_proforma
179+#: report:addons/sale_report_proforma/report/sale_proforma.mako:205
180+msgid "Identification number : "
181+msgstr "Identification number : "
182+
183+
184+#. module: sale_report_proforma
185+#: report:addons/sale_report_proforma/report/sale_proforma.mako:246
186+msgid "Net Sub Total"
187+msgstr "Net Sub Total"
188+
189+
190+#. module: sale_report_proforma
191+#: report:addons/sale_report_proforma/report/sale_proforma.mako:272
192+msgid "Net :"
193+msgstr "Net :"
194+
195
196=== added file 'sale_order_proforma_webkit/i18n/fr.po'
197--- sale_order_proforma_webkit/i18n/fr.po 1970-01-01 00:00:00 +0000
198+++ sale_order_proforma_webkit/i18n/fr.po 2014-06-26 09:28:04 +0000
199@@ -0,0 +1,116 @@
200+#. module: sale_order_proforma_webkit
201+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:301
202+msgid "Thank you for your prompt payment"
203+msgstr "Avec nos remerciements"
204+
205+
206+#. module: sale_order_proforma_webkit
207+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:218
208+msgid "Responsible"
209+msgstr "Responsable"
210+
211+#. module: sale_order_proforma_webkit
212+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:211
213+msgid "Subject : "
214+msgstr "Description : "
215+
216+
217+#. module: sale_order_proforma_webkit
218+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:243
219+msgid "Unit Price"
220+msgstr "Prix unitaire"
221+
222+
223+#. module: sale_order_proforma_webkit
224+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:245
225+#, fuzzy
226+msgid "Disc.(%)"
227+msgstr "Rem.(%)"
228+
229+#. module: sale_order_proforma_webkit
230+#: report:addons/sale_order_proforma_webkit/report/template/account_invoice.mako:233
231+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:208
232+msgid "PRO-FORMA"
233+msgstr "PRO-FORMA"
234+
235+#. module: sale_order_proforma_webkit
236+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:280
237+msgid "Taxes:"
238+msgstr "Taxes :"
239+
240+
241+#. module: sale_order_proforma_webkit
242+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:240
243+msgid "Description"
244+msgstr "Description"
245+
246+#. module: sale_order_proforma_webkit
247+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:220
248+msgid "Our reference"
249+msgstr "Notre référence"
250+
251+
252+#. module: sale_order_proforma_webkit
253+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:216
254+msgid "Invoice Date"
255+msgstr "Date de facturation"
256+
257+
258+#. module: sale_order_proforma_webkit
259+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:217
260+msgid "Due Date"
261+msgstr "Echéance"
262+
263+
264+#. module: sale_order_proforma_webkit
265+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:242
266+msgid "UoM"
267+msgstr "UdM"
268+
269+#. module: sale_order_proforma_webkit
270+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:244
271+msgid "Taxes"
272+msgstr "Taxes"
273+
274+
275+#. module: sale_order_proforma_webkit
276+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:187
277+msgid "Shipping address:"
278+msgstr "Adresse de livraison :"
279+
280+
281+#. module: sale_order_proforma_webkit
282+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:288
283+msgid "Total:"
284+msgstr "Total :"
285+
286+
287+#. module: sale_order_proforma_webkit
288+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:219
289+msgid "Payment Term"
290+msgstr "Condition de règlement"
291+
292+#. module: sale_order_proforma_webkit
293+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:241
294+msgid "Qty"
295+msgstr "Quantité"
296+
297+
298+
299+#. module: sale_order_proforma_webkit
300+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:205
301+msgid "Identification number : "
302+msgstr "Numéro d'identification : "
303+
304+
305+#. module: sale_order_proforma_webkit
306+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:246
307+msgid "Net Sub Total"
308+msgstr "Sous total"
309+
310+
311+#. module: sale_order_proforma_webkit
312+#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:272
313+msgid "Net :"
314+msgstr "HT :"
315+
316
317=== added file 'sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot'
318--- sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot 1970-01-01 00:00:00 +0000
319+++ sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot 2014-06-26 09:28:04 +0000
320@@ -0,0 +1,114 @@
321+#. module: sale_report_proforma_webkit
322+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:301
323+msgid "Thank you for your prompt payment"
324+msgstr ""
325+
326+
327+#. module: sale_report_proforma_webkit
328+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:218
329+msgid "Responsible"
330+msgstr ""
331+
332+#. module: sale_report_proforma_webkit
333+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:211
334+msgid "Subject : "
335+msgstr ""
336+
337+
338+#. module: sale_report_proforma_webkit
339+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:243
340+msgid "Unit Price"
341+msgstr ""
342+
343+
344+#. module: sale_report_proforma_webkit
345+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:245
346+msgid "Disc.(%)"
347+msgstr ""
348+
349+#. module: sale_report_proforma_webkit
350+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:208
351+msgid "PRO-FORMA"
352+msgstr ""
353+
354+#. module: sale_report_proforma_webkit
355+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:280
356+msgid "Taxes:"
357+msgstr ""
358+
359+
360+#. module: sale_report_proforma_webkit
361+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:240
362+msgid "Description"
363+msgstr ""
364+
365+#. module: sale_report_proforma_webkit
366+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:220
367+msgid "Our reference"
368+msgstr ""
369+
370+
371+#. module: sale_report_proforma_webkit
372+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:216
373+msgid "Invoice Date"
374+msgstr ""
375+
376+
377+#. module: sale_report_proforma_webkit
378+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:217
379+msgid "Due Date"
380+msgstr ""
381+
382+
383+#. module: sale_report_proforma_webkit
384+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:242
385+msgid "UoM"
386+msgstr ""
387+
388+#. module: sale_report_proforma_webkit
389+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:244
390+msgid "Taxes"
391+msgstr ""
392+
393+
394+#. module: sale_report_proforma_webkit
395+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:187
396+msgid "Shipping address:"
397+msgstr ""
398+
399+
400+#. module: sale_report_proforma_webkit
401+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:288
402+msgid "Total:"
403+msgstr ""
404+
405+
406+#. module: sale_report_proforma_webkit
407+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:219
408+msgid "Payment Term"
409+msgstr ""
410+
411+#. module: sale_report_proforma_webkit
412+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:241
413+msgid "Qty"
414+msgstr ""
415+
416+
417+
418+#. module: sale_report_proforma_webkit
419+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:205
420+msgid "Identification number : "
421+msgstr ""
422+
423+
424+#. module: sale_report_proforma_webkit
425+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:246
426+msgid "Net Sub Total"
427+msgstr ""
428+
429+
430+#. module: sale_report_proforma_webkit
431+#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:272
432+msgid "Net :"
433+msgstr ""
434+
435
436=== added directory 'sale_order_proforma_webkit/report'
437=== added file 'sale_order_proforma_webkit/report.xml'
438--- sale_order_proforma_webkit/report.xml 1970-01-01 00:00:00 +0000
439+++ sale_order_proforma_webkit/report.xml 2014-06-26 09:28:04 +0000
440@@ -0,0 +1,23 @@
441+<?xml version="1.0" encoding="UTF-8"?>
442+<openerp>
443+ <data>
444+
445+ <report id="sale_sale_proforma"
446+ model="sale.order"
447+ name="sale.proforma"
448+ auto="False"
449+ file="sale_order_proforma_webkit/report/sale_proforma.mako"
450+ string="Pro Forma"
451+ webkit_header="base_headers_webkit.base_reports_portrait_header"
452+ report_type="webkit"/>
453+
454+ <record id="property_sale_proforma_webkit" model="ir.property">
455+ <field name="name">webkit_header</field>
456+ <field eval="0" name="company_id"/>
457+ <field name="fields_id" ref="report_webkit.field_ir_act_report_xml_webkit_header"/>
458+ <field eval="'ir.header_webkit,'+str(ref('base_headers_webkit.base_reports_portrait_header'))" model="ir.header_webkit" name="value"/>
459+ <field eval="'ir.actions.report.xml,'+str(ref('sale_order_proforma_webkit.sale_sale_proforma'))" model="ir.actions.report.xml" name="res_id"/>
460+ </record>
461+
462+ </data>
463+</openerp>
464
465=== added file 'sale_order_proforma_webkit/report/sale_proforma.mako'
466--- sale_order_proforma_webkit/report/sale_proforma.mako 1970-01-01 00:00:00 +0000
467+++ sale_order_proforma_webkit/report/sale_proforma.mako 2014-06-26 09:28:04 +0000
468@@ -0,0 +1,406 @@
469+## -*- coding: utf-8 -*-
470+<html>
471+<head>
472+ <style type="text/css">
473+ ${css}
474+
475+.list_main_table {
476+ border:thin solid #E3E4EA;
477+ text-align:center;
478+ border-collapse: collapse;
479+}
480+table.list_main_table {
481+ margin-top: 20px;
482+}
483+.list_main_headers {
484+ padding: 0;
485+}
486+.list_main_headers th {
487+ border: thin solid #000000;
488+ padding-right:3px;
489+ padding-left:3px;
490+ background-color: #EEEEEE;
491+ text-align:center;
492+ font-size:12;
493+ font-weight:bold;
494+}
495+.list_main_table td {
496+ padding-right:3px;
497+ padding-left:3px;
498+ padding-top:3px;
499+ padding-bottom:3px;
500+}
501+.list_main_lines,
502+.list_main_footers {
503+ padding: 0;
504+}
505+.list_main_footers {
506+ padding-top: 15px;
507+}
508+.list_main_lines td,
509+.list_main_footers td,
510+.list_main_footers th {
511+ border-style: none;
512+ text-align:left;
513+ font-size:12;
514+ padding:0;
515+}
516+.list_main_footers th {
517+ text-align:right;
518+}
519+
520+td .total_empty_cell {
521+ width: 77%;
522+}
523+td .total_sum_cell {
524+ width: 13%;
525+}
526+
527+.nobreak {
528+ page-break-inside: avoid;
529+}
530+caption.formatted_note {
531+ text-align:left;
532+ border-right:thin solid #EEEEEE;
533+ border-left:thin solid #EEEEEE;
534+ border-top:thin solid #EEEEEE;
535+ padding-left:10px;
536+ font-size:11;
537+ caption-side: bottom;
538+}
539+caption.formatted_note p {
540+ margin: 0;
541+}
542+
543+.main_col1 {
544+ width: 40%;
545+}
546+td.main_col1 {
547+ text-align:left;
548+}
549+.main_col2,
550+.main_col3,
551+.main_col4,
552+.main_col6 {
553+ width: 10%;
554+}
555+.main_col5 {
556+ width: 7%;
557+}
558+td.main_col5 {
559+ text-align: center;
560+ font-style:italic;
561+ font-size: 10;
562+}
563+.main_col7 {
564+ width: 13%;
565+}
566+
567+.list_bank_table {
568+ text-align:center;
569+ border-collapse: collapse;
570+ page-break-inside: avoid;
571+ display:table;
572+}
573+
574+.act_as_row {
575+ display:table-row;
576+}
577+.list_bank_table th {
578+ background-color: #EEEEEE;
579+ text-align:left;
580+ font-size:12;
581+ font-weight:bold;
582+ padding-right:3px;
583+ padding-left:3px;
584+}
585+.list_bank_table td {
586+ text-align:left;
587+ font-size:12;
588+ padding-right:3px;
589+ padding-left:3px;
590+ padding-top:3px;
591+ padding-bottom:3px;
592+}
593+
594+
595+.list_tax_table {
596+}
597+.list_tax_table td {
598+ text-align:left;
599+ font-size:12;
600+}
601+.list_tax_table th {
602+}
603+.list_tax_table thead {
604+ display:table-header-group;
605+}
606+
607+
608+.list_total_table {
609+ border:thin solid #E3E4EA;
610+ text-align:center;
611+ border-collapse: collapse;
612+}
613+.list_total_table td {
614+ border-top : thin solid #EEEEEE;
615+ text-align:left;
616+ font-size:12;
617+ padding-right:3px;
618+ padding-left:3px;
619+ padding-top:3px;
620+ padding-bottom:3px;
621+}
622+.list_total_table th {
623+ background-color: #EEEEEE;
624+ border: thin solid #000000;
625+ text-align:center;
626+ font-size:12;
627+ font-weight:bold;
628+ padding-right:3px
629+ padding-left:3px
630+}
631+.list_total_table thead {
632+ display:table-header-group;
633+}
634+
635+
636+.no_bloc {
637+ border-top: thin solid #ffffff ;
638+}
639+
640+.right_table {
641+ right: 4cm;
642+ width:"100%";
643+}
644+
645+.std_text {
646+ font-size:12;
647+}
648+
649+tfoot.totals tr:first-child td{
650+ padding-top: 15px;
651+}
652+
653+th.date {
654+ width: 90px;
655+}
656+
657+td.amount, th.amount {
658+ text-align: right;
659+ white-space: nowrap;
660+}
661+.header_table {
662+ text-align: center;
663+ border: 1px solid lightGrey;
664+ border-collapse: collapse;
665+}
666+.header_table th {
667+ font-size: 12px;
668+ border: 1px solid lightGrey;
669+}
670+.header_table td {
671+ font-size: 12px;
672+ border: 1px solid lightGrey;
673+}
674+
675+td.date {
676+ white-space: nowrap;
677+ width: 90px;
678+}
679+
680+td.vat {
681+ white-space: nowrap;
682+}
683+.address .recipient {
684+ font-size: 12px;
685+ position: absolute;
686+ left: 101mm;
687+ width: 83mm;
688+}
689+.address .shipping {
690+ margin-left: 0px;
691+ margin-right: 500px;
692+}
693+
694+ </style>
695+</head>
696+<body>
697+ <%page expression_filter="entity"/>
698+ <%
699+ def carriage_returns(text):
700+ return text.replace('\n', '<br />')
701+ %>
702+
703+ <%def name="address(partner, commercial_partner=None)">
704+ <%doc>
705+ XXX add a helper for address in report_webkit module as this won't be suported in v8.0
706+ </%doc>
707+ <% company_partner = False %>
708+ %if commercial_partner:
709+ %if commercial_partner.id != partner.id:
710+ <% company_partner = commercial_partner %>
711+ %endif
712+ %elif partner.parent_id:
713+ <% company_partner = partner.parent_id %>
714+ %endif
715+
716+ %if company_partner:
717+ <tr><td class="name">${company_partner.name or ''}</td></tr>
718+ <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
719+ <% address_lines = partner.contact_address.split("\n")[1:] %>
720+ %else:
721+ <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
722+ <% address_lines = partner.contact_address.split("\n") %>
723+ %endif
724+ %for part in address_lines:
725+ % if part:
726+ <tr><td>${part}</td></tr>
727+ % endif
728+ %endfor
729+ </%def>
730+
731+ %for inv in objects:
732+ <% setLang(inv.partner_id.lang) %>
733+ <div class="address">
734+ <table class="recipient">
735+ ${address(partner=inv.partner_id)}
736+ </table>
737+ %if inv.partner_shipping_id:
738+ <table class="shipping">
739+ <tr><td class="address_title">${_("Shipping address:")}</td></tr>
740+ ${address(partner=inv.partner_shipping_id)}
741+ </table>
742+ %endif
743+ </div>
744+ <p class="std_text">
745+ ${_("Identification number : ")} ${inv.partner_id.vat or ''}
746+ </p>
747+ <h1 style="clear: both; padding-top: 20px;">
748+ ${_("PRO-FORMA")} ${inv.name or ''}
749+ </h1>
750+ <h3 style="clear: both; padding-top: 20px;">
751+ ${_("Subject : ")} ${inv.client_order_ref or ''}
752+ </h3>
753+
754+ <table class="basic_table" width="100%">
755+ <tr>
756+ <th class="date">${_("Invoice Date")}</td>
757+ <th class="date">${_("Due Date")}</td>
758+ <th style="text-align:center;width:120px;">${_("Responsible")}</td>
759+ <th style="text-align:center">${_("Payment Term")}</td>
760+ <th style="text-align:center">${_("Our reference")}</td>
761+ </tr>
762+ <tr>
763+ <td class="date">${formatLang(inv.date_order, date=True)}</td>
764+ <td class="date"></td>
765+ <td style="text-align:center;width:120px;">${inv.user_id and inv.user_id.name or ''}</td>
766+ <td style="text-align:center">${inv.payment_term and inv.payment_term.note or ''}</td>
767+ <td style="text-align:center">${inv.name or ''}</td>
768+ </tr>
769+ </table>
770+
771+ <div>
772+ </div>
773+
774+ <table class="list_main_table" width="100%" style="margin-top: 20px;">
775+ <thead>
776+ <tr>
777+ <th class="list_main_headers" style="width: 100%">
778+ <table style="width:100%">
779+ <tr>
780+ <th class="main_col1">${_("Description")}</th>
781+ <th class="amount main_col2">${_("Qty")}</th>
782+ <th class="amount main_col3">${_("UoM")}</th>
783+ <th class="amount main_col4">${_("Unit Price")}</th>
784+ <th class="main_col5">${_("Taxes")}</th>
785+ <th class="amount main_col6">${_("Disc.(%)")}</th>
786+ <th class="amount main_col7">${_("Net Sub Total")}</th>
787+ </tr>
788+ </table>
789+ </th>
790+ </tr>
791+ </thead>
792+ <tbody>
793+ %for line in inv.order_line:
794+ <tr>
795+ <td class="list_main_lines" style="width: 100%">
796+ <div class="nobreak">
797+ <table style="width:100%">
798+ <tr>
799+ <td class="main_col1">${line.name.replace('\n','<br/>') or '' | n}</td>
800+ <td class="amount main_col2">${formatLang(line.product_uom_qty or 0.0,digits=get_digits(dp='Account'))}</td>
801+ <td class="amount main_col3">${line.product_uos and line.product_uos.name or ''}</td>
802+ <td class="amount main_col4">${formatLang(line.price_unit)}</td>
803+ <td class="main_col5">${ ', '.join([tax.description or tax.name for tax in line.tax_id])}</td>
804+ <td class="amount main_col6">${line.discount and formatLang(line.discount, digits=get_digits(dp='Account')) or ''} ${line.discount and '%' or ''}</td>
805+ <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}</td>
806+ </tr>
807+ </table>
808+ </div>
809+ </td>
810+ </tr>
811+ %endfor
812+ </tbody>
813+ <tfoot class="totals">
814+ <tr>
815+ <td class="list_main_footers" style="width: 100%">
816+ <div class="nobreak">
817+ <table style="width:100%">
818+ <tr>
819+ <td class="total_empty_cell"/>
820+ <th>
821+ ${_("Net :")}
822+ </th>
823+ <td class="amount total_sum_cell">
824+ ${formatLang(inv.amount_untaxed, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}
825+ </td>
826+ </tr>
827+ <tr>
828+ <td class="total_empty_cell"/>
829+ <th>
830+ ${_("Taxes:")}
831+ </th>
832+ <td class="amount total_sum_cell">
833+ ${formatLang(inv.amount_tax, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}
834+ </td>
835+ </tr>
836+ <tr>
837+ <td class="total_empty_cell"/>
838+ <th>
839+ ${_("Total:")}
840+ </th>
841+ <td class="amount total_sum_cell">
842+ <b>${formatLang(inv.amount_total, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}</b>
843+ </td>
844+ </tr>
845+ </table>
846+ </div>
847+ </td>
848+ </tr>
849+ </tfoot>
850+ </table>
851+ <br/>
852+
853+ <br/>
854+ <br/>
855+ <h4>
856+ ${_("Thank you for your prompt payment")}
857+ </h4>
858+ <br/>
859+ <br/>
860+ %if inv.note :
861+ <p class="std_text">${inv.note | carriage_returns}</p>
862+ %endif
863+ %if inv.fiscal_position :
864+ <br/>
865+ <p class="std_text">
866+ ${inv.fiscal_position.note | n}
867+ </p>
868+ %endif
869+ %if inv != objects[-1]:
870+ <p style="page-break-after:always"/>
871+ %endif
872+ %endfor
873+</body>
874+</html>

Subscribers

People subscribed via source and target branches