Report WebkitPartner/community days presentation Camptocamp / 13. avril 2011 / www.camptocamp.com / email@example.com
History of Report Webkit First we have report workshop in community days 2010 Then we have the opportunity...
History of Report Webkit Ok, so let me talk about a last detail. The printing of invoices.
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.
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...
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.
History of Report Webkit Oh and more than 100’000 monthly invoices have to be printed in one night.
History of Report Webkit Is it OKAY for you. Can you do it ?
History of Report Webkit Of course, no problem! Agrrr
History of Report Webkit Thus was born Report Webkit
Data structure HeaderHTML Company ir.header_webkit res.company//Implicit relation ﬁled //Absolute Path to wkhtmltopdd lib+company_id 0..1 +lib_path//HTML deﬁnition of header *+html//HTML deﬁnition 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 ﬁeld !! property ﬁelds 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 ﬁle +report_ﬁle //Activate header or not +header
How to Demo1. Set absoute lib path to wkhtml2pdf
How to Demo Osv model Report type (_name) (webkit)3. Create a new report HTML header Mako syntax report body
How to Demo3. Create a new report:You can deactivate header3. Create a new report:You can set a file instead of DB data
How to Demo4. You can add a print buttonORYou 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"/>
More complex samples report_webkit_sample l10n_ch bvr report
TODOFix utf8 OpenERP have a look at : https://code.launchpad.net/~c2c/openobject-addons/6.0_report_webkit_utf8_support/+merge/56716 !! wkhtml 1.0 onlyAdd helpers to acces headerFix menu and acces rightsProvide a WYSIWYG edit tool based on Komposer or equivalent. (Any suggestions are welcome)
ContactCamptocamp SAPSE A – Parc Scientifique EPFL1015 Lausanne, SuisseCamptocamp France SASSavoie Technolac48 avenue du Lac du Bourget73372 Le Bourget du Lac, Francewww.camptocamp.comNicolas Bessi, Technical directorTél : +41 21 619 10 04 (CH), +33 479 44 44 95 (FR)E-mail : firstname.lastname@example.org 20