Comment 10 for bug 551630

Revision history for this message
Borja López Soilán (NeoPolus) (borjals) wrote : Re: Financial reports to review

By the way, I just noticed that the "Print Journal" ("Print General Journal", "Print Central Journal") reports where not mentioned.

Those reports are broken too:

  - If I select several journals (like all of them), and I select several periods (all of the periods of one fiscal year):
    => If any of those journals doesn't have moves at all, it will just raise an "No records found for your selection!" exception and won't allow me to continue.
    => If all the journals have at least a move on any period, and any of the journal-period pairs doesn't have moves, it will print an unparsed report (ouch!) and errors like this one will be printed on the log:
        [2010-04-07 16:56:55,282] ERROR:report:[18]: report :
        [2010-04-07 16:56:55,283] ERROR:report:[19]: Traceback (most recent call last):
        [2010-04-07 16:56:55,283] ERROR:report:[20]: File "/home/datos/Proyectos/openerp/openobject-server/current/bin/report/render/rml2pdf/utils.py", line 114, in _process_text
        [2010-04-07 16:56:55,283] ERROR:report:[21]: txt = eval(expr,self.localcontext)
        [2010-04-07 16:56:55,283] ERROR:report:[22]: File "<string>", line 1, in <module>
        [2010-04-07 16:56:55,283] ERROR:report:[23]: IndexError: list index out of range
        [2010-04-07 16:56:55,284] ERROR:report:[24]:
        [2010-04-07 16:56:55,284] ERROR:report:[25]: list index out of range
        [2010-04-07 16:56:55,284] ERROR:report:[26]: expr: formatLang(sum_credit(line[0].period_id.id, line[0].journal_id.id))

I think this is what should be done:

== Print *** Journal ==
 * Wizard
     * Let the user select journals without moves.
     * Add an option to print the moves by journal (like it does now) or together like there was a single journal (needed on countries like Spain [though we currently can work it around by using the account_financial_reports module])

* Calculation
     * Ignore journals without moves, and journal/periods without moves (don't try to print them).
     * If the "by journal" option was selected, print the moves grouped by journal. If not, print all the moves without grouping, but add a 'journal' column with a reference to the journal code.