← Back to team overview

openerp-expert-framework team mailing list archive

Re: float errors propagating to 10^-2 in OpenERP v5...

 

On Tuesday 17 August 2010 Sharoon Thomas wrote:
> Hello All,
> 
> Finally after two days of digging i have found the good, bad and the ugly 
answers that solves my rounding problem.
> 
> Good: Its not a rounding issue. 
> (Not that i am ready to believe float is a solution. We need Decimals !!)
> 
> Bad: The source of the problem is scarier. The production system had an 
account move with one draft line and a valid line. (The move as a whole was 
not validated if that is any useful info. I have no idea how this could 
happen. If i can recreate the situation i shall update the list/file a bug 
again.)
I found 6 moves too - all dated 2009
for all posted records of one move sum(debit)=sum(credit)
but one or 2 records per move with state draft  

I attach the statment, IMHO everyone should run this check

IIRC there was a commit statement in get sequence number which broke 
transaction logic . so this could well be that the first record got committed 
and the second faild for some reason. this also broke the workflow.
but i think it is fixed.

************** check statement *********
select move_id,account_id,debit,credit,state,date,write_date
from account_move_line
where move_id in (
SELECT "account_move_line0"."move_id"
FROM
"account_move_line" "account_move_line0"
group by "account_move_line0"."move_id","account_move_line0"."state"
having sum("account_move_line0"."debit" - "account_move_line0"."credit") != 0)
order by 1,2
-- 
regards
Ferdinand Gassauer
ChriCar Beteiligungs- und Beratungs- GmbH
Official OpenERP Partner

Attachment: balance_not_null.png
Description: PNG image


References