Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIX] account: fix clause on accounts in reconciliation widget
The reconciliation widget must provide visibility on black lines having an account in
a different bank journal.

Example using Paypal:

Invoice:
Receivable: debit=x, credit=0 matching_number: A
sales     : debit=0, credit=x

Payment transaction:
Paypal    : debit=x, credit=0 matching_number: B
Receivable: debit=0, credit=x matching_number: A

Statement line payment:
Bank      : debit=x, credit=0
Paypal    : debit=0, credit=x matching_number: B
  • Loading branch information
smetl authored and qdp-odoo committed Oct 12, 2018
1 parent 56596e5 commit 64fcd97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/account/models/account_bank_statement.py
Expand Up @@ -381,7 +381,7 @@ def button_cancel_reconciliation(self):
####################################################

def _get_common_sql_query(self, overlook_partner = False, excluded_ids = None, split = False):
acc_type = "acc.internal_type IN ('payable', 'receivable')" if (self.partner_id or overlook_partner) else "acc.reconcile = true"
acc_type = "acc.reconcile = true"
select_clause = "SELECT aml.id "
from_clause = "FROM account_move_line aml JOIN account_account acc ON acc.id = aml.account_id "
account_clause = ''
Expand Down

0 comments on commit 64fcd97

Please sign in to comment.