Browse Source

[WIP] Coda import skeleton

pull/10/head
Thibault Francois 8 years ago
parent
commit
417ecbdc9f
  1. 2
      beesdoo_coda/__init__.py
  2. 25
      beesdoo_coda/__openerp__.py
  3. 6
      beesdoo_coda/wizard/__init__.py
  4. 46
      beesdoo_coda/wizard/import_coda.py

2
beesdoo_coda/__init__.py

@ -0,0 +1,2 @@
# -*- coding: utf-8 -*-
import wizard

25
beesdoo_coda/__openerp__.py

@ -0,0 +1,25 @@
# -*- coding: utf-8 -*-
{
'name': "Beescoop Coda Import module",
'summary': """
Import coda Wizard based on https://github.com/acsone/pycoda
""",
'description': """
""",
'author': "Beescoop - Cellule IT",
'website': "https://github.com/beescoop/Obeesdoo",
'category': 'Accounting & Finance',
'version': '0.1',
'depends': ['account'],
'data': [
'security/ir.model.access.csv',
'views/partner.xml',
'wizard/views/new_member_card.xml',
],
}

6
beesdoo_coda/wizard/__init__.py

@ -0,0 +1,6 @@
'''
Created on 19 mai 2016
@author: mythrys
'''
import import_coda

46
beesdoo_coda/wizard/import_coda.py

@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
'''
Created on 16 mai 2016
@author: Thibault Francois (thibault@françois.be)
'''
from coda.parser import Parser
from openerp import models, fields, api
# parser = Parser()
# print "salut"
#
# with open("example.coda") as f:
# content = f.read()
#
# print content
# statements = parser.parse(content)
# import pdb; pdb.set_trace()
class AccountBankStatementImport(models.TransientModel):
_inherit = 'account.bank.statement.import'
def _parse_file(self, data_file):
currency_code = False
account_number = '0'
stmts_vals = [{
'name': '',
'date': '',
'balance_start': '',
'balance_end_real' : '',
'transactions' : [
{
'name': '',
'note': '',
'date': '',
'amount': '',
'account_number': '',
'partner_name': '',
'ref': '',
'sequence': '',
'unique_import_id' : ''
}
],
}]
return currency_code, account_number, stmts_vals
Loading…
Cancel
Save