2. History of Report Webkit
First we have report workshop in community days 2010
Then we have the opportunity...
3. History of Report Webkit
Ok, so let me talk about a last
detail. The printing of invoices.
4. History of Report Webkit
First,
We are going to have resellers.
They should be able to have unique
style and header on invoices.
They should be able to customize
design easily.
5. History of Report Webkit
Second,
We have to print payment slip.
With or without background
or formatted for easy copy paste.
And some time we do not want
payment slip.
Simple isn’t it...
6. History of Report Webkit
We may also want to insert
commercials strips from our server.
I heard that OpenERP has a DMS.
It would be nice to have invoices
in it.
7. History of Report Webkit
Oh and more than 100’000 monthly
invoices have to be printed in one night.
11. Overview
Multi header report
HTML/CSS based
Javascript support (if you dare)
Mako template based
Integrated
wkhtml2pdf >= 1.0 (please use stable release)
Render PDF or HTML (for HTML fix pending)
12. Data structure
HeaderHTML Company
ir.header_webkit res.company
//Implicit relation filed //Absolute Path to wkhtmltopdd lib
+company_id 0..1 +lib_path
//HTML definition of header *
+html
//HTML definition of footer
+footer_html
//Report CSS (Does not apply to header)
+css
+name
+margin_* (top, bottom, left, right)
+orientation [landscape, portrait]
+format [A0..Tabloïd]
0..1
*
ReportXML
ir.actions.report.xml
//Implicit relation field !! property fields allows global header
+webkit_header
//HTML raw input
+webkit_debug
//Embedded HTML if report created in client
+report_webkit_data
//Report type set to webkit for WebKit
+report_type
//Path to mako file
+report_file
//Activate header or not
+header
15. How to Demo
Osv model Report type
(_name) (webkit)
3. Create a new report
HTML header
Mako syntax
report body
16. How to Demo
3. Create a new report:
You can deactivate header
3. Create a new report:
You can set a file instead of DB data
17. How to Demo
4. You can add a print button
OR
You can do it with XML (no need to add button)
<report
auto="False"
id="any_text"
model="any_open_erp_ovs_name"
name="any_text"
file="Path to file"
string="Text of the button"
report_type="webkit"/>
19. TODO
Fix utf8
OpenERP have a look at : https://code.launchpad.net/~c2c/openobject-
addons/6.0_report_webkit_utf8_support/+merge/56716
!! wkhtml 1.0 only
Add helpers to acces header
Fix menu and acces rights
Provide a WYSIWYG edit tool based on Komposer or equivalent.
(Any suggestions are welcome)
20. Contact
Camptocamp SA
PSE A – Parc Scientifique EPFL
1015 Lausanne, Suisse
Camptocamp France SAS
Savoie Technolac
48 avenue du Lac du Bourget
73372 Le Bourget du Lac, France
www.camptocamp.com
Nicolas Bessi, Technical director
Tél : +41 21 619 10 04 (CH), +33 479 44 44 95 (FR)
E-mail : info@camptocamp.com
20