← Back to team overview

openerp-india team mailing list archive

[Bug 1217360] [NEW] Manual Reconciliation - Can not reconcile same customer 2 times

 

Public bug reported:

The way the Manual Reconciliation action works force accountants to reconcile all entries at a time for a customer.
If one want to reconcile entries separately he can not do so : 
if there is no new entries since the last reconciliation, the partner will not be shown in the view even if there is still entries to reconcile.

Here the SQL query in addons/account/account_move_line.py, in the list_partners_to_reconcile() function: 
"""SELECT partner_id FROM (
                SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit, MAX(l.create_date) AS max_date
                FROM account_move_line l
                RIGHT JOIN account_account a ON (a.id = l.account_id)
                RIGHT JOIN res_partner p ON (l.partner_id = p.id)
                    WHERE a.reconcile IS TRUE
                    AND l.reconcile_id IS NULL
                    AND l.state <> 'draft'
                    GROUP BY l.partner_id, p.last_reconciliation_date
                ) AS s
                WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date)
                ORDER BY last_reconciliation_date"""

The last WHERE clause is the source of the issue :
 (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date) is unneeded.

Marc

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
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/1217360

Title:
  Manual Reconciliation - Can not reconcile same customer 2 times

Status in OpenERP Addons (modules):
  New

Bug description:
  The way the Manual Reconciliation action works force accountants to reconcile all entries at a time for a customer.
  If one want to reconcile entries separately he can not do so : 
  if there is no new entries since the last reconciliation, the partner will not be shown in the view even if there is still entries to reconcile.

  Here the SQL query in addons/account/account_move_line.py, in the list_partners_to_reconcile() function: 
  """SELECT partner_id FROM (
                  SELECT l.partner_id, p.last_reconciliation_date, SUM(l.debit) AS debit, SUM(l.credit) AS credit, MAX(l.create_date) AS max_date
                  FROM account_move_line l
                  RIGHT JOIN account_account a ON (a.id = l.account_id)
                  RIGHT JOIN res_partner p ON (l.partner_id = p.id)
                      WHERE a.reconcile IS TRUE
                      AND l.reconcile_id IS NULL
                      AND l.state <> 'draft'
                      GROUP BY l.partner_id, p.last_reconciliation_date
                  ) AS s
                  WHERE debit > 0 AND credit > 0 AND (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date)
                  ORDER BY last_reconciliation_date"""

  The last WHERE clause is the source of the issue :
   (last_reconciliation_date IS NULL OR max_date > last_reconciliation_date) is unneeded.

  Marc

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


Follow ups

References