-
Dr.Dran
-
-
Offline
-
Gold Boarder
-
- Messaggi: 187
-
Karma: 0
-
|
Salve a tutti!
Il titolo del thread è stato un attimo ridotto se no mi veniva troncato
Dunque veniamo all'esigenza:
- Sono nella vista elenco di un qualsiasi oggetto, esempio le fatture
- seleziono due o 3 righe che corrispondono alle relative fatture o relativi oggetti
- Se faccio click sull'icona in alto al client per la stampa (client gtk) e seleziono un report fatto con reportlab, mi viene generato un unico pdf con le stampe relative agli oggetti selezionati.
- se provo a prendere un mio report fatto con report_aeroo invece mi da un errore (che allego sotto) questo lo fa anche con il report di esempio allegato (quello che inserisce la voce sample_report sull'oggetto res.partner)
Ecco il codice di errore
[2011-03-20 17:16:24,310][Garvan0319] ERROR:report_aeroo:[01]:
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[02]: Environment Information :
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[03]: System : Linux-2.6.35-28-generic-x86_64-with-Ubuntu-10.10-maverick
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[04]: OS Name : posix
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[05]: Distributor ID: Ubuntu
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[06]: Description: Ubuntu 10.10
[2011-03-20 17:16:24,311][Garvan0319] ERROR:report_aeroo:[07]: Release: 10.10
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[08]: Codename: maverick
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[09]: Operating System Release : 2.6.35-28-generic
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[10]: Operating System Version : #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[11]: Operating System Architecture : 64bit
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[12]: Operating System Locale : it_IT.UTF8
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[13]: Python Version : 2.6.6
[2011-03-20 17:16:24,312][Garvan0319] ERROR:report_aeroo:[14]: OpenERP-Server Version : 5.0.15
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[15]: Last revision No. & ID :
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[16]: Traceback (most recent call last):
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[17]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/addons/report_aeroo/report_aeroo.py", line 398, in create_aeroo_report
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[18]: data = basic.generate(**oo_parser.localcontext).render().getvalue()
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[19]: File "/usr/local/lib/python2.6/dist-packages/aeroolib-1.0.0-py2.6.egg/aeroolib/plugins/base.py", line 48, in render
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[20]: return self.serializer(self.events)
[2011-03-20 17:16:24,313][Garvan0319] ERROR:report_aeroo:[21]: File "/usr/local/lib/python2.6/dist-packages/aeroolib-1.0.0-py2.6.egg/aeroolib/plugins/opendocument.py", line 1156, in __call__
[2011-03-20 17:16:24,314][Garvan0319] ERROR:report_aeroo:[22]: for kind, data, pos in stream:
[2011-03-20 17:16:24,314][Garvan0319] ERROR:report_aeroo:[23]: File "/usr/lib/pymodules/python2.6/genshi/template/base.py", line 605, in _include
[2011-03-20 17:16:24,314][Garvan0319] ERROR:report_aeroo:[24]: for event in stream:
[2011-03-20 17:16:24,315][Garvan0319] ERROR:report_aeroo:[25]: File "/usr/lib/pymodules/python2.6/genshi/template/markup.py", line 327, in _match
[2011-03-20 17:16:24,315][Garvan0319] ERROR:report_aeroo:[26]: for event in stream:
[2011-03-20 17:16:24,315][Garvan0319] ERROR:report_aeroo:[27]: File "/usr/lib/pymodules/python2.6/genshi/template/base.py", line 545, in _flatten
[2011-03-20 17:16:24,315][Garvan0319] ERROR:report_aeroo:[28]: for kind, data, pos in stream:
[2011-03-20 17:16:24,315][Garvan0319] ERROR:report_aeroo:[29]: File "/usr/lib/pymodules/python2.6/genshi/template/directives.py", line 359, in __call__
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[30]: iterable = _eval_expr(self.expr, ctxt, vars)
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[31]: File "/usr/lib/pymodules/python2.6/genshi/template/base.py", line 277, in _eval_expr
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[32]: retval = expr.evaluate(ctxt)
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[33]: File "/usr/lib/pymodules/python2.6/genshi/template/eval.py", line 178, in evaluate
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[34]: return eval(self.code, _globals, {'__data__': data})
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[35]: File "<string>", line 1, in <Expression u'iter(raggruppa(o.invoice_line))'>
[2011-03-20 17:16:24,316][Garvan0319] ERROR:report_aeroo:[36]: File "/usr/lib/pymodules/python2.6/genshi/template/eval.py", line 309, in lookup_name
[2011-03-20 17:16:24,317][Garvan0319] ERROR:report_aeroo:[37]: val = cls.undefined(name)
[2011-03-20 17:16:24,317][Garvan0319] ERROR:report_aeroo:[38]: File "/usr/lib/pymodules/python2.6/genshi/template/eval.py", line 410, in undefined
[2011-03-20 17:16:24,317][Garvan0319] ERROR:report_aeroo:[39]: raise UndefinedError(key, owner=owner)
[2011-03-20 17:16:24,326][Garvan0319] ERROR:report_aeroo:[40]: UndefinedError: "o" not defined
bzr: ERROR: Not a branch: "/home/drdran/".
[2011-03-20 17:16:24,615][Garvan0319] ERROR:web-services:[01]:
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[02]: Environment Information :
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[03]: System : Linux-2.6.35-28-generic-x86_64-with-Ubuntu-10.10-maverick
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[04]: OS Name : posix
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[05]: Distributor ID: Ubuntu
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[06]: Description: Ubuntu 10.10
[2011-03-20 17:16:24,616][Garvan0319] ERROR:web-services:[07]: Release: 10.10
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[08]: Codename: maverick
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[09]: Operating System Release : 2.6.35-28-generic
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[10]: Operating System Version : #49-Ubuntu SMP Tue Mar 1 14:39:03 UTC 2011
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[11]: Operating System Architecture : 64bit
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[12]: Operating System Locale : it_IT.UTF8
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[13]: Python Version : 2.6.6
[2011-03-20 17:16:24,617][Garvan0319] ERROR:web-services:[14]: OpenERP-Server Version : 5.0.15
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[15]: Last revision No. & ID :
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[16]: Exception: ('Aeroo Reports: Error while generating the report.', UndefinedError('"o" not defined',), '"o" not defined', 'For more reference inspect error logs.')
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[17]: Traceback (most recent call last):
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[18]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/service/web_services.py", line 683, in go
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[19]: (result, format) = obj.create(cr, uid, ids, datas, context)
[2011-03-20 17:16:24,618][Garvan0319] ERROR:web-services:[20]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/addons/report_aeroo/report_aeroo.py", line 539, in create
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[21]: return fnct(cr, uid, ids, data, report_xml, context)
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[22]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/report/report_sxw.py", line 427, in create_source_pdf
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[23]: return self.create_single_pdf(cr, uid, ids, data, report_xml, context)
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[24]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/addons/report_aeroo/report_aeroo.py", line 440, in create_single_pdf
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[25]: return self.create_aeroo_report(cr, uid, ids, data, report_xml, context=context, output=output)
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[26]: File "/home/drdran/Progetti/OpenERP/garvan/server/bin/addons/report_aeroo/report_aeroo.py", line 404, in create_aeroo_report
[2011-03-20 17:16:24,619][Garvan0319] ERROR:web-services:[27]: raise Exception(_("Aeroo Reports: Error while generating the report."), e, str(e), _("For more reference inspect error logs."))
[2011-03-20 17:16:24,620][Garvan0319] ERROR:web-services:[28]: Exception: ('Aeroo Reports: Error while generating the report.', UndefinedError('"o" not defined',), '"o" not defined', 'For more reference inspect error logs.')
Gli errori "sospetti" secondo me sono questi: Exception: ('Aeroo Reports: Error while generating the report.', UndefinedError('"o" not defined',), '"o" not defined', 'For more reference inspect error logs.')
... eventualmente qualcuno ha un esempio di report scritto in aeroo che funziona in questo caso (ovviamente non parlo del print_screen) secondo me è molto interessante ed utile approfondire anche questo aspetto, in modo tale da poter creare dei template generici per la comunity che possono essere stampati come quelli di reportlab.
Cheers
Franco
EDIT:
Sul forum di Alistek ho trovato questo... ma non riesco a capire per bene il problema, sembra che non debba utilizzare la classica abbreviazione di tipo "o." ma si dovrebbe iterare su "objects".ho provato a creare un esempio stupido che allego, ma mi da sempre questo errore, e non capisco il motivo:
Exception: ('Aeroo Reports: Error while generating the report.', TemplateSyntaxError('invalid syntax in expression "__filter(or each="fattura in objects)"
Sembra che non riesca a interpretare correttamente la direttiva genshi...
boh... qualcuno ha qualche idea?
Cheers
Franco
File allegato:
Nome del file:
prova.odt
Dimensione del file:9 KB
|