[FIX] account_bank_statement_import_paypal: Don't populate partner account

This makes the statement lines to not appear on reconciliation widget.
This commit is contained in:
Pedro M. Baeza
2019-07-19 17:11:12 +02:00
committed by manu
parent 5dde51681a
commit b40c6218e8
4 changed files with 4 additions and 5 deletions

View File

@@ -5,7 +5,7 @@
{
"name": "Import Paypal Bank Statements",
'summary': 'Import Paypal CSV files as Bank Statements in Odoo',
"version": "12.0.1.0.0",
"version": "12.0.1.0.1",
"category": "Accounting",
"website": "https://github.com/OCA/bank-statement-import",
"author": " Akretion, Odoo Community Association (OCA)",

View File

@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<title>Import Paypal Bank Statements</title>
<style type="text/css">

View File

@@ -52,7 +52,7 @@ class TestPaypalFile(common.SavepointCase):
statement = staments_now - old_statements
self.assertEqual(len(statement.line_ids), 3)
self.assertEqual(len(statement.mapped('line_ids').filtered(
lambda x: x.partner_id and x.account_id)), 1)
lambda x: x.partner_id)), 1)
self.assertAlmostEqual(
sum(statement.mapped('line_ids.amount')), 1489.2
)

View File

@@ -278,8 +278,7 @@ class AccountBankStatementImport(models.TransientModel):
if partner:
return {
'partner_id': partner.id,
'account_id': partner.property_account_receivable_id.id,
}
}
return None
@api.model