diff --git a/account_statement_ext/statement.py b/account_statement_ext/statement.py index cd0b8c07..9d34a2a4 100644 --- a/account_statement_ext/statement.py +++ b/account_statement_ext/statement.py @@ -499,14 +499,14 @@ class AccountBankSatementLine(Model): res = {} obj_partner = self.pool.get('res.partner') obj_stat = self.pool.get('account.bank.statement') - ltype= receiv_account = pay_account = account_id = False + line_type = receiv_account = pay_account = account_id = False # If profile has a receivable_account_id, we return it in any case if profile_id: profile = self.pool.get("account.statement.profile").browse( cr, uid, profile_id, context=context) if profile.receivable_account_id: account_id = profile.receivable_account_id.id - ltype = 'general' + line_type = 'general' return res # If partner -> take from him if partner_id: @@ -525,12 +525,12 @@ class AccountBankSatementLine(Model): elif amount is not False: if amount >= 0: account_id = receiv_account - ltype = 'customer' + line_type = 'customer' else: account_id = pay_account - ltype = 'supplier' + line_type = 'supplier' res['account_id'] = account_id if account_id else receiv_account - res['type'] = ltype + res['type'] = line_type return res def onchange_partner_id(self, cr, uid, ids, partner_id, profile_id=None, context=None):