Browse Source

Merge pull request #225 from Tecnativa/12.0-fix-right_currency_and_partner_in_tests

[12.0][FIX] account_bank_statement_import_paypal: set right current and partner in tests
12.0
Pedro M. Baeza 5 years ago
committed by GitHub
parent
commit
6f33446b5b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      account_bank_statement_import_paypal/tests/paypal_en.csv
  2. 4
      account_bank_statement_import_paypal/tests/test_paypal_statement_import.py

2
account_bank_statement_import_paypal/tests/paypal_en.csv

@ -1,3 +1,3 @@
"Date","Time","Time Zone","Description","Currency","Gross","Fee ","Net","Balance","Transaction ID","From Email Address","Name","Bank Name","Bank Account","Shipping and Handling Amount","Sales Tax","Invoice ID","Reference Txn ID" "Date","Time","Time Zone","Description","Currency","Gross","Fee ","Net","Balance","Transaction ID","From Email Address","Name","Bank Name","Bank Account","Shipping and Handling Amount","Sales Tax","Invoice ID","Reference Txn ID"
"12/15/2018","20:07:53","CET","Your best supplier","USD","-33.50","-2.3","-31.2","-31.2","53820712527632627","","John Doe","Bank of America","123456789","0","0","INV25","23" "12/15/2018","20:07:53","CET","Your best supplier","USD","-33.50","-2.3","-31.2","-31.2","53820712527632627","","John Doe","Bank of America","123456789","0","0","INV25","23"
"12/15/2018","22:07:53","CET","Your payment","USD","1,525.00","0","1,525.00","1,493.80","34731322767782103","","Agrolait","","","0","0","INV/2019/0003","24"
"12/15/2018","22:07:53","CET","Your payment","USD","1,525.00","0","1,525.00","1,493.80","34731322767782103","","Azure Interior","","","0","0","INV/2019/0003","24"

4
account_bank_statement_import_paypal/tests/test_paypal_statement_import.py

@ -14,10 +14,14 @@ class TestPaypalFile(common.SavepointCase):
cls.map = cls.env['account.bank.statement.import.paypal.map'].create({ cls.map = cls.env['account.bank.statement.import.paypal.map'].create({
'name': 'Paypal Map Test', 'name': 'Paypal Map Test',
}) })
usd = cls.env.ref('base.USD')
cls.journal = cls.env['account.journal'].create({ cls.journal = cls.env['account.journal'].create({
'name': 'Paypal Bank', 'name': 'Paypal Bank',
'type': 'bank', 'type': 'bank',
'code': 'PYPAL', 'code': 'PYPAL',
'currency_id': (
usd.id if cls.env.user.company_id.currency_id != usd else False
),
}) })
def _do_import(self, file_name): def _do_import(self, file_name):

Loading…
Cancel
Save