follow-up report / overdue payments : "maturity" amount isn't computed

Bug #659102 reported by Francois Pietquin (OpenERP)
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Undecided
Jay Vora (Serpent Consulting Services)

Bug Description

- open a partner form view.
- print the report "overdue payments".

=> the pdf contains a mistake : the formula to compute the "maturity" amount is broken. (In place of the amount, I got : [[formatLang(reduce(lambda x,y: x+(y['debit'] - y['credit']), filter(lambda x: x['date_maturity'] < time.strftime('%Y-%m-%d'), getLines(o)), 0)) ]] [[company.currency_id.name]] ).

Revision history for this message
Ajay Patel (OpenERP) (ajay-openerp) wrote :

Hello francois

I have checked with the latest revisions of server,client and addons (trunk).
It is ok.
So please kindly update your revisions.
Still if you get same problem than re-open the bug.

thanks
apa(OpenERP)

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

@ Francois,

Please describe the problem with the version of OpenERP. APA(OpenERP) has checked in trunk.
Illustrate the circumstance where you meet the error.

Thanks.

Revision history for this message
Francois Pietquin (OpenERP) (fpi-openerp) wrote : Re: [Bug 659102] Re: follow-up report / overdue payments : "maturity" amount isn't computed

You right.
Sorry I forgot it!

Jay (OpenERP) wrote:
> @ Francois,
>
> Please describe the problem with the version of OpenERP. APA(OpenERP) has checked in trunk.
> Illustrate the circumstance where you meet the error.
>
> Thanks.
>
>

Revision history for this message
Francois Pietquin (OpenERP) (fpi-openerp) wrote :

Sorry I forgot to say I'm using 5.0.14
Thanks.

Changed in openobject-addons:
status: Invalid → New
Revision history for this message
Francois Pietquin (OpenERP) (fpi-openerp) wrote :

Create a simple invoice and then open the report from the appropriate partner form... you'll see the problem!
Contact me for any questions.

Many thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Francois,

I tried with latest code on 5.0.14, but I could not see the error.

It possible for you to give me access rights to connect your DB? Or can you attach the one?

Thanks.

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Francois,

Can you share the DB or the actual scenario?

Thanks.

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Nick White (r-launchpad-njw-me-uk) wrote :

I can confirm this. It occurs with a fresh install of the AllInOne 5.0.14 pack on Windows, with the sale module and its dependants installed, and the demo db. It also occurs on a colleague's Linux install 5.0.14 of, though that one is rather more customised.

Looking into it, I found that for some reason the filter() call causes an error. The RML reporting helpfully gives no traceback or any error reporting at all. However, in testing I found that even something along the lines of filter(lambda x: True, (1,2,3)) caused a failure.

So I rewrote the code to not need filter. It works exactly the same. It is a little ugly, but so was the previous code, due to the fun on constraining python code to one line. I'll attach it here.

Changed in openobject-addons:
assignee: nobody → Jay (OpenERP) (jvo-openerp)
status: Incomplete → Triaged
Changed in openobject-addons:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.