← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 659102] Re: follow-up report / overdue payments : "maturity" amount isn't computed

 

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.

** Patch added: "fix-overdue-report.patch"
   https://bugs.launchpad.net/openobject-addons/+bug/659102/+attachment/1721946/+files/fix-overdue-report.patch

-- 
follow-up report / overdue payments : "maturity" amount isn't computed
https://bugs.launchpad.net/bugs/659102
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Incomplete

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]] ).