Browse Source

[FIX] account_bank_statement_import: If not found bank account on statement vals, partner_id always was being null.

pull/64/head
Omar 9 years ago
parent
commit
fea9c1bc58
  1. 2
      account_bank_statement_import/models/account_bank_statement_import.py

2
account_bank_statement_import/models/account_bank_statement_import.py

@ -351,7 +351,9 @@ class AccountBankStatementImport(models.TransientModel):
bank_obj = self._create_bank_account( bank_obj = self._create_bank_account(
partner_account_number) partner_account_number)
bank_account_id = bank_obj and bank_obj.id or False bank_account_id = bank_obj and bank_obj.id or False
if partner_id:
line_vals['partner_id'] = partner_id line_vals['partner_id'] = partner_id
if bank_account_id:
line_vals['bank_account_id'] = bank_account_id line_vals['bank_account_id'] = bank_account_id
if 'date' in stmt_vals and 'period_id' not in stmt_vals: if 'date' in stmt_vals and 'period_id' not in stmt_vals:
# if the parser found a date but didn't set a period for this date, # if the parser found a date but didn't set a period for this date,

Loading…
Cancel
Save