Skip to content

Commit

Permalink
multicompany fix
Browse files Browse the repository at this point in the history
  • Loading branch information
luc-demeyer committed Feb 8, 2019
1 parent a6dd7fa commit 705ab18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion l10n_be_coda_advanced/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

{
'name': 'Belgium - Advanced CODA statements Import',
'version': '11.0.1.0.0',
'version': '11.0.1.0.1',
'license': 'AGPL-3',
'author': 'Noviat',
'website': 'http://www.noviat.com',
Expand Down
4 changes: 3 additions & 1 deletion l10n_be_coda_advanced/wizard/account_coda_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,9 @@ def _match_counterparty(self, st_line, cba, transaction, reconcile_note):
return reconcile_note, match

partner_banks = self.env['res.partner.bank'].search(
[('sanitized_acc_number', '=', cp_number)])
[('sanitized_acc_number', '=', cp_number), '|',
('partner_id.company_id', '=', False),
('partner_id.company_id', '=', cba.company_id.id)])
partner_banks = partner_banks.filtered(lambda r: r.partner_id.active)
if partner_banks:
# filter out partners that belong to other companies
Expand Down

0 comments on commit 705ab18

Please sign in to comment.