On Jul 27, 2012, at 4:15 PM, Cédric Krier <[email protected]> wrote:
> On 27/07/12 16:14 +0530, Teagarden wrote: >> On 27-Jul-2012, at 3:01 PM, Cédric Krier <[email protected]> wrote: >>>> and it has a generic API over which we write multiple reports in >>>> different modules. I will try to extract the report generation part alone >>>> and put that out >>>> as a module today. >>> >>> Why did you not use the standard CSV export of Tryton? >> >> 1. Loads everything into memory as list of dict. > > I don't understand. ok, lets say that the report requires a million records, if you directly use the export_data method, its going to build a huge list of list. In addition __export_row method is not very efficient in building the data either because of its generic nature. > >> 2. Some of the reports we built does a bit more than fetch records, like >> having product names translated, computing purchase price from the purchase >> record immediately before sale etc. > > Could be done with Function fields. Yes, seems like the right way to do it. Thanks, Sharoon Thomas Openlabs Technologies & Consulting (P) Limited w: http://www.openlabs.co.in m: +1 813.793.6736 (OPEN) Extn. 200 t: @sharoonthomas - We CARE for our customers -- [email protected] mailing list
