← Back to team overview

openerp-india team mailing list archive

[Bug 885714] Re: [CRITICAL] Payable & Receivable not calculate if (debit or credit) sum is NULL

 

Hello Dmitrijs,

I have checked your issue at my end. But I am not able to reproduce it.

Because debit and credit are float field so It will never became null.
You are suggested that the import value from csv but these two field are
not "Import compatible".

So Would you please provide more information or precious steps to
reproduce it.

Thanks and waiting for your reply!

** Changed in: openobject-addons
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/885714

Title:
  [CRITICAL]  Payable & Receivable not calculate if (debit or credit)
  sum is NULL

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  If debit or credit is NULL in account move lines is zero, partner
  payable/receivable balance and the aged partner balance report is
  wrong as well.

  * there is no 'not null' constraints on debit/credit fields on the account_move_lines
  * if you do csv import with those fields as "blank" they get imported as NULL into the database
  * the sql query which calculates payble/receivable balance is in SQL
   "SUM(l.debit-l.credit)"

  If one of the fields is null, the returned value is also null, instead
  of proper balance!

    # select 100.00-NULL as "subtract_NULL", 100.00-0.00 as "subtract_ZERO";
     subtract_NULL | subtract_ZERO 
    ---------------+---------------
                   |        100.00
    (1 row)

  Because there is no "not null" constraint the other sql-check which
  was supposed to catch just plain doesn't work.

  I'll push a patch for this issue.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/885714/+subscriptions


References