← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 570409] Re: How to implement nested loops in RML reports

 

** Summary changed:

- [Official Report Engine] Is not iterate in a right way on lines. GRAVE
+ How to implement nested loops in RML reports

-- 
How to implement nested loops in RML reports
https://bugs.launchpad.net/bugs/570409
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: New

Bug description:
Hello.

We are improving the Overdue Report, and we need to show the payments associated to a move line. We in the line make this.


[[  line['invoice']['payment_ids']  ]]

And the report print somthing like this:

[browse_record(account.move.line,
6687),
browse_record(account.move.line,
6686),
browse_record(account.move.line,
6685),
browse_record(account.move.line,
3582),
browse_record(account.move.line,
3338)]

If you can see is a list of objects, for this reason in the line i iterate with "repeatIn" function, then the result is:

blank line
blank  line
..
..
...
browse_record(account.move.line,
3338)

How you can see only is showing me the last element on the list....

The  generical structure is exactly the same of overdue.rml report in the account module. The problem is that my client needs to send to his customer the Invoice information and not the Accounting information.

I mean:
-------------------------------------------
LIST OF PARTNERS OBJECT
------------------------------------------
LIST OF LINES RELATED TO THIS PARTNER:
FIELD1 | FIELD2| FIELDN|invoice.payment_ids
------------------------------------------------------------
 L1_DATA | L1_DATA | L1_DATA | payment1
                 |                |                 | payment2
                 |                |                 | payment3
                 |                |                 | payment4

If you can see there are 3 repeatIn
-- one for partners
-- one for lines
-- one  for payments

To proof the concept, please make 3 or more partial payments on an demos invoice and you need to left open.

I think this is a bug....


i attach the module developed by us, you should need to change the overdue_res.rml for overdue_res_try.rml on  the definition,  i attach the module crated for the improve. You can print the example on Partners View "Carta Edo. Cta. Resumido."

Thanks....