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
=== added directory 'sale_order_proforma_webkit'
=== added file 'sale_order_proforma_webkit/__init__.py'
--- sale_order_proforma_webkit/__init__.py 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/__init__.py 2014-06-26 09:28:04 +0000
@@ -0,0 +1,21 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
5# @author Romain Deheele, Vincent Renaville
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##############################################################################
21
022
=== added file 'sale_order_proforma_webkit/__openerp__.py'
--- sale_order_proforma_webkit/__openerp__.py 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/__openerp__.py 2014-06-26 09:28:04 +0000
@@ -0,0 +1,43 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# Copyright (c) 2014 Camptocamp SA (http://www.camptocamp.com)
5# @author Romain Deheele, Vincent Renaville
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##############################################################################
21
22{'name': 'Sales Order ProForma Report using Webkit Library',
23 'version': '1.1.1',
24 'category': 'Reports/Webkit',
25 'description': """
26Sale order webkit
27#################
28
29* Add a sale proforma report in webkit .
30
31Depends on base_headers_webkit community addon available here:
32`https://launchpad.net/webkit-utils <https://launchpad.net/webkit-utils>`_
33 """,
34 'author': 'Camptocamp',
35 'website': 'http://www.camptocamp.com',
36 'depends': ['base', 'report_webkit', 'base_headers_webkit', 'sale'],
37 'data': ['report.xml',
38 ],
39 'demo_xml': [],
40 'test': [],
41 'installable': True,
42 'active': False,
43 }
044
=== added directory 'sale_order_proforma_webkit/i18n'
=== added file 'sale_order_proforma_webkit/i18n/en.po'
--- sale_order_proforma_webkit/i18n/en.po 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/i18n/en.po 2014-06-26 09:28:04 +0000
@@ -0,0 +1,114 @@
1#. module: sale_report_proforma
2#: report:addons/sale_report_proforma/report/sale_proforma.mako:301
3msgid "Thank you for your prompt payment"
4msgstr "Thank you for your prompt payment"
5
6
7#. module: sale_report_proforma
8#: report:addons/sale_report_proforma/report/sale_proforma.mako:218
9msgid "Responsible"
10msgstr "Responsible"
11
12#. module: sale_report_proforma
13#: report:addons/sale_report_proforma/report/sale_proforma.mako:211
14msgid "Subject : "
15msgstr "Subject : "
16
17
18#. module: sale_report_proforma
19#: report:addons/sale_report_proforma/report/sale_proforma.mako:243
20msgid "Unit Price"
21msgstr "Unit Price"
22
23
24#. module: sale_report_proforma
25#: report:addons/sale_report_proforma/report/sale_proforma.mako:245
26msgid "Disc.(%)"
27msgstr "Disc.(%)"
28
29#. module: sale_report_proforma
30#: report:addons/sale_report_proforma/report/sale_proforma.mako:208
31msgid "PRO-FORMA"
32msgstr "PRO-FORMA"
33
34#. module: sale_report_proforma
35#: report:addons/sale_report_proforma/report/sale_proforma.mako:280
36msgid "Taxes:"
37msgstr "Taxes:"
38
39
40#. module: sale_report_proforma
41#: report:addons/sale_report_proforma/report/sale_proforma.mako:240
42msgid "Description"
43msgstr "Description"
44
45#. module: sale_report_proforma
46#: report:addons/sale_report_proforma/report/sale_proforma.mako:220
47msgid "Our reference"
48msgstr "Our reference"
49
50
51#. module: sale_report_proforma
52#: report:addons/sale_report_proforma/report/sale_proforma.mako:216
53msgid "Invoice Date"
54msgstr "Invoice Date"
55
56
57#. module: sale_report_proforma
58#: report:addons/sale_report_proforma/report/sale_proforma.mako:217
59msgid "Due Date"
60msgstr "Due Date"
61
62
63#. module: sale_report_proforma
64#: report:addons/sale_report_proforma/report/sale_proforma.mako:242
65msgid "UoM"
66msgstr "UoM"
67
68#. module: sale_report_proforma
69#: report:addons/sale_report_proforma/report/sale_proforma.mako:244
70msgid "Taxes"
71msgstr "Taxes"
72
73
74#. module: sale_report_proforma
75#: report:addons/sale_report_proforma/report/sale_proforma.mako:187
76msgid "Shipping address:"
77msgstr "Shipping address:"
78
79
80#. module: sale_report_proforma
81#: report:addons/sale_report_proforma/report/sale_proforma.mako:288
82msgid "Total:"
83msgstr "Total:"
84
85
86#. module: sale_report_proforma
87#: report:addons/sale_report_proforma/report/sale_proforma.mako:219
88msgid "Payment Term"
89msgstr "Payment Term"
90
91#. module: sale_report_proforma
92#: report:addons/sale_report_proforma/report/sale_proforma.mako:241
93msgid "Qty"
94msgstr "Qty"
95
96
97
98#. module: sale_report_proforma
99#: report:addons/sale_report_proforma/report/sale_proforma.mako:205
100msgid "Identification number : "
101msgstr "Identification number : "
102
103
104#. module: sale_report_proforma
105#: report:addons/sale_report_proforma/report/sale_proforma.mako:246
106msgid "Net Sub Total"
107msgstr "Net Sub Total"
108
109
110#. module: sale_report_proforma
111#: report:addons/sale_report_proforma/report/sale_proforma.mako:272
112msgid "Net :"
113msgstr "Net :"
114
0115
=== added file 'sale_order_proforma_webkit/i18n/fr.po'
--- sale_order_proforma_webkit/i18n/fr.po 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/i18n/fr.po 2014-06-26 09:28:04 +0000
@@ -0,0 +1,116 @@
1#. module: sale_order_proforma_webkit
2#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:301
3msgid "Thank you for your prompt payment"
4msgstr "Avec nos remerciements"
5
6
7#. module: sale_order_proforma_webkit
8#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:218
9msgid "Responsible"
10msgstr "Responsable"
11
12#. module: sale_order_proforma_webkit
13#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:211
14msgid "Subject : "
15msgstr "Description : "
16
17
18#. module: sale_order_proforma_webkit
19#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:243
20msgid "Unit Price"
21msgstr "Prix unitaire"
22
23
24#. module: sale_order_proforma_webkit
25#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:245
26#, fuzzy
27msgid "Disc.(%)"
28msgstr "Rem.(%)"
29
30#. module: sale_order_proforma_webkit
31#: report:addons/sale_order_proforma_webkit/report/template/account_invoice.mako:233
32#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:208
33msgid "PRO-FORMA"
34msgstr "PRO-FORMA"
35
36#. module: sale_order_proforma_webkit
37#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:280
38msgid "Taxes:"
39msgstr "Taxes :"
40
41
42#. module: sale_order_proforma_webkit
43#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:240
44msgid "Description"
45msgstr "Description"
46
47#. module: sale_order_proforma_webkit
48#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:220
49msgid "Our reference"
50msgstr "Notre référence"
51
52
53#. module: sale_order_proforma_webkit
54#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:216
55msgid "Invoice Date"
56msgstr "Date de facturation"
57
58
59#. module: sale_order_proforma_webkit
60#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:217
61msgid "Due Date"
62msgstr "Echéance"
63
64
65#. module: sale_order_proforma_webkit
66#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:242
67msgid "UoM"
68msgstr "UdM"
69
70#. module: sale_order_proforma_webkit
71#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:244
72msgid "Taxes"
73msgstr "Taxes"
74
75
76#. module: sale_order_proforma_webkit
77#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:187
78msgid "Shipping address:"
79msgstr "Adresse de livraison :"
80
81
82#. module: sale_order_proforma_webkit
83#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:288
84msgid "Total:"
85msgstr "Total :"
86
87
88#. module: sale_order_proforma_webkit
89#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:219
90msgid "Payment Term"
91msgstr "Condition de règlement"
92
93#. module: sale_order_proforma_webkit
94#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:241
95msgid "Qty"
96msgstr "Quantité"
97
98
99
100#. module: sale_order_proforma_webkit
101#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:205
102msgid "Identification number : "
103msgstr "Numéro d'identification : "
104
105
106#. module: sale_order_proforma_webkit
107#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:246
108msgid "Net Sub Total"
109msgstr "Sous total"
110
111
112#. module: sale_order_proforma_webkit
113#: report:addons/sale_order_proforma_webkit/report/template/sale_proforma.mako:272
114msgid "Net :"
115msgstr "HT :"
116
0117
=== added file 'sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot'
--- sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/i18n/sale_order_proforma_webkit.pot 2014-06-26 09:28:04 +0000
@@ -0,0 +1,114 @@
1#. module: sale_report_proforma_webkit
2#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:301
3msgid "Thank you for your prompt payment"
4msgstr ""
5
6
7#. module: sale_report_proforma_webkit
8#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:218
9msgid "Responsible"
10msgstr ""
11
12#. module: sale_report_proforma_webkit
13#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:211
14msgid "Subject : "
15msgstr ""
16
17
18#. module: sale_report_proforma_webkit
19#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:243
20msgid "Unit Price"
21msgstr ""
22
23
24#. module: sale_report_proforma_webkit
25#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:245
26msgid "Disc.(%)"
27msgstr ""
28
29#. module: sale_report_proforma_webkit
30#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:208
31msgid "PRO-FORMA"
32msgstr ""
33
34#. module: sale_report_proforma_webkit
35#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:280
36msgid "Taxes:"
37msgstr ""
38
39
40#. module: sale_report_proforma_webkit
41#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:240
42msgid "Description"
43msgstr ""
44
45#. module: sale_report_proforma_webkit
46#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:220
47msgid "Our reference"
48msgstr ""
49
50
51#. module: sale_report_proforma_webkit
52#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:216
53msgid "Invoice Date"
54msgstr ""
55
56
57#. module: sale_report_proforma_webkit
58#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:217
59msgid "Due Date"
60msgstr ""
61
62
63#. module: sale_report_proforma_webkit
64#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:242
65msgid "UoM"
66msgstr ""
67
68#. module: sale_report_proforma_webkit
69#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:244
70msgid "Taxes"
71msgstr ""
72
73
74#. module: sale_report_proforma_webkit
75#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:187
76msgid "Shipping address:"
77msgstr ""
78
79
80#. module: sale_report_proforma_webkit
81#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:288
82msgid "Total:"
83msgstr ""
84
85
86#. module: sale_report_proforma_webkit
87#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:219
88msgid "Payment Term"
89msgstr ""
90
91#. module: sale_report_proforma_webkit
92#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:241
93msgid "Qty"
94msgstr ""
95
96
97
98#. module: sale_report_proforma_webkit
99#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:205
100msgid "Identification number : "
101msgstr ""
102
103
104#. module: sale_report_proforma_webkit
105#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:246
106msgid "Net Sub Total"
107msgstr ""
108
109
110#. module: sale_report_proforma_webkit
111#: report:addons/sale_report_proforma_webkit/report/sale_proforma.mako:272
112msgid "Net :"
113msgstr ""
114
0115
=== added directory 'sale_order_proforma_webkit/report'
=== added file 'sale_order_proforma_webkit/report.xml'
--- sale_order_proforma_webkit/report.xml 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/report.xml 2014-06-26 09:28:04 +0000
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<openerp>
3 <data>
4
5 <report id="sale_sale_proforma"
6 model="sale.order"
7 name="sale.proforma"
8 auto="False"
9 file="sale_order_proforma_webkit/report/sale_proforma.mako"
10 string="Pro Forma"
11 webkit_header="base_headers_webkit.base_reports_portrait_header"
12 report_type="webkit"/>
13
14 <record id="property_sale_proforma_webkit" model="ir.property">
15 <field name="name">webkit_header</field>
16 <field eval="0" name="company_id"/>
17 <field name="fields_id" ref="report_webkit.field_ir_act_report_xml_webkit_header"/>
18 <field eval="'ir.header_webkit,'+str(ref('base_headers_webkit.base_reports_portrait_header'))" model="ir.header_webkit" name="value"/>
19 <field eval="'ir.actions.report.xml,'+str(ref('sale_order_proforma_webkit.sale_sale_proforma'))" model="ir.actions.report.xml" name="res_id"/>
20 </record>
21
22 </data>
23</openerp>
024
=== added file 'sale_order_proforma_webkit/report/sale_proforma.mako'
--- sale_order_proforma_webkit/report/sale_proforma.mako 1970-01-01 00:00:00 +0000
+++ sale_order_proforma_webkit/report/sale_proforma.mako 2014-06-26 09:28:04 +0000
@@ -0,0 +1,406 @@
1## -*- coding: utf-8 -*-
2<html>
3<head>
4 <style type="text/css">
5 ${css}
6
7.list_main_table {
8 border:thin solid #E3E4EA;
9 text-align:center;
10 border-collapse: collapse;
11}
12table.list_main_table {
13 margin-top: 20px;
14}
15.list_main_headers {
16 padding: 0;
17}
18.list_main_headers th {
19 border: thin solid #000000;
20 padding-right:3px;
21 padding-left:3px;
22 background-color: #EEEEEE;
23 text-align:center;
24 font-size:12;
25 font-weight:bold;
26}
27.list_main_table td {
28 padding-right:3px;
29 padding-left:3px;
30 padding-top:3px;
31 padding-bottom:3px;
32}
33.list_main_lines,
34.list_main_footers {
35 padding: 0;
36}
37.list_main_footers {
38 padding-top: 15px;
39}
40.list_main_lines td,
41.list_main_footers td,
42.list_main_footers th {
43 border-style: none;
44 text-align:left;
45 font-size:12;
46 padding:0;
47}
48.list_main_footers th {
49 text-align:right;
50}
51
52td .total_empty_cell {
53 width: 77%;
54}
55td .total_sum_cell {
56 width: 13%;
57}
58
59.nobreak {
60 page-break-inside: avoid;
61}
62caption.formatted_note {
63 text-align:left;
64 border-right:thin solid #EEEEEE;
65 border-left:thin solid #EEEEEE;
66 border-top:thin solid #EEEEEE;
67 padding-left:10px;
68 font-size:11;
69 caption-side: bottom;
70}
71caption.formatted_note p {
72 margin: 0;
73}
74
75.main_col1 {
76 width: 40%;
77}
78td.main_col1 {
79 text-align:left;
80}
81.main_col2,
82.main_col3,
83.main_col4,
84.main_col6 {
85 width: 10%;
86}
87.main_col5 {
88 width: 7%;
89}
90td.main_col5 {
91 text-align: center;
92 font-style:italic;
93 font-size: 10;
94}
95.main_col7 {
96 width: 13%;
97}
98
99.list_bank_table {
100 text-align:center;
101 border-collapse: collapse;
102 page-break-inside: avoid;
103 display:table;
104}
105
106.act_as_row {
107 display:table-row;
108}
109.list_bank_table th {
110 background-color: #EEEEEE;
111 text-align:left;
112 font-size:12;
113 font-weight:bold;
114 padding-right:3px;
115 padding-left:3px;
116}
117.list_bank_table td {
118 text-align:left;
119 font-size:12;
120 padding-right:3px;
121 padding-left:3px;
122 padding-top:3px;
123 padding-bottom:3px;
124}
125
126
127.list_tax_table {
128}
129.list_tax_table td {
130 text-align:left;
131 font-size:12;
132}
133.list_tax_table th {
134}
135.list_tax_table thead {
136 display:table-header-group;
137}
138
139
140.list_total_table {
141 border:thin solid #E3E4EA;
142 text-align:center;
143 border-collapse: collapse;
144}
145.list_total_table td {
146 border-top : thin solid #EEEEEE;
147 text-align:left;
148 font-size:12;
149 padding-right:3px;
150 padding-left:3px;
151 padding-top:3px;
152 padding-bottom:3px;
153}
154.list_total_table th {
155 background-color: #EEEEEE;
156 border: thin solid #000000;
157 text-align:center;
158 font-size:12;
159 font-weight:bold;
160 padding-right:3px
161 padding-left:3px
162}
163.list_total_table thead {
164 display:table-header-group;
165}
166
167
168.no_bloc {
169 border-top: thin solid #ffffff ;
170}
171
172.right_table {
173 right: 4cm;
174 width:"100%";
175}
176
177.std_text {
178 font-size:12;
179}
180
181tfoot.totals tr:first-child td{
182 padding-top: 15px;
183}
184
185th.date {
186 width: 90px;
187}
188
189td.amount, th.amount {
190 text-align: right;
191 white-space: nowrap;
192}
193.header_table {
194 text-align: center;
195 border: 1px solid lightGrey;
196 border-collapse: collapse;
197}
198.header_table th {
199 font-size: 12px;
200 border: 1px solid lightGrey;
201}
202.header_table td {
203 font-size: 12px;
204 border: 1px solid lightGrey;
205}
206
207td.date {
208 white-space: nowrap;
209 width: 90px;
210}
211
212td.vat {
213 white-space: nowrap;
214}
215.address .recipient {
216 font-size: 12px;
217 position: absolute;
218 left: 101mm;
219 width: 83mm;
220}
221.address .shipping {
222 margin-left: 0px;
223 margin-right: 500px;
224}
225
226 </style>
227</head>
228<body>
229 <%page expression_filter="entity"/>
230 <%
231 def carriage_returns(text):
232 return text.replace('\n', '<br />')
233 %>
234
235 <%def name="address(partner, commercial_partner=None)">
236 <%doc>
237 XXX add a helper for address in report_webkit module as this won't be suported in v8.0
238 </%doc>
239 <% company_partner = False %>
240 %if commercial_partner:
241 %if commercial_partner.id != partner.id:
242 <% company_partner = commercial_partner %>
243 %endif
244 %elif partner.parent_id:
245 <% company_partner = partner.parent_id %>
246 %endif
247
248 %if company_partner:
249 <tr><td class="name">${company_partner.name or ''}</td></tr>
250 <tr><td>${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
251 <% address_lines = partner.contact_address.split("\n")[1:] %>
252 %else:
253 <tr><td class="name">${partner.title and partner.title.name or ''} ${partner.name}</td></tr>
254 <% address_lines = partner.contact_address.split("\n") %>
255 %endif
256 %for part in address_lines:
257 % if part:
258 <tr><td>${part}</td></tr>
259 % endif
260 %endfor
261 </%def>
262
263 %for inv in objects:
264 <% setLang(inv.partner_id.lang) %>
265 <div class="address">
266 <table class="recipient">
267 ${address(partner=inv.partner_id)}
268 </table>
269 %if inv.partner_shipping_id:
270 <table class="shipping">
271 <tr><td class="address_title">${_("Shipping address:")}</td></tr>
272 ${address(partner=inv.partner_shipping_id)}
273 </table>
274 %endif
275 </div>
276 <p class="std_text">
277 ${_("Identification number : ")} ${inv.partner_id.vat or ''}
278 </p>
279 <h1 style="clear: both; padding-top: 20px;">
280 ${_("PRO-FORMA")} ${inv.name or ''}
281 </h1>
282 <h3 style="clear: both; padding-top: 20px;">
283 ${_("Subject : ")} ${inv.client_order_ref or ''}
284 </h3>
285
286 <table class="basic_table" width="100%">
287 <tr>
288 <th class="date">${_("Invoice Date")}</td>
289 <th class="date">${_("Due Date")}</td>
290 <th style="text-align:center;width:120px;">${_("Responsible")}</td>
291 <th style="text-align:center">${_("Payment Term")}</td>
292 <th style="text-align:center">${_("Our reference")}</td>
293 </tr>
294 <tr>
295 <td class="date">${formatLang(inv.date_order, date=True)}</td>
296 <td class="date"></td>
297 <td style="text-align:center;width:120px;">${inv.user_id and inv.user_id.name or ''}</td>
298 <td style="text-align:center">${inv.payment_term and inv.payment_term.note or ''}</td>
299 <td style="text-align:center">${inv.name or ''}</td>
300 </tr>
301 </table>
302
303 <div>
304 </div>
305
306 <table class="list_main_table" width="100%" style="margin-top: 20px;">
307 <thead>
308 <tr>
309 <th class="list_main_headers" style="width: 100%">
310 <table style="width:100%">
311 <tr>
312 <th class="main_col1">${_("Description")}</th>
313 <th class="amount main_col2">${_("Qty")}</th>
314 <th class="amount main_col3">${_("UoM")}</th>
315 <th class="amount main_col4">${_("Unit Price")}</th>
316 <th class="main_col5">${_("Taxes")}</th>
317 <th class="amount main_col6">${_("Disc.(%)")}</th>
318 <th class="amount main_col7">${_("Net Sub Total")}</th>
319 </tr>
320 </table>
321 </th>
322 </tr>
323 </thead>
324 <tbody>
325 %for line in inv.order_line:
326 <tr>
327 <td class="list_main_lines" style="width: 100%">
328 <div class="nobreak">
329 <table style="width:100%">
330 <tr>
331 <td class="main_col1">${line.name.replace('\n','<br/>') or '' | n}</td>
332 <td class="amount main_col2">${formatLang(line.product_uom_qty or 0.0,digits=get_digits(dp='Account'))}</td>
333 <td class="amount main_col3">${line.product_uos and line.product_uos.name or ''}</td>
334 <td class="amount main_col4">${formatLang(line.price_unit)}</td>
335 <td class="main_col5">${ ', '.join([tax.description or tax.name for tax in line.tax_id])}</td>
336 <td class="amount main_col6">${line.discount and formatLang(line.discount, digits=get_digits(dp='Account')) or ''} ${line.discount and '%' or ''}</td>
337 <td class="amount main_col7">${formatLang(line.price_subtotal, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}</td>
338 </tr>
339 </table>
340 </div>
341 </td>
342 </tr>
343 %endfor
344 </tbody>
345 <tfoot class="totals">
346 <tr>
347 <td class="list_main_footers" style="width: 100%">
348 <div class="nobreak">
349 <table style="width:100%">
350 <tr>
351 <td class="total_empty_cell"/>
352 <th>
353 ${_("Net :")}
354 </th>
355 <td class="amount total_sum_cell">
356 ${formatLang(inv.amount_untaxed, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}
357 </td>
358 </tr>
359 <tr>
360 <td class="total_empty_cell"/>
361 <th>
362 ${_("Taxes:")}
363 </th>
364 <td class="amount total_sum_cell">
365 ${formatLang(inv.amount_tax, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}
366 </td>
367 </tr>
368 <tr>
369 <td class="total_empty_cell"/>
370 <th>
371 ${_("Total:")}
372 </th>
373 <td class="amount total_sum_cell">
374 <b>${formatLang(inv.amount_total, digits=get_digits(dp='Account'))} ${inv.currency_id.symbol}</b>
375 </td>
376 </tr>
377 </table>
378 </div>
379 </td>
380 </tr>
381 </tfoot>
382 </table>
383 <br/>
384
385 <br/>
386 <br/>
387 <h4>
388 ${_("Thank you for your prompt payment")}
389 </h4>
390 <br/>
391 <br/>
392 %if inv.note :
393 <p class="std_text">${inv.note | carriage_returns}</p>
394 %endif
395 %if inv.fiscal_position :
396 <br/>
397 <p class="std_text">
398 ${inv.fiscal_position.note | n}
399 </p>
400 %endif
401 %if inv != objects[-1]:
402 <p style="page-break-after:always"/>
403 %endif
404 %endfor
405</body>
406</html>

Subscribers

People subscribed via source and target branches