[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Health-dev] Loop in report file odt is not executing and gives me t

From: Bounmy Sihaphom
Subject: Re: [Health-dev] Loop in report file odt is not executing and gives me the internal server error 500
Date: Sat, 18 Oct 2014 15:10:09 +0700

On Tue, Oct 14, 2014 at 5:55 AM, Sebastián Marró <address@hidden> wrote:
Hi Bounmy

2014-10-12 20:34 GMT-03:00 Bounmy Sihaphom <address@hidden>:
Hi all!
I am trying to print number of daily appointments from the Tree view to odt file, it gives me the internal server error 500, here is my genshi code on the file:


<for each="appointment in objects">

    <for each="appointment in appointment">


           <appointment.patient>, <>, <appointment.age>



My target model :
class AppointmentReportbm(ModelSQL, ModelView)
appointment = pool.get('gnuhealth.appointment').__table__()
If I took the internal loop out, it prints only the first record from the list, in this case, how can i define the second loop so that I can print all the records from the list?

I think you can delete the internal loop. Normally the objects variable it's a list with all the selected records from the tree view [0]. Have you tried selecting the records before printing the report?

By the way, i believe that the AppointmentReportbm model definition is not needed and only if you want to pass custom data to a report, you have to define a class that inherits from Report [1]

Regards !

Thanks Sebastián, I will try. 
Sebastián Marró
Converging Ideas for Emerging Realities

reply via email to

[Prev in Thread] Current Thread [Next in Thread]