Domain Calculation : Wrong behavior with 0.0

Bug #636983 reported by Ferdinand
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KDE OpenObject Client
New
Undecided
Unassigned
Odoo Server (MOVED TO GITHUB)
Won't Fix
Wishlist
OpenERP's Framework R&D

Bug Description

filter does not exclude all 0.00 values as shown

the

'qty_available': fields.function(_product_available, method=True, type='float', string='Real Stock',

2 values returned by sum(qty_available) are
  5.6843418860808e-13
-1.77635683940025e-15

Revision history for this message
Ferdinand (office-chricar) wrote :
Revision history for this message
Albert Cervera i Areny - http://www.NaN-tic.com (albert-nan) wrote : Re: [Bug 636983] Re: V5 - filter rounding issue

A Dilluns, 13 de setembre de 2010, Ferdinand @ ChriCar va escriure:
> ** Attachment added: "filter_rounding_issue.png"
>
> https://bugs.launchpad.net/bugs/636983/+attachment/1577278/+files/filter_r
> ounding_issue.png

This sounds like a server-side bug to me.

--
Albert Cervera i Areny
http://www.NaN-tic.com
OpenERP Partners
Mòbil: +34 669 40 40 18

http://twitter.com/albertnan
http://albert-nan.blogspot.com

Revision history for this message
Ferdinand (office-chricar) wrote : Re: V5 - filter rounding issue

IMHO a conceptual bug

product_qty = double precision in stock_move
I did aggregate with a psql statement
select sum(product_qty) ....
as it is widely done in accounting

Yes I know I can and will put round(sum( )) in my statement - because I can handle this now

but this will and must be a permanent source of errors if the filters are not smart enough

it's just because Koo is the first with filters like this (as GKT and web didn't allow filtering 0 in V5)

I post this as preventive bug for trunk

summary: - V5 - filter rounding issue
+ Domain Calculation : Wrong behavior with 0.0
Changed in openobject-server:
status: New → Confirmed
assignee: nobody → OpenERP's Framework R&D (openerp-dev-framework)
importance: Undecided → Medium
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

this is a limitation of the framework, we can not filter on a field.function unless a search method is implemented.
As it's a new feature request for this field, I set as wishlist.

Changed in openobject-server:
importance: Medium → Wishlist
status: Confirmed → Won't Fix
Revision history for this message
Ferdinand (office-chricar) wrote :

@Fabien
it's not a question of not being able to filter, but to filter the correct values due to a rounding problem

Revision history for this message
Ferdinand (office-chricar) wrote :

unfortunatley I can not set the status back to NEW

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

I will take a look again.
Probably,It is not an issue of search of functional fields, the title has been modified which says that the domain evaluates int/float wrongly.
Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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