division by zero error

Bug #772334 reported by Mohammed
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Undecided
Cristian Salamea

Bug Description

when running compute assets wizard it threw division by zero exception
period_ok = ((datetime.strptime(period.date_stop, '%Y-%m-%d').month % (12 / asset.method_freq)) == 0)
ZeroDivisionError: integer division or modulo by zero

Mohammed (gaafer5)
description: updated
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello ,

Our R&D Teams are focused on the latest OpenERP version, and this issue does not affect it.

Thanks.

Changed in openobject-addons:
assignee: nobody → Cristian Salamea (Gnuthink) (ovnicraft)
Changed in openobject-addons:
status: New → Confirmed
Mohammed (gaafer5)
description: updated
Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 772334] Re: division by zero error

On 09. 05. 11 09:28, Mohammed wrote:
> ** Branch linked: lp:~bstanciu/openobject-addons/account-fixed-assets
>
Mohammed,

Does this means that the bug is present in my branch?

how do you get it? please detail your steps.

thank you,
bogdan

Revision history for this message
Mohammed (gaafer5) wrote :

Dear Bogdan,

Yes, it is present in your branch.

To reproduce: register a new asset with "frequency of writing set to zero", then compute asset depreciation.

Thanks,

--- On Mon, 5/9/11, Bogdan Stanciu <email address hidden> wrote:

From: Bogdan Stanciu <email address hidden>
Subject: Re: [Bug 772334] Re: division by zero error
To: <email address hidden>
Date: Monday, May 9, 2011, 11:56 PM

On 09. 05. 11 09:28, Mohammed wrote:
> ** Branch linked: lp:~bstanciu/openobject-addons/account-fixed-assets
>
Mohammed,

Does this means that the bug is present in my branch?

how do you get it? please detail your steps.

thank you,
bogdan

--
You received this bug notification because you are a direct subscriber
of the bug.
https://bugs.launchpad.net/bugs/772334

Title:
  division by zero error

Status in OpenERP Modules (addons):
  Confirmed

Bug description:
  when running compute assets wizard it threw division by zero exception
  period_ok = ((datetime.strptime(period.date_stop, '%Y-%m-%d').month % (12 / asset.method_freq)) == 0)
  ZeroDivisionError: integer division or modulo by zero

To unsubscribe from this bug, go to:
https://bugs.launchpad.net/openobject-addons/+bug/772334/+subscribe

Revision history for this message
Bogdan Stanciu (bstanciu) wrote :

On 16. 05. 11 14:13, Mohammed wrote:
> Dear Bogdan,
>
> Yes, it is present in your branch.
>
> To reproduce: register a new asset with "frequency of writing set to
> zero", then compute asset depreciation.
>
> Thanks,
>
> --- On Mon, 5/9/11, Bogdan Stanciu <email address hidden>
> wrote:
>
> From: Bogdan Stanciu <email address hidden>
> Subject: Re: [Bug 772334] Re: division by zero error
> To: <email address hidden>
> Date: Monday, May 9, 2011, 11:56 PM
>
> On 09. 05. 11 09:28, Mohammed wrote:
>> ** Branch linked: lp:~bstanciu/openobject-addons/account-fixed-assets
>>
> Mohammed,
>
> Does this means that the bug is present in my branch?
>
> how do you get it? please detail your steps.
>
> thank you,
> bogdan
>
ok, I got it... it is a error to catch, as zero is not a proper option.

thank you again!

b

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.