← Back to team overview

credativ team mailing list archive

[Bug 942876] Re: 6.0 reconciliation doesn't work

 

Hi Gregorz,

thank you for reporting this problem and suggesting a fix! Does this
problem occur with every matched transaction? In general, reconciliation
of matched transaction is known to work well, except that your
modification is in a recently modified part of the code. It may be this
recent modification that is at fault (http://bazaar.launchpad.net
/~banking-addons-team/banking-addons/6.0/revision/71).

Looking at your code, it registers the id of the generated
reconciliation on the move_info struct, separately from the move line.
The OpenERP reconciliation logic dictates that the id of the
reconciliation should also be available from the move_line itself, like
the original code retrieves it. However, we are aware of caching issues
with browse objects such as the move_line in this piece of the code. We
will need to refresh the browse record after having effectively written
its reconcile_id by creating the reconciliation object.

Thanks again,
Stefan.

-- 
You received this bug notification because you are a member of Banking
Addons Team, which is the registrant for Banking Addons.
https://bugs.launchpad.net/bugs/942876

Title:
  6.0 reconciliation doesn't work

Status in Banking Addons:
  New

Bug description:
  I am not sure if you are interested to fix version 6.0. (In 6.1 I see
  it is different concept)

  I get with my own developed parser that import bank statement wizard
  recognises remote_account and partner and even says that matched
  statement line. I see that invoice account move is marked with created
  reconciliation ID. But this reconciliation ID doesn't appear on bank
  statement line and doesn't create full reconciliation after confirming
  the bank statement.

  I have changed some lines in bank_import.py wizard and it started to work.
  Generally I added reconciliation ID directly from create method because it cannot be taken later until whole wizard finishes.

  Exact line numbers can differ as I added some log entries to analyse
  the code. I have changed lines with comment # GG.  Another change is
  at the end.

  around line 79:

          if partial:
              retval.reconcile_id = reconcile_obj.create(   # GG
                  cursor, uid, {
                      'type': 'auto',
                      'line_partial_ids': [(6, 0, [move_line.id])]
                      }
              )
          else:
              if move_line.reconcile_partial_id:
                  partial_ids = [x.id for x in
                                 move_line.reconcile_partial_id.line_partial_ids
                                 ]
                  reconcile_obj.write(
                      cursor, uid, move_line.reconcile_partial_id.id, {
                          'type': 'auto',
                          'line_id': [(6, 0, [move_line.id] + partial_ids)],
                          'line_partial_ids': [(6, 0, [])],
                          }
                      )
              else:
                  retval.reconcile_id = reconcile_obj.create(    # GG
                      cursor, uid, {
                          'type': 'auto',
                          'line_id': [(6, 0, [move_line.id])],
                  }
              )
          return retval

  Another change around line 834 (again one change marked with # GG)
                  if move_info:
                      values.type = move_info.type
                      values.reconcile_id = (
                          move_info.reconcile_id or         # GG
                          move_info.move_line.reconcile_id and
                          move_info.move_line.reconcile_id.id or
                          move_info.move_line.reconcile_partial_id and
                          move_info.move_line.reconcile_partial_id.id
                          )
                      values.partner_id = move_info.partner_id 
                      values.partner_bank_id = move_info.partner_bank_id

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


References