division by zero in payment from

Bug #1190304 reported by Cristian Salamea
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Medium
Unassigned

Bug Description

With latest revno in 6.1 and 7.0:

Fresh installation, install account_accountant module:

So system will create a fiscal year 2013
Create new fiscal year 2012

Change the invoice date to any day in 2012
Validate an Invoice, click o Payment button,
Change the date of payment to any day 2012

System crash: https://gist.github.com/ovnicraft/5767400

I invest and found the problem:

Division by zero is caused by currency rate, rate in res.currency is a function field base on date, so reconfigure rate currency to 2012 fix the problem but catch the bug was a little complicated and need to debug.
I consider two options:

Validate the case in vouche, line of crash
Validate the case in rate when not found any rate and return 1.0

Regards,

Changed in openobject-addons:
importance: Undecided → Medium
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Cristian,

Checked on trunk and it gives the warning such as "No currency rate associated for currency 1 for the given period ".

Which is quite fine.

Would you please check this again and let us know.

Thank you!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Yes in trunk works fine but in 6.1 and 7.0 does not.

Regards,

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Cristian,

I think you are being late to report this issue ;). Things are already improved on latest v7.

If u want this on 6.1 then you have to contact our support team at <email address hidden>

Thank you!

Changed in openobject-addons:
status: Incomplete → Invalid
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Hi Cristian,

I'm removing OCB-addons as an affected project for this bug as per project policy. Of course the bug affects ocb-addons/6.1, but we only want to track bugs that we fix in OCB-specific changes. Therefore, you should only add bugs to the project that you are going to propose a solution for.

Thanks,
Stefan.

no longer affects: ocb-addons
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.