|
|
Descriptionrudimentary start of reports doc
Patch Set 1 #
Total comments: 18
Patch Set 2 : Improved reports documentation still need a lot more information and examples. #Patch Set 3 : Another draft #Patch Set 4 : Added example #
Total comments: 10
Patch Set 5 : Updated based on comments. #
Total comments: 16
Patch Set 6 : Add ced's changes. #
Total comments: 2
Patch Set 7 : Added minor clarification #
Total comments: 1
MessagesTotal messages: 15
http://codereview.appspot.com/95068/diff/1/2 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1/2#newcode10 Line 10: Here is an example of a open office text document, *.odt, that displays the Are oocalc and other formats that relatorio supports, supported? http://codereview.appspot.com/95068/diff/1/2#newcode23 Line 23: </for> Why is this format like this? Is this relatorio's format? It seems like a alteration of genshi's format with all the py:'s stripped and <line> works like ${line}. http://codereview.appspot.com/95068/diff/1/2#newcode30 Line 30: I know there is a style for all the CompanyReports but its not clear how that relates to the header_A4.odt style. I've tried reading the source but its pretty complicated. How are CompanyReport, the style and the actual report itself related? http://codereview.appspot.com/95068/diff/1/2#newcode37 Line 37: official Tryton modules, especially company or stock. There is guidelines on the wiki about this I think but I'm not sure why we need some of those things: http://code.google.com/p/tryton/wiki/ODTGuideLines http://codereview.appspot.com/95068/diff/1/2#newcode42 Line 42: Can xml expr's be used to replace references to builtin reports? Like how fields are replaced or inserted. So they can be replaced in another module instead of having some post pull script that overwrites them with different files. http://codereview.appspot.com/95068/diff/1/2#newcode46 Line 46: Cedk I think mentioned overwriting ir.report.get_style_content, I'm not sure how that fits into the bigger picture.
Sign in to reply to this message.
Here my changes for the report documentation. http://codereview.appspot.com/95068/diff/1/2 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1/2#newcode3 Line 3: Reports in Tryton are generated from report and style templates parsed with system data and put out in an nearly arbitrary file format. Standard parsing process is done in one step: a report template in a special file format is parsed to a document in the same file format. The document generator ability of Tryton allows to parse a report template in a special file format to a document with a fileformat OpenOfficeOrg can convert. For this is an openoffice-headless server required. http://codereview.appspot.com/95068/diff/1/2#newcode6 Line 6: Better: Report Templates **************** http://codereview.appspot.com/95068/diff/1/2#newcode7 Line 7: Report files are just open office documents with special Report templates in Tryton could be in every file format which relatorio supports, like simple text, all formats of the ODF Family (Link:WP: Open Document Format) or latex. The used report markup language is genshi. TODO: Links to relatorio's examples TODO: Links to Genshi syntax http://codereview.appspot.com/95068/diff/1/2#newcode10 Line 10: Here is an example of a open office text document, *.odt, that displays the Yes http://codereview.appspot.com/95068/diff/1/2#newcode12 Line 12: # TODO Documentation, which provides help in editing reports in OpenOfficeOrg. Maybe reference to Relatorio. http://codereview.appspot.com/95068/diff/1/2#newcode23 Line 23: </for> It is genshi. http://codereview.appspot.com/95068/diff/1/2#newcode26 Line 26: the <,>s are added by such field. When we can use the open office editing manual of relatorio, we don't need this. http://codereview.appspot.com/95068/diff/1/2#newcode29 Line 29: ************* better: Style Templates *************** In the report style templates you can define corporate header and footer. Preferences in the style template overwrite preferences in report template. http://codereview.appspot.com/95068/diff/1/2#newcode30 Line 30: This is a good question. I tried a lot too in this question. It seems that the company_report is not correctly working. There is only one other report using this: company_letter. Invoice is not using it in 1.2. http://codereview.appspot.com/95068/diff/1/2#newcode34 Line 34: Next steps could be: Report Definition ################# Report Data *********** TODO: Here the XML Stuff. Report Class ************ TODO: Here Interface definitions or report.py TODO: Report examples, overwriting parse, http://codereview.appspot.com/95068/diff/1/2#newcode42 Line 42: Replacing existend Reports is deactivating the old report and activate a new. For example deactivate the invoice report: <record model="ir.action.report" id="account_invoice.report_invoice"> <field name="active" eval="False"/> </record> And activate a new invoice report: <record model="ir.action.report" id="report_invoice_new"> <field name="name">Invoice</field> <field name="report_name">account.invoice</field> <field name="model">account.invoice</field> <field name="report">my_module/invoice.odt</field> <field name="style">module_name/header_A4.odt</field> </record> http://codereview.appspot.com/95068/diff/1/2#newcode46 Line 46: Here I have no good idea, too. We have the problem, that the company style is often hardcoded referred. Like in the invoice.xml, company/headerA4.odt. For me we need some more to do on this topic.
Sign in to reply to this message.
Added as reviewer
Sign in to reply to this message.
Still working on this, reworded some stuff, had some minor questions. http://codereview.appspot.com/95068/diff/2003/1005 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/2003/1005#newcode10 Line 10: required for this, see INSTALL for more information. I thought it would be better to reference INSTALL or some other document for the actual dependencies but should that be mentioned here? For example openoffice-headless and pyuno? http://codereview.appspot.com/95068/diff/2003/1005#newcode60 Line 60: :undoc-members: Is this really necessary? There is mention of overriding get_style_context but should the methods of this module be documented in this document? http://codereview.appspot.com/95068/diff/2003/1005#newcode165 Line 165: ------------ Does information on how to print reports belong here?
Sign in to reply to this message.
http://codereview.appspot.com/95068/diff/2003/1005 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/2003/1005#newcode36 Line 36: TODO: I still need the link to genshi you mentioned. I think maybe : http://genshi.edgewall.org/wiki/Documentation/0.5.x/xml-templates.html It seems that for example the opendocument relatorio template does not support all of genshi so this will be misleading. And I can't find much documentation on relatorio's site.
Sign in to reply to this message.
Hi all, I put some answers and new questions to the document. Cheers Udo http://codereview.appspot.com/95068/diff/2003/1005 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/2003/1005#newcode10 Line 10: required for this, see INSTALL for more information. Yes, IMHO you are right. Somewhere we should find a word that the report variables are a mapping of the underlaying python classes. It is a often received question for me that people ask, which variables to use in a report. Standard seems that all the objects are mapped into a list named "objects". Tryton uses in general a list as top most node, because to handle parsing selections of more then one record to print. Also it is possible to dive into the inherited objects in a relation field of an object. Administration > UI > Actions > Report to check which model a report depends. Administration > Model > Model to check which fields are provided by the Model. If a field has a "Model relation" to another model, you can dive into. http://codereview.appspot.com/95068/diff/2003/1005#newcode15 Line 15: Report templates are files with a format supported by relatorio, that contain Maybe here talk about a subset of the genshi templating language provided by relatorio? http://relatorio.openhex.org/browser/relatorio/templates/opendocument.py#L56 http://codereview.appspot.com/95068/diff/2003/1005#newcode19 Line 19: document, *.odt, that displays the full name and address lines of each party. that displays the full name and [the] address lines [of the first address] of each party. http://codereview.appspot.com/95068/diff/2003/1005#newcode36 Line 36: maybe this links are ok: http://relatorio.openhex.org/wiki/QuickExample http://relatorio.openhex.org/wiki/IndepthIntroduction http://209.85.135.132/search?q=cache:www.openhex.com/blogs/nicoe/200808261604... Example Documents: http://relatorio.openhex.org/browser/examples http://codereview.appspot.com/95068/diff/2003/1005#newcode60 Line 60: :undoc-members: The API could be done as Doc-strings IMHO and placed anywhere in the documentation. http://codereview.appspot.com/95068/diff/2003/1005#newcode165 Line 165: ------------ Good question. I don't know. I think it is maybe better to have it on the views documentation, section actions.
Sign in to reply to this message.
Still working on doc, made some changes. http://codereview.appspot.com/95068/diff/1007/2007 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1007/2007#newcode42 Line 42: I kind of understand this but I don't know a lot about openoffice styles. They(styles) seem like they won't apply well to other formats though besides .odt. http://codereview.appspot.com/95068/diff/1007/2007#newcode87 Line 87: This section is starting to get really confusing. Mainly its hard to break apart: - how to handle reports in a non-format-specific way and(create template file in module, create xml) - how to handle reports in a very format specific way(genshi, odt, relatorio, etc) I'm going to keep thinking about an easy way to say it and I'm learning more as I try my own reports. Any suggestions ?
Sign in to reply to this message.
Hey Ian, good work! Cheers Udo http://codereview.appspot.com/95068/diff/1007/2007 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1007/2007#newcode42 Line 42: Oh yes, this could be. Maybe each document type need a style template of the same type - if styles exist. And we need to check if the style node which is replaced by tryton parse is equal for all document types. http://codereview.appspot.com/95068/diff/1007/2007#newcode87 Line 87: On 2009/07/21 08:47:22, Ian Wilson wrote: > - how to handle reports in a non-format-specific way > and(create template file in module, create xml) Don't understand correctly. Reporting system in Tryton is relatorio + genshi + X) Non format specific in genshi/relatorio context is for me a simple text document. Styles will not work on this, since the style node is missing. > - how to handle reports in a very format specific way(genshi, odt, relatorio, Here I have some knowledge with odt and ods (OOCalc).
Sign in to reply to this message.
http://codereview.appspot.com/95068/diff/1007/2007 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1007/2007#newcode8 Line 8: documents in this way allows documents to be generated for OpenOfficeOrg which It is not linked to OpenOffice, you can use any editor that know odt (Abiword, Word + plugins) http://codereview.appspot.com/95068/diff/1007/2007#newcode18 Line 18: Here is an example of the text that would be placed in an open office text open office text -> open document text http://codereview.appspot.com/95068/diff/1007/2007#newcode21 Line 21: Functions->Placeholder->Text Fields. These are specific to OpenOfficeOrg. not specific to OOo but to odt http://codereview.appspot.com/95068/diff/1007/2007#newcode111 Line 111: * Set the document in read-only mode (Tools>Options>OpenOffice.org>Security) You can add that this is to speed opening http://codereview.appspot.com/95068/diff/1007/2007#newcode114 Line 114: * Use Liberation fonts This is only for inclusion into Tryton http://codereview.appspot.com/95068/diff/1007/2007#newcode121 Line 121: Functions->Placeholder->Text Fields. These are specific to OpenOfficeOrg Not specific to Ooo http://codereview.appspot.com/95068/diff/1007/2007#newcode123 Line 123: Functions -> Placeholder -> Text. Type genshi code into the Placeholder field. I don't know if it is good to give the path because Ooo changes often the place of such tools. http://codereview.appspot.com/95068/diff/1007/2007#newcode125 Line 125: special hyperlinks, this is described in the examples on relatorio's site. As we don't want to use it, I don't think it is good to talk about it here. http://codereview.appspot.com/95068/diff/1007/2007#newcode128 Line 128: that are supported are: How will we keep this uptodate. It is better to have only link to relatorio doc. http://codereview.appspot.com/95068/diff/1007/2007#newcode176 Line 176: format supported by relatorio. Second, describe your report in XML making Instead of XML, you can create a record in "Administration>User Interface>Actions>Reports"
Sign in to reply to this message.
http://codereview.appspot.com/95068/diff/1007/2007 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1007/2007#newcode176 Line 176: format supported by relatorio. Second, describe your report in XML making On 2009/09/09 12:34:45, ced wrote: > Instead of XML, you can create a record in "Administration>User > Interface>Actions>Reports" How complete is this? Can a printable report for a model be created so that it is an accessible action when an instance of that model is selected? All from the tryton client interface?
Sign in to reply to this message.
http://codereview.appspot.com/95068/diff/1007/2007 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/1007/2007#newcode176 Line 176: format supported by relatorio. Second, describe your report in XML making On 2009/09/14 05:44:29, Ian Wilson wrote: > On 2009/09/09 12:34:45, ced wrote: > > Instead of XML, you can create a record in "Administration>User > > Interface>Actions>Reports" > > How complete is this? Can a printable report for a model be created so that it > is an accessible action when an instance of that model is selected? All from > the tryton client interface? Yes
Sign in to reply to this message.
Hey Ian, here my notes. For me the document is ok for the release. I can not see mistakes in contents and structure. It is not complete, but non documentation is complete ever. http://codereview.appspot.com/95068/diff/5002/5003 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/5002/5003#newcode115 Line 115: In fact it is the time to open the document. The load is the same. http://codereview.appspot.com/95068/diff/5002/5003#newcode128 Line 128: their use is not encouraged within Tryton. Yes, thats right for odt. On ods files or odp files you have no chance to use Placeholder, since they only exist in odt.
Sign in to reply to this message.
Ok for me, I think it is a very good addition to the docs. http://codereview.appspot.com/95068/diff/5005/4003 File doc/reports.rst (right): http://codereview.appspot.com/95068/diff/5005/4003#newcode7 Line 7: and placed into document of the same file format. Tryton's ability to generate ...into a document...?
Sign in to reply to this message.
|