You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.2 KiB

  1. # -*- coding: utf-8 -*-
  2. '''
  3. Created on 16 mai 2016
  4. @author: Thibault Francois (thibault@françois.be)
  5. '''
  6. from coda.parser import Parser
  7. from openerp import models, fields, api
  8. # parser = Parser()
  9. # print "salut"
  10. #
  11. # with open("example.coda") as f:
  12. # content = f.read()
  13. #
  14. # print content
  15. # statements = parser.parse(content)
  16. # import pdb; pdb.set_trace()
  17. class AccountBankStatementImport(models.TransientModel):
  18. _inherit = 'account.bank.statement.import'
  19. def _parse_file(self, data_file):
  20. currency_code = False
  21. account_number = '0'
  22. stmts_vals = [{
  23. 'name': '',
  24. 'date': '',
  25. 'balance_start': '',
  26. 'balance_end_real' : '',
  27. 'transactions' : [
  28. {
  29. 'name': '',
  30. 'note': '',
  31. 'date': '',
  32. 'amount': '',
  33. 'account_number': '',
  34. 'partner_name': '',
  35. 'ref': '',
  36. 'sequence': '',
  37. 'unique_import_id' : ''
  38. }
  39. ],
  40. }]
  41. return currency_code, account_number, stmts_vals