New document generation system (bills, packing slips, etc). Currently generates HTML pages by default (the templates need to be fixed/extended) but also has capabilities to create PDF files either via trml2pdf or wkhtmltopdf.
Capabilities exists to make the generation of pdf using other technologies such as xhtml2pdf trivial, or even to generate documents in any format (e.g. DOC, DOCX, ODT).
This looks pretty good. I merged it locally and noticed a couple of things.
The HTML file names shouldn't have a dash in them. They need to be packingslip.html and shippinglabel.html to work
The basic HTML files could use just a little more HTML styling. I don't need them to be really fancy but I do think they need to be useable out of the box. I think some of the <table> tags got missed somehow.
Can you add a documentation note to configuration.txt that outlines that SATCHMO_SETTINGS to put in place for TRML or WKHTML?
The reference to iconuri in the templates should be removed because I don't think it's defined in the default store.
This is looking good and I'm really looking forward to including it in Satchmo once we get these things cleaned up.
I did polish the template quite a bit and added documentation. I also removed the requirements of trml2pdf and Reportlab in the documentation, as they are not needed with the default HTML converter (they are still listed when the doc talks about enabling trml2pdf).
While I was at it, I also did a complete check of the Italian translations, which were in a unmaintained state: they're now up to speed with the rest. As a side effect (I'm too used to git to get the hang on mercurial) I ended up including a lot of .mo files for other translations, which, however, shouldn't create problems (./manage.py compilemessages did it).
I like it. It's definitely an improvement over being stuck with the ol' rml2pdf. And it's all class-based and nice. For now though, would it be better to have ``'DOCUMENT_CONVERTER'`` default to ``'shipping.views.TRMLDocument'``? This way current users upgrading will not be surprised by the different-looking order docs. Maybe insert a DeprecationWarning somewhere?
I've modified slightly how wkhtml works because subprocess sometimes hangs if the data is quite big and pipes are being used, therefore I have switched to a tempfile-based approach.
Also the LOGO_URI might need some rework because right now, if you put in a filename (file:) it won't work with the HTMLDocument (because it can't load such resource except when on localhost). Inversely, TRML and WKHTML might have problems when it is not a file: URI.
It's probably best to have a default setting of '%(static)s/logo.png' and then the various document converters can fill that in either with settings.STATIC_ROOT or settings.STATIC_URL. This is not exactly critical (right now, changing the setting accordingly to one's setup makes everything work) but it might make things easier for newcomers.