From 9ddfa6c32d53fe136d71127746b712017320c5ab Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Mon, 15 Dec 2014 10:18:55 +0100 Subject: [PATCH 01/19] [RFR] Move backported bank import modules from bank-payment to bank-statement-import repository. --- account_bank_statement_import_qif/__init__.py | 4 + .../__openerp__.py | 32 ++++++++ .../account_bank_statement_import_qif.py | 77 +++++++++++++++++++ .../test_qif_file/test_qif.qif | 21 +++++ .../tests/__init__.py | 8 ++ .../tests/test_import_bank_statement.py | 30 ++++++++ 6 files changed, 172 insertions(+) create mode 100644 account_bank_statement_import_qif/__init__.py create mode 100644 account_bank_statement_import_qif/__openerp__.py create mode 100644 account_bank_statement_import_qif/account_bank_statement_import_qif.py create mode 100644 account_bank_statement_import_qif/test_qif_file/test_qif.qif create mode 100644 account_bank_statement_import_qif/tests/__init__.py create mode 100644 account_bank_statement_import_qif/tests/test_import_bank_statement.py diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py new file mode 100644 index 0000000..784a476 --- /dev/null +++ b/account_bank_statement_import_qif/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +from . import account_bank_statement_import_qif + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__openerp__.py new file mode 100644 index 0000000..d06c90a --- /dev/null +++ b/account_bank_statement_import_qif/__openerp__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# noqa: This is a backport from Odoo. OCA has no control over style here. +# flake8: noqa +{ + 'name': 'Import QIF Bank Statement', + 'version': '1.0', + 'author': 'OpenERP SA', + 'description': ''' +Module to import QIF bank statements. +====================================== + +This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in +Accounting \ Bank and Cash \ Bank Statements. + +Bank Statements may be generated containing a subset of the QIF information (only those transaction lines that are required for the +creation of the Financial Accounting records). + +Backported from Odoo 9.0 + +When testing with the provided test file, make sure the demo data from the +base account_bank_statement_import module has been imported, or manually +create periods for the year 2013. +''', + 'images' : [], + 'depends': ['account_bank_statement_import'], + 'demo': [], + 'data': [], + 'auto_install': False, + 'installable': True, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/account_bank_statement_import_qif.py new file mode 100644 index 0000000..a95656e --- /dev/null +++ b/account_bank_statement_import_qif/account_bank_statement_import_qif.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# noqa: This is a backport from Odoo. OCA has no control over style here. +# flake8: noqa + +import dateutil.parser +import base64 +from tempfile import TemporaryFile + +from openerp.tools.translate import _ +from openerp.osv import osv + +from openerp.addons.account_bank_statement_import import account_bank_statement_import as ibs + +ibs.add_file_type(('qif', 'QIF')) + +class account_bank_statement_import(osv.TransientModel): + _inherit = "account.bank.statement.import" + + def process_qif(self, cr, uid, data_file, journal_id=False, context=None): + """ Import a file in the .QIF format""" + try: + fileobj = TemporaryFile('wb+') + fileobj.write(base64.b64decode(data_file)) + fileobj.seek(0) + file_data = "" + for line in fileobj.readlines(): + file_data += line + fileobj.close() + if '\r' in file_data: + data_list = file_data.split('\r') + else: + data_list = file_data.split('\n') + header = data_list[0].strip() + header = header.split(":")[1] + except: + raise osv.except_osv(_('Import Error!'), _('Please check QIF file format is proper or not.')) + line_ids = [] + vals_line = {} + total = 0 + if header == "Bank": + vals_bank_statement = {} + for line in data_list: + line = line.strip() + if not line: + continue + if line[0] == 'D': # date of transaction + vals_line['date'] = dateutil.parser.parse(line[1:], fuzzy=True).date() + if vals_line.get('date') and not vals_bank_statement.get('period_id'): + period_ids = self.pool.get('account.period').find(cr, uid, vals_line['date'], context=context) + vals_bank_statement.update({'period_id': period_ids and period_ids[0] or False}) + elif line[0] == 'T': # Total amount + total += float(line[1:].replace(',', '')) + vals_line['amount'] = float(line[1:].replace(',', '')) + elif line[0] == 'N': # Check number + vals_line['ref'] = line[1:] + elif line[0] == 'P': # Payee + bank_account_id, partner_id = self._detect_partner(cr, uid, line[1:], identifying_field='owner_name', context=context) + vals_line['partner_id'] = partner_id + vals_line['bank_account_id'] = bank_account_id + vals_line['name'] = 'name' in vals_line and line[1:] + ': ' + vals_line['name'] or line[1:] + elif line[0] == 'M': # Memo + vals_line['name'] = 'name' in vals_line and vals_line['name'] + ': ' + line[1:] or line[1:] + elif line[0] == '^': # end of item + line_ids.append((0, 0, vals_line)) + vals_line = {} + elif line[0] == '\n': + line_ids = [] + else: + pass + else: + raise osv.except_osv(_('Error!'), _('Cannot support this Format !Type:%s.') % (header,)) + vals_bank_statement.update({'balance_end_real': total, + 'line_ids': line_ids, + 'journal_id': journal_id}) + return [vals_bank_statement] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/test_qif_file/test_qif.qif b/account_bank_statement_import_qif/test_qif_file/test_qif.qif new file mode 100644 index 0000000..5388e6d --- /dev/null +++ b/account_bank_statement_import_qif/test_qif_file/test_qif.qif @@ -0,0 +1,21 @@ +!Type:Bank +D8/12/13 +T-1,000.00 +PDelta PC +^ +D8/15/13 +T-75.46 +PWalts Drugs +^ +D3/3/13 +T-379.00 +PEpic Technologies +^ +D3/4/13 +T-20.28 +PYOUR LOCAL SUPERMARKET +^ +D3/3/13 +T-421.35 +PSPRINGFIELD WATER UTILITY +^ diff --git a/account_bank_statement_import_qif/tests/__init__.py b/account_bank_statement_import_qif/tests/__init__.py new file mode 100644 index 0000000..389df58 --- /dev/null +++ b/account_bank_statement_import_qif/tests/__init__.py @@ -0,0 +1,8 @@ +# -*- coding: utf-8 -*- +# noqa: This is a backport from Odoo. OCA has no control over style here. +# flake8: noqa +from . import test_import_bank_statement +checks = [ + test_import_bank_statement +] + diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py new file mode 100644 index 0000000..6838129 --- /dev/null +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# noqa: This is a backport from Odoo. OCA has no control over style here. +# flake8: noqa +from openerp.tests.common import TransactionCase +from openerp.modules.module import get_module_resource + +class TestQifFile(TransactionCase): + """Tests for import bank statement qif file format (account.bank.statement.import) + """ + + def setUp(self): + super(TestQifFile, self).setUp() + self.statement_import_model = self.registry('account.bank.statement.import') + self.bank_statement_model = self.registry('account.bank.statement') + self.bank_statement_line_model = self.registry('account.bank.statement.line') + + def test_qif_file_import(self): + from openerp.tools import float_compare + cr, uid = self.cr, self.uid + qif_file_path = get_module_resource('account_bank_statement_import_qif', 'test_qif_file', 'test_qif.qif') + qif_file = open(qif_file_path, 'rb').read().encode('base64') + bank_statement_id = self.statement_import_model.create(cr, uid, dict( + file_type='qif', + data_file=qif_file, + )) + self.statement_import_model.parse_file(cr, uid, [bank_statement_id]) + line_id = self.bank_statement_line_model.search(cr, uid, [('name', '=', 'YOUR LOCAL SUPERMARKET')])[0] + statement_id = self.bank_statement_line_model.browse(cr, uid, line_id).statement_id.id + bank_st_record = self.bank_statement_model.browse(cr, uid, statement_id) + assert float_compare(bank_st_record.balance_end_real, -1896.09, 2) == 0 From c6407a37407c0d340bc79b96132c243e3e417c84 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Fri, 23 Jan 2015 22:50:24 +0100 Subject: [PATCH 02/19] New backport from odoo/master Fix bug #5 --- .../__openerp__.py | 22 ++--- .../account_bank_statement_import_qif.py | 81 +++++++++++------- ...account_bank_statement_import_qif_view.xml | 24 ++++++ .../static/description/icon.png | Bin 0 -> 6146 bytes .../tests/__init__.py | 4 - .../tests/test_import_bank_statement.py | 11 ++- 6 files changed, 91 insertions(+), 51 deletions(-) create mode 100644 account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml create mode 100644 account_bank_statement_import_qif/static/description/icon.png diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__openerp__.py index d06c90a..21b9684 100644 --- a/account_bank_statement_import_qif/__openerp__.py +++ b/account_bank_statement_import_qif/__openerp__.py @@ -1,32 +1,28 @@ # -*- coding: utf-8 -*- # noqa: This is a backport from Odoo. OCA has no control over style here. # flake8: noqa + { 'name': 'Import QIF Bank Statement', + 'category' : 'Accounting & Finance', 'version': '1.0', 'author': 'OpenERP SA', 'description': ''' Module to import QIF bank statements. ====================================== -This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in +This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in Accounting \ Bank and Cash \ Bank Statements. -Bank Statements may be generated containing a subset of the QIF information (only those transaction lines that are required for the -creation of the Financial Accounting records). - -Backported from Odoo 9.0 - -When testing with the provided test file, make sure the demo data from the -base account_bank_statement_import module has been imported, or manually -create periods for the year 2013. +Important Note +--------------------------------------------- +Because of the QIF format limitation, we cannot ensure the same transactions aren't imported several times or handle multicurrency. +Whenever possible, you should use a more appropriate file format like OFX. ''', - 'images' : [], + 'images': [], 'depends': ['account_bank_statement_import'], 'demo': [], - 'data': [], + 'data': ['account_bank_statement_import_qif_view.xml'], 'auto_install': False, 'installable': True, } - -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/account_bank_statement_import_qif.py index a95656e..38f6a5c 100644 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/account_bank_statement_import_qif.py @@ -3,29 +3,49 @@ # flake8: noqa import dateutil.parser -import base64 -from tempfile import TemporaryFile +import StringIO from openerp.tools.translate import _ -from openerp.osv import osv - -from openerp.addons.account_bank_statement_import import account_bank_statement_import as ibs - -ibs.add_file_type(('qif', 'QIF')) +from openerp.osv import osv, fields +from openerp.exceptions import Warning class account_bank_statement_import(osv.TransientModel): _inherit = "account.bank.statement.import" - def process_qif(self, cr, uid, data_file, journal_id=False, context=None): - """ Import a file in the .QIF format""" + _columns = { + 'journal_id': fields.many2one('account.journal', string='Journal', help='Accounting journal related to the bank statement you\'re importing. It has be be manually chosen for statement formats which doesn\'t allow automatic journal detection (QIF for example).'), + 'hide_journal_field': fields.boolean('Hide the journal field in the view'), + } + + def _get_hide_journal_field(self, cr, uid, context=None): + return context and 'journal_id' in context or False + + _defaults = { + 'hide_journal_field': _get_hide_journal_field, + } + + def _get_journal(self, cr, uid, currency_id, bank_account_id, account_number, context=None): + """ As .QIF format does not allow us to detect the journal, we need to let the user choose it. + We set it in context before to call super so it's the same as calling the widget from a journal """ + if context is None: + context = {} + if context.get('active_id'): + record = self.browse(cr, uid, context.get('active_id'), context=context) + if record.journal_id: + context['journal_id'] = record.journal_id.id + return super(account_bank_statement_import, self)._get_journal(cr, uid, currency_id, bank_account_id, account_number, context=context) + + def _check_qif(self, cr, uid, data_file, context=None): + return data_file.strip().startswith('!Type:') + + def _parse_file(self, cr, uid, data_file, context=None): + if not self._check_qif(cr, uid, data_file, context=context): + return super(account_bank_statement_import, self)._parse_file(cr, uid, data_file, context=context) + try: - fileobj = TemporaryFile('wb+') - fileobj.write(base64.b64decode(data_file)) - fileobj.seek(0) file_data = "" - for line in fileobj.readlines(): + for line in StringIO.StringIO(data_file).readlines(): file_data += line - fileobj.close() if '\r' in file_data: data_list = file_data.split('\r') else: @@ -33,8 +53,8 @@ class account_bank_statement_import(osv.TransientModel): header = data_list[0].strip() header = header.split(":")[1] except: - raise osv.except_osv(_('Import Error!'), _('Please check QIF file format is proper or not.')) - line_ids = [] + raise Warning(_('Could not decipher the QIF file.')) + transactions = [] vals_line = {} total = 0 if header == "Bank": @@ -45,33 +65,34 @@ class account_bank_statement_import(osv.TransientModel): continue if line[0] == 'D': # date of transaction vals_line['date'] = dateutil.parser.parse(line[1:], fuzzy=True).date() - if vals_line.get('date') and not vals_bank_statement.get('period_id'): - period_ids = self.pool.get('account.period').find(cr, uid, vals_line['date'], context=context) - vals_bank_statement.update({'period_id': period_ids and period_ids[0] or False}) elif line[0] == 'T': # Total amount total += float(line[1:].replace(',', '')) vals_line['amount'] = float(line[1:].replace(',', '')) elif line[0] == 'N': # Check number vals_line['ref'] = line[1:] elif line[0] == 'P': # Payee - bank_account_id, partner_id = self._detect_partner(cr, uid, line[1:], identifying_field='owner_name', context=context) - vals_line['partner_id'] = partner_id - vals_line['bank_account_id'] = bank_account_id vals_line['name'] = 'name' in vals_line and line[1:] + ': ' + vals_line['name'] or line[1:] + # Since QIF doesn't provide account numbers, we'll have to find res.partner and res.partner.bank here + # (normal behavious is to provide 'account_number', which the generic module uses to find partner/bank) + ids = self.pool.get('res.partner.bank').search(cr, uid, [('owner_name', '=', line[1:])], context=context) + if ids: + vals_line['bank_account_id'] = bank_account_id = ids[0] + vals_line['partner_id'] = self.pool.get('res.partner.bank').browse(cr, uid, bank_account_id, context=context).partner_id.id elif line[0] == 'M': # Memo vals_line['name'] = 'name' in vals_line and vals_line['name'] + ': ' + line[1:] or line[1:] elif line[0] == '^': # end of item - line_ids.append((0, 0, vals_line)) + transactions.append(vals_line) vals_line = {} elif line[0] == '\n': - line_ids = [] + transactions = [] else: pass else: - raise osv.except_osv(_('Error!'), _('Cannot support this Format !Type:%s.') % (header,)) - vals_bank_statement.update({'balance_end_real': total, - 'line_ids': line_ids, - 'journal_id': journal_id}) - return [vals_bank_statement] + raise Warning(_('This file is either not a bank statement or is not correctly formed.')) + + vals_bank_statement.update({ + 'balance_end_real': total, + 'transactions': transactions + }) + return None, None, [vals_bank_statement] -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml b/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml new file mode 100644 index 0000000..3b3a342 --- /dev/null +++ b/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml @@ -0,0 +1,24 @@ + + + + + + Import Bank Statements Inherited + account.bank.statement.import + + + + + + + + + + + + diff --git a/account_bank_statement_import_qif/static/description/icon.png b/account_bank_statement_import_qif/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..c5842c2b0c2f6769ac66d20eff011c53ed0dc285 GIT binary patch literal 6146 zcmbVwXHXMN)NT?&4ISw{bW}h>mmW$`IwGJ{g%Bx%NJmPjp$Fv^LWiJY1py&Qixfo& zO(PnL6zM`}Lg;*acjo@Qf9}qlJ+nJIXLjebXPE3<+hj+b#eUySie2b~NLI41NyoHI;jmVPq(x`mLAOC%hZ!I*+6y#M%xx*P; zW@tnYl{Voa3p8d+`dtnGmcC-WmSaK7NSBpe5x7gra0t#Q3KikTgQXLhGPG1`P*O=y z5J>fFwM5-f?uP61Yo{RjjE}qSTh!(;x7tDY20(^2z0R1BAfP8Ikp!~!C=Yc`tdKK7JR;?Dvfl2fCzo*V_ zu3a;vg8)=OgtzE{N&YQGTW%1x=G-Ja7qFtm=qz;iz>2GrF-JLE<{Q@wz$HL59V75! z!rg=k^j&lw@iMU!6wkaA%7_Hv(a)%-sAwV z>l%a3$D?+^1y-Z3mY%5~j-w&)7@a@5R}3UGxb{4lVnsA1vPX2LM|Y8$$h2_+=ZkY6 z&azjq1w%I(>I6_|_x)lb(C~|G!5$G$H1JV)Ejl8^JlqvL1ogbMDXGE|30&rQe_h4PvaKIGPy)n(6Vs)kqji70w-x9ru z5w;uUX<#~X@dT1@o;r|VlW<0tS~+@0z^||yErZk$`b8fA)OdV!(7`=)kNpwnPz=W} z4rYXp)`nhR6N@TeBNIU^&1vfr=)hg~VzX~v| z1Cidixb4ZHM0)yxq_w|@FSQIg4EMnd#T2K62Shl^S=19L2jYO1wtb(9FSQ#J#DITi zFi~9B!`MtQ{To0+dTf$9bg$-8bv!X-rt;k`^iNB7IETiLPK+ z0g8AbA)EyS@#RdRh4jY1A0@tD?9%mA+=O_tsBrFItTWiOt69P!0PgU~XTrfMb8HZ7 z#k!$!oviM(3j*u$=I3oi=p0{y_A-4(Zr=~Sh-q)+bs*e3i2lw`#ws%{erI-1WU6I{ z2NsIt%3&2IYGOUxpFFS@CTnqxgAC~0&3dS|(pf9Zym1`YCTLun(UE27%1H{M!dI%& z54WV3uQb{INn=Kl*ge(>>_2k66*bx<>WuR_v-S-Byz3~qWI3c27x*-!KJae?d0k+} zuOft_%=eajkUPAC)=rsQ1gwv2eq>t)w`E303rECHkaEC__}_b6s#38# zi1M@>EVwWAlMMx}zB$%1Xo4eA9YrW%a%DPZuo7@Aru?bd5;M)#yFlPy*?tv#X-a25 zP-~1^J06L*_%E){i_V^zCMo_YOnWtyMd)KWD5qa5Tpo%Mqds61+I~??aX~D9#!+@= z+x$Frw%t2eOT^1w8*F+lF?#GS@=QB;+ZVhifYo^^>$!5jZ=HG)~wth2Icx>p&s&4TM9yJtb%HCz> z#l3Gp&IX@0iVcql?X!+(NTORTJbl$%oAI*DB$2KOoQr?Oi&kZohTqfjmr_)J4+-Apz4F78#hU~8VrPdZx(6b#mNY-Y;(HCSBw-%8U zF2U=p3Xe~|^O(3rq>WA*Df>MpT235u&PyJ*;o8|ne33NC(vy^|hXwpK4r#Wz2QKg0 z1+7@JO|nnLF#HHixKwZ;wBG$1ORqHA7aFI6 z8J7;`hu-GOF>c>_5*#2_Wc)i(=%Q#;`vdB!s?Y;!#UA3jYW}oNz=p5LbcRr~|NhxR z@SudZTO-C=t$~kNj$I1YTxBv#uPl__M9%N614++hnM<;SR#t7T>FY;d(A7%Z>|okg z{NPAj53BiEJ{jAL8)Ttnj&SU&3%N8^<}K-YCgZZ{sU|(U$O^eTdrwA~Mp#-p(r_-% zT5VJtrZ50~(4!|RGVW=I>SEXOz^V0nbWiP`WLa_01d;>}53~OKf%X4#u$lQeC+(Uq z$*jwr*YN{Ud&WySp+kSM<%na#S+!z|1d>5l77Hn+D1mjp3|;jAN*yObK`UUq_2}e0 zy|@Nt^^+_=g_aR>T$S<)I5OuNV_Ri628 zV=h<^ll;MO*gjiC)h?u8$UDqrBBHwmX3=s_8O~nZTBBXO?@U1IasS@Ia$2(tgXS0q z&>17BBPmJ0bj&oX+MNL7M4pz!+rBX_$T6|4a)nRdFyaqF0NzJ5W2F&1=gU`yJ%c05 zBXsR`IW=2HK*o9bPN8h>Zgjj&>rXkQ3lTN(Ik>}1WiHv-3s8CZY#&KkzTftB1qNOo7j!X{M-)_$Q9bVVDIqG5kZTn zz8?j2$XmJ}E+1i~)p<2z$3T#6z)s)rCeSd?LNwtra*vTbut=AdlG-^j#m}Hg^%z{s zt$v>43xJc>Zm99PF}I~$deV%xM(+LD)E$QYsDrI_Cg+>KhduJkJ5D;L7_TREevtuZ z|HmJEli^2@{owg zZyQq}=I_sg0}Re{{@T9X_*=Lp#@%+PS*-ZWJcowh1R0d{>j6ve!zLWV;>`!I0h6&2;~VTS z|3zx+x4reDdgUM&%BfAOjZ(Z((>7HNHu1!NHM*l!+2qq33RVzf@1&bW_D!mMzYRi4 z$@LGTN0Ay#SN4POx(BN|^YkU@T0|*%mZfMluh7dcgVztJrxWL}gGGpXgkPE#X^V$r zowgA@MmMD#8u*JqaXqB_z%d-fb)FKCi&RlI^z&7y`!?m95_7^#-wx;i<`t*hRWNsvB1m?rPapWm|^r|1vLa31)PlpBtp zddgW;bgIpA_7Rx(-EBG6q&+5n{=YX8yJfdP21aPHDch=nTQk!0EB<_?{>Z^R$M4Fn z6X@~E^)S;**&Nvg{3;Al05C$h+&?vTIVZaK1t31=-bDE9S1 zf@y<-KD(?xl}x%0$khUyoE&mAhJYEmxbT=@45Vx z5L1c32hbE(KBs+#FyBsVi`Rsjk392g+*i1Es)Zhp0&05a|6m{pXh$lUgG1o*4;AgX zI37P0E~LYcdXu(@EU@BqLazd`61jKPWK+xpq{)C1FEMlMMSr^T~7pNZAh0I1)PY|B|Z^p)HV72qD?z*bPr*hF0b>)q-b zkD;M&IbVuqzIm!W+Foq`ht4WSqpnbRo0ePgT(h2sJ5_IYQ@cJRB--fD_#HA;-o^w|q)s?i4EYkl585Y^0)H(Tc++?H|7G9w(f`f*^^duNIga3o>YA zxX5N8EQTqH=LIy4bRA)!3?DU~Hsv#=FCw*Q;H}}`SA(UX6>sxi-Qoe?YijLG>_BW+ z;zY9&oo`n5%?P1hWpnh(p#3=?6d8#kDq4q)9Nv|Vu6gBd#sES9AK0>KTrVjtZ?#v| z#8blDgjPpn$zJqx^h+r_I+6_!Auq9eLa6@#V1c8D-`d4x zaF&LjWRwZeuWS~_Iq4C83=XV3Zj zA(3?ZGB4B1^m?1@QI9Yl^jW6ei*)jh(K6e_Sj+Xc1iUTWBnqewCX#X(I{5d3I2PPM zy8g&ktlKHB&Y)bgPOkpMsRC8KfXTX%B5!hR2L0rQ`SxWM_F^O7InMLz z5`FdT1(QvNDndd**BI+ygXW8HcSDWpC3-EP|B#g}$Nx5teFh+?lt-ew_l|KG55t_c zgenPZbIz?r`cSrbP4nb!`ME)e04DYHP%Dbc7DmGH+p4AAECJcBrTG(=#)Ubi1FQS? z)cP-Jt9iH+tx)puqPuOzQNZr*5Ai08(}R5hZ4849Wm(2uWtVJUJj@dlM?bothZT(G zzOx%^dtrwm|8X4nrE(rs!QDu4BLEhYr+RGI^R>pS+$6iCjGwc2KkV80otp|yxW9eE zckRkSOHYgmU*4k%m6DljoK8gr=BPjMxc1)&`Y?FOGvU<(+Cq(u>qVs`bkdwn>18QIJz?v2s`59R>HP4v*Ml< zW3l8f zFDewW0c5X*yAu)KnbWzcKRYF1+qqQz@1(eNrUgl28uhgJyrT=p)_JiM<@=#Y11*T3 z)0XQS>_6yf(79h<|LM)iU~KQ3_Jk|Gi3#Q871E?W2AN))gZ`)>W(d3Zed zaLqocG)ML!67SLjBucVj`%T7H1eTjI3o-ff`nt9)sQGKr?A=}B&PH>F^O692pnm>1J4Ef@K zlKv&wAH{#L^U&)uG`loU7y&%3| z3CgqmP<5KTp%lW?A+`*Q_~COMbX`xHG*xbP*rK1jL6dLQx;Xogwm^-`^mQ?)$j2rp zE2PBOTq)Ddp3b+WN_sg}t*oSbdl*Rzf2J$gfSl(Rgb1$okgIChZF#o=u*4$~zjkW4 zrs0gElbqp4)j^;9Xb6?3HmTd`U8s0h1B5C&h1DN(JAHRASjuaR+-{8@SK~Fyzj_#92;D5PR8E4ctt)v zEDN{(Fw?B}G+Sb|2}O<}OQR{snVa@8qcy;qPZJfNgN!o3i`|Ok??y_iCwcH1WoSWd zRmEsA_L(ZHc9@vl2hy0_C3^;TmJ%OwznsKc_rYV_(yv=3hP%WxijJB6k>q&<$|WX_JAmf7!EQ zU#slyMF9u$T4+o~lCRD5=7sFb9}O1sdm{0+Ht`}>Z*=FVnS*Z(wqgH3H(QU^Kw&~D zLbD!Sv1Ker=AZ%B@`%i#b&S68N$S%6zW^ly$mTiqt9q~D-35A+=~<5)p}&vFM-2FT zQ$`p1AQB&laNaql3Cq9RkHne37v$MU)B+^FjCxknUMIB@crx7HXf&j8@e|b7rkOj`m9?0MHiNtIAzlp7aOE@|lT7D?$R1g8Mc&F-=8efYZ|NF1SLIZ;ma+J%X1Q%>j~-|; zqi`eoAM|J13GL&NAMAFjZp2^PfK#Pv)%v%`AB4HyX7`oc;(Qmy9tFN=A>%%u+}i1X z3*cu;cz2ty@dZ&BE-^eKjEOvDi(-vP-NsLTp|j1PTt=zIWXoctwHvv-`ZL5B+E%H% z={kPF(ow*a9nh#e!Hhw?>-(Sj$oIth<4U)PS+tE14*u+S@h& zT<4S+yuP*U@V+4RXgUG2es9)=ops3^mGg+s!X03xtnA6=<;9p!;n_+>0SDg7Uyo!} zI1N?_;mu{|yLR3!q(v&Y>@q|ozCzAf((?wi17bJaVQwEq>=YfaLHZAPRWh7N2d1XR7h7H8nnjMmxoFrca5M`2hXM z^39dkmP{_F5QW#;^SBWl~Ay+eoh zR)Py<{B=LeGXhr;`n;|DC`l-uapXHmHLY(ELtamdB&Hyn7}UM#LslP+l33KcgrwDM zpo~Md^M`J^W|iGoILb%MAOoli(T-3uX*#~&!`qPnM!vxPI3$KK>|G3Q8|9K?L|}zw zx`9Hm8Y)KjDk~j{uw@=9^Y-1?SqC9TwpSo-H9cv?{~zM||1#Uh2Faq~?+>nlc+UBH OfQ6~G$vb1u#Qy=L>~_Kc literal 0 HcmV?d00001 diff --git a/account_bank_statement_import_qif/tests/__init__.py b/account_bank_statement_import_qif/tests/__init__.py index 389df58..902f7b0 100644 --- a/account_bank_statement_import_qif/tests/__init__.py +++ b/account_bank_statement_import_qif/tests/__init__.py @@ -2,7 +2,3 @@ # noqa: This is a backport from Odoo. OCA has no control over style here. # flake8: noqa from . import test_import_bank_statement -checks = [ - test_import_bank_statement -] - diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index 6838129..bef4c35 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -20,10 +20,13 @@ class TestQifFile(TransactionCase): qif_file_path = get_module_resource('account_bank_statement_import_qif', 'test_qif_file', 'test_qif.qif') qif_file = open(qif_file_path, 'rb').read().encode('base64') bank_statement_id = self.statement_import_model.create(cr, uid, dict( - file_type='qif', - data_file=qif_file, - )) - self.statement_import_model.parse_file(cr, uid, [bank_statement_id]) + data_file=qif_file, + )) + context = { + 'journal_id': self.registry('ir.model.data').get_object_reference(cr, uid, 'account', 'bank_journal')[1], + 'allow_auto_create_journal': True, + } + self.statement_import_model.import_file(cr, uid, [bank_statement_id], context=context) line_id = self.bank_statement_line_model.search(cr, uid, [('name', '=', 'YOUR LOCAL SUPERMARKET')])[0] statement_id = self.bank_statement_line_model.browse(cr, uid, line_id).statement_id.id bank_st_record = self.bank_statement_model.browse(cr, uid, statement_id) From 968c925c4a46907f9f45eb31612867d99e8e723b Mon Sep 17 00:00:00 2001 From: Laurent Mignon Date: Fri, 20 Mar 2015 11:48:55 +0100 Subject: [PATCH 03/19] [IMP] Backport from master at 04daefd2d101d90daf5782173b95f31f3bd9e1b6 --- account_bank_statement_import_qif/__init__.py | 1 - .../tests/test_import_bank_statement.py | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index 784a476..7ff3caa 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -1,4 +1,3 @@ # -*- coding: utf-8 -*- from . import account_bank_statement_import_qif -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index bef4c35..8d87650 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -23,8 +23,7 @@ class TestQifFile(TransactionCase): data_file=qif_file, )) context = { - 'journal_id': self.registry('ir.model.data').get_object_reference(cr, uid, 'account', 'bank_journal')[1], - 'allow_auto_create_journal': True, + 'journal_id': self.registry('ir.model.data').get_object_reference(cr, uid, 'account', 'bank_journal')[1] } self.statement_import_model.import_file(cr, uid, [bank_statement_id], context=context) line_id = self.bank_statement_line_model.search(cr, uid, [('name', '=', 'YOUR LOCAL SUPERMARKET')])[0] From 2791728a688dc8791f7746b717dfb2c1adac83e1 Mon Sep 17 00:00:00 2001 From: "Laurent Mignon (ACSONE)" Date: Thu, 21 May 2015 14:03:51 +0200 Subject: [PATCH 04/19] [IMP] account_bank_statement_qif: use new API + i18n + move journal_id to main --- account_bank_statement_import_qif/README.rst | 58 +++++++++++++ account_bank_statement_import_qif/__init__.py | 1 - .../__openerp__.py | 26 ++---- .../account_bank_statement_import_qif.py | 87 ++++++++++--------- ...account_bank_statement_import_qif_view.xml | 24 ----- .../account_bank_statement_import_qif.pot | 49 +++++++++++ .../tests/__init__.py | 2 - .../tests/test_import_bank_statement.py | 35 ++++---- 8 files changed, 177 insertions(+), 105 deletions(-) create mode 100644 account_bank_statement_import_qif/README.rst delete mode 100644 account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml create mode 100644 account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot diff --git a/account_bank_statement_import_qif/README.rst b/account_bank_statement_import_qif/README.rst new file mode 100644 index 0000000..66411e6 --- /dev/null +++ b/account_bank_statement_import_qif/README.rst @@ -0,0 +1,58 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Module to import QIF bank statements. +===================================== + +This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in +Accounting \ Bank and Cash \ Bank Statements. + +Important Note +--------------- +Because of the QIF format limitation, we cannot ensure the same transactions aren't imported several times or handle multicurrency. +Whenever possible, you should use a more appropriate file format like OFX. + +The module has been initiated by a backport of the new framework developed +by Odoo for V9 at its early stage. It's no more kept in sync with the V9 since +it has reach a stage where maintaining a pure backport of 9.0 in 8.0 is not +feasible anymore + +Known issues / Roadmap +====================== + +* None + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + + +Credits +======= + +Contributors +------------ + +* Odoo SA +* Alexis de Lattre +* Laurent Mignon +* Ronald Portier + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index 7ff3caa..3bf4df8 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -1,3 +1,2 @@ # -*- coding: utf-8 -*- from . import account_bank_statement_import_qif - diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__openerp__.py index 21b9684..d550b1b 100644 --- a/account_bank_statement_import_qif/__openerp__.py +++ b/account_bank_statement_import_qif/__openerp__.py @@ -1,28 +1,16 @@ # -*- coding: utf-8 -*- -# noqa: This is a backport from Odoo. OCA has no control over style here. -# flake8: noqa { 'name': 'Import QIF Bank Statement', - 'category' : 'Accounting & Finance', + 'category': 'Accounting & Finance', 'version': '1.0', - 'author': 'OpenERP SA', - 'description': ''' -Module to import QIF bank statements. -====================================== - -This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in -Accounting \ Bank and Cash \ Bank Statements. - -Important Note ---------------------------------------------- -Because of the QIF format limitation, we cannot ensure the same transactions aren't imported several times or handle multicurrency. -Whenever possible, you should use a more appropriate file format like OFX. -''', + 'author': 'OpenERP SA,' + 'Odoo Community Association (OCA)', + 'website': 'https://github.com/OCA/bank-statement-import', 'images': [], - 'depends': ['account_bank_statement_import'], - 'demo': [], - 'data': ['account_bank_statement_import_qif_view.xml'], + 'depends': [ + 'account_bank_statement_import' + ], 'auto_install': False, 'installable': True, } diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/account_bank_statement_import_qif.py index 38f6a5c..2683e77 100644 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/account_bank_statement_import_qif.py @@ -1,46 +1,44 @@ # -*- coding: utf-8 -*- -# noqa: This is a backport from Odoo. OCA has no control over style here. -# flake8: noqa import dateutil.parser import StringIO from openerp.tools.translate import _ -from openerp.osv import osv, fields +from openerp import api, models from openerp.exceptions import Warning -class account_bank_statement_import(osv.TransientModel): - _inherit = "account.bank.statement.import" - - _columns = { - 'journal_id': fields.many2one('account.journal', string='Journal', help='Accounting journal related to the bank statement you\'re importing. It has be be manually chosen for statement formats which doesn\'t allow automatic journal detection (QIF for example).'), - 'hide_journal_field': fields.boolean('Hide the journal field in the view'), - } - def _get_hide_journal_field(self, cr, uid, context=None): - return context and 'journal_id' in context or False +class AccountBankStatementImport(models.TransientModel): + _inherit = "account.bank.statement.import" - _defaults = { - 'hide_journal_field': _get_hide_journal_field, - } + @api.model + def _get_hide_journal_field(self): + return self.env.context.get('journal_id') and True - def _get_journal(self, cr, uid, currency_id, bank_account_id, account_number, context=None): - """ As .QIF format does not allow us to detect the journal, we need to let the user choose it. - We set it in context before to call super so it's the same as calling the widget from a journal """ - if context is None: - context = {} - if context.get('active_id'): - record = self.browse(cr, uid, context.get('active_id'), context=context) + @api.model + def _get_journal(self, currency_id, bank_account_id, account_number): + """ As .QIF format does not allow us to detect the journal, we need to + let the user choose it. + We set it in context before to call super so it's the same as + calling the widget from a journal """ + record = self + active_id = self.env.context.get('active_id') + if active_id: + record = self.browse(active_id) if record.journal_id: - context['journal_id'] = record.journal_id.id - return super(account_bank_statement_import, self)._get_journal(cr, uid, currency_id, bank_account_id, account_number, context=context) + record = record.with_context(journal_id=record.journal_id.id) + return super(AccountBankStatementImport, record)._get_journal( + currency_id, bank_account_id, account_number) - def _check_qif(self, cr, uid, data_file, context=None): + @api.model + def _check_qif(self, data_file): return data_file.strip().startswith('!Type:') - def _parse_file(self, cr, uid, data_file, context=None): - if not self._check_qif(cr, uid, data_file, context=context): - return super(account_bank_statement_import, self)._parse_file(cr, uid, data_file, context=context) + @api.model + def _parse_file(self, data_file): + if not self._check_qif(data_file): + return super(AccountBankStatementImport, self)._parse_file( + data_file) try: file_data = "" @@ -64,22 +62,31 @@ class account_bank_statement_import(osv.TransientModel): if not line: continue if line[0] == 'D': # date of transaction - vals_line['date'] = dateutil.parser.parse(line[1:], fuzzy=True).date() + vals_line['date'] = dateutil.parser.parse( + line[1:], fuzzy=True).date() elif line[0] == 'T': # Total amount total += float(line[1:].replace(',', '')) vals_line['amount'] = float(line[1:].replace(',', '')) elif line[0] == 'N': # Check number vals_line['ref'] = line[1:] elif line[0] == 'P': # Payee - vals_line['name'] = 'name' in vals_line and line[1:] + ': ' + vals_line['name'] or line[1:] - # Since QIF doesn't provide account numbers, we'll have to find res.partner and res.partner.bank here - # (normal behavious is to provide 'account_number', which the generic module uses to find partner/bank) - ids = self.pool.get('res.partner.bank').search(cr, uid, [('owner_name', '=', line[1:])], context=context) - if ids: - vals_line['bank_account_id'] = bank_account_id = ids[0] - vals_line['partner_id'] = self.pool.get('res.partner.bank').browse(cr, uid, bank_account_id, context=context).partner_id.id + vals_line['name'] = ('name' in vals_line and + line[1:] + ': ' + vals_line['name'] or + line[1:]) + # Since QIF doesn't provide account numbers, we'll have to + # find res.partner and res.partner.bank here + # (normal behavious is to provide 'account_number', which + # the generic module uses to find partner/bank) + banks = self.env['res.partner.bank'].search( + [('owner_name', '=', line[1:])], limit=1) + if banks: + bank_account = banks[0] + vals_line['bank_account_id'] = bank_account.id + vals_line['partner_id'] = bank_account.partner_id.id elif line[0] == 'M': # Memo - vals_line['name'] = 'name' in vals_line and vals_line['name'] + ': ' + line[1:] or line[1:] + vals_line['name'] = ('name' in vals_line and + vals_line['name'] + ': ' + line[1:] or + line[1:]) elif line[0] == '^': # end of item transactions.append(vals_line) vals_line = {} @@ -88,11 +95,11 @@ class account_bank_statement_import(osv.TransientModel): else: pass else: - raise Warning(_('This file is either not a bank statement or is not correctly formed.')) - + raise Warning(_('This file is either not a bank statement or is ' + 'not correctly formed.')) + vals_bank_statement.update({ 'balance_end_real': total, 'transactions': transactions }) return None, None, [vals_bank_statement] - diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml b/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml deleted file mode 100644 index 3b3a342..0000000 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif_view.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - Import Bank Statements Inherited - account.bank.statement.import - - - - - - - - - - - - diff --git a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot new file mode 100644 index 0000000..65c2bf0 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-06-08 12:01+0000\n" +"PO-Revision-Date: 2015-06-08 12:01+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_bank_statement_import_qif +#: help:account.bank.statement.import,journal_id:0 +msgid "Accounting journal related to the bank statement you're importing. It has be be manually chosen for statement formats which doesn't allow automatic journal detection (QIF for example)." +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:54 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: field:account.bank.statement.import,hide_journal_field:0 +msgid "Hide the journal field in the view" +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "" + +#. module: account_bank_statement_import_qif +#: field:account.bank.statement.import,journal_id:0 +msgid "Journal" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:98 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" + diff --git a/account_bank_statement_import_qif/tests/__init__.py b/account_bank_statement_import_qif/tests/__init__.py index 902f7b0..9ce25a7 100644 --- a/account_bank_statement_import_qif/tests/__init__.py +++ b/account_bank_statement_import_qif/tests/__init__.py @@ -1,4 +1,2 @@ # -*- coding: utf-8 -*- -# noqa: This is a backport from Odoo. OCA has no control over style here. -# flake8: noqa from . import test_import_bank_statement diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index 8d87650..5c13125 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -1,32 +1,29 @@ # -*- coding: utf-8 -*- -# noqa: This is a backport from Odoo. OCA has no control over style here. -# flake8: noqa + from openerp.tests.common import TransactionCase from openerp.modules.module import get_module_resource + class TestQifFile(TransactionCase): - """Tests for import bank statement qif file format (account.bank.statement.import) + """Tests for import bank statement qif file format + (account.bank.statement.import) """ def setUp(self): super(TestQifFile, self).setUp() - self.statement_import_model = self.registry('account.bank.statement.import') - self.bank_statement_model = self.registry('account.bank.statement') - self.bank_statement_line_model = self.registry('account.bank.statement.line') + self.statement_import_model = self.env['account.bank.statement.import'] + self.statement_line_model = self.env['account.bank.statement.line'] def test_qif_file_import(self): from openerp.tools import float_compare - cr, uid = self.cr, self.uid - qif_file_path = get_module_resource('account_bank_statement_import_qif', 'test_qif_file', 'test_qif.qif') + qif_file_path = get_module_resource( + 'account_bank_statement_import_qif', + 'test_qif_file', 'test_qif.qif') qif_file = open(qif_file_path, 'rb').read().encode('base64') - bank_statement_id = self.statement_import_model.create(cr, uid, dict( - data_file=qif_file, - )) - context = { - 'journal_id': self.registry('ir.model.data').get_object_reference(cr, uid, 'account', 'bank_journal')[1] - } - self.statement_import_model.import_file(cr, uid, [bank_statement_id], context=context) - line_id = self.bank_statement_line_model.search(cr, uid, [('name', '=', 'YOUR LOCAL SUPERMARKET')])[0] - statement_id = self.bank_statement_line_model.browse(cr, uid, line_id).statement_id.id - bank_st_record = self.bank_statement_model.browse(cr, uid, statement_id) - assert float_compare(bank_st_record.balance_end_real, -1896.09, 2) == 0 + bank_statement_improt = self.statement_import_model.with_context( + journal_id=self.ref('account.bank_journal')).create( + dict(data_file=qif_file)) + bank_statement_improt.import_file() + bank_statement = self.statement_line_model.search( + [('name', '=', 'YOUR LOCAL SUPERMARKET')], limit=1)[0].statement_id + assert float_compare(bank_statement.balance_end_real, -1896.09, 2) == 0 From 8a9d9c6f9dd9f5c385c9fe8a59467c408f2b638f Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 23 Jun 2015 16:37:06 +0200 Subject: [PATCH 05/19] [FIX] account_bank_statement_import: Handle correctly the selection of the journal --- .../account_bank_statement_import_qif.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/account_bank_statement_import_qif.py index 2683e77..0b9061e 100644 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/account_bank_statement_import_qif.py @@ -15,21 +15,6 @@ class AccountBankStatementImport(models.TransientModel): def _get_hide_journal_field(self): return self.env.context.get('journal_id') and True - @api.model - def _get_journal(self, currency_id, bank_account_id, account_number): - """ As .QIF format does not allow us to detect the journal, we need to - let the user choose it. - We set it in context before to call super so it's the same as - calling the widget from a journal """ - record = self - active_id = self.env.context.get('active_id') - if active_id: - record = self.browse(active_id) - if record.journal_id: - record = record.with_context(journal_id=record.journal_id.id) - return super(AccountBankStatementImport, record)._get_journal( - currency_id, bank_account_id, account_number) - @api.model def _check_qif(self, data_file): return data_file.strip().startswith('!Type:') From fdc7a54405ce0329bd5d94b5d74aeb7120851a1a Mon Sep 17 00:00:00 2001 From: "Ronald Portier (Therp BV)" Date: Thu, 2 Apr 2015 10:56:50 +0200 Subject: [PATCH 06/19] [ENH] Support multiple accounts/currencies. Copy of changes proposed for master. --- account_bank_statement_import_qif/__openerp__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__openerp__.py index d550b1b..14a81a0 100644 --- a/account_bank_statement_import_qif/__openerp__.py +++ b/account_bank_statement_import_qif/__openerp__.py @@ -2,8 +2,8 @@ { 'name': 'Import QIF Bank Statement', - 'category': 'Accounting & Finance', - 'version': '1.0', + 'category': 'Banking addons', + 'version': '8.0.1.0.0', 'author': 'OpenERP SA,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/bank-statement-import', From 4b9af5dbd248f907df7035ee4b7514594099b7bb Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Tue, 1 Sep 2015 12:20:23 -0400 Subject: [PATCH 07/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/es.po | 35 ++++++++++++++++++ account_bank_statement_import_qif/i18n/fr.po | 36 +++++++++++++++++++ .../i18n/lt_LT.po | 36 +++++++++++++++++++ account_bank_statement_import_qif/i18n/nl.po | 36 +++++++++++++++++++ .../i18n/pt_BR.po | 36 +++++++++++++++++++ account_bank_statement_import_qif/i18n/sl.po | 36 +++++++++++++++++++ 6 files changed, 215 insertions(+) create mode 100644 account_bank_statement_import_qif/i18n/es.po create mode 100644 account_bank_statement_import_qif/i18n/fr.po create mode 100644 account_bank_statement_import_qif/i18n/lt_LT.po create mode 100644 account_bank_statement_import_qif/i18n/nl.po create mode 100644 account_bank_statement_import_qif/i18n/pt_BR.po create mode 100644 account_bank_statement_import_qif/i18n/sl.po diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po new file mode 100644 index 0000000..3872d17 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/es.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-24 21:51+0000\n" +"PO-Revision-Date: 2015-06-08 12:44+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar extracto bancario" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po new file mode 100644 index 0000000..ffd5800 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# zuher83 , 2015 +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-24 21:51+0000\n" +"PO-Revision-Date: 2015-06-28 20:27+0000\n" +"Last-Translator: zuher83 \n" +"Language-Team: French (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Impossible de d??chiffrer le fichier QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer Relev?? Bancaire" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format correcte." diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po new file mode 100644 index 0000000..0d3930e --- /dev/null +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Arminas Grigonis , 2015 +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-24 21:51+0000\n" +"PO-Revision-Date: 2015-07-23 13:36+0000\n" +"Last-Translator: Arminas Grigonis \n" +"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/lt_LT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: lt_LT\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Ne??manoma i????ifruoti QIF failo." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importuoti banko i??ra????" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Failas arba ne banko i??ra??as arba suformuotas neteisingai." diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po new file mode 100644 index 0000000..e1e2fe5 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Erwin van der Ploeg , 2015 +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-24 21:51+0000\n" +"PO-Revision-Date: 2015-08-17 19:04+0000\n" +"Last-Translator: Erwin van der Ploeg \n" +"Language-Team: Dutch (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/nl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Kon het QIF bestand niet ontcijferen." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importeer bankafschrift" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Het bestand is of geen bankafschrift bestand of het bestand is niet in het correcte formaat." diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po new file mode 100644 index 0000000..9a86342 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# danimaribeiro , 2015 +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-09 09:23+0000\n" +"PO-Revision-Date: 2015-10-09 00:26+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "N??o foi poss??vel decifrar o arquivo QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar Extrato Banc??rio" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "O arquivo n??o ?? um extrato banc??rio ou o formato ?? incorreto." diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po new file mode 100644 index 0000000..9521623 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -0,0 +1,36 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Matja?? Mozeti?? , 2015 +msgid "" +msgstr "" +"Project-Id-Version: bank-statement-import (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-07-24 21:51+0000\n" +"PO-Revision-Date: 2015-06-28 05:24+0000\n" +"Last-Translator: Matja?? Mozeti?? \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "QIF datoteke ni bilo mogo??e de??ifrirati." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Uvoz ban??nega izpiska" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "Ta datoteka ni ban??ni izpisek, ali pa ni pravilno oblikovana." From 3ed00f9604dba75d59fb4f7889710d5bdae9a6f1 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 14 Oct 2015 02:19:40 +0200 Subject: [PATCH 08/19] [MIG] account_bank_statement_import_qif: Migration to 9.0 * Manifest reformat * Added license and contributors * Tests improved * Added matching partners * Added supported format in view --- account_bank_statement_import_qif/README.rst | 52 +++++++++++------- account_bank_statement_import_qif/__init__.py | 4 +- .../__openerp__.py | 20 ++++--- .../account_bank_statement_import_qif.pot | 49 ----------------- account_bank_statement_import_qif/i18n/es.po | 4 +- .../tests/test_import_bank_statement.py | 40 ++++++++++---- .../{test_qif_file => tests}/test_qif.qif | 0 .../wizards/__init__.py | 4 ++ .../account_bank_statement_import_qif.py | 54 +++++++++++-------- ...account_bank_statement_import_qif_view.xml | 14 +++++ 10 files changed, 131 insertions(+), 110 deletions(-) delete mode 100644 account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot rename account_bank_statement_import_qif/{test_qif_file => tests}/test_qif.qif (100%) create mode 100644 account_bank_statement_import_qif/wizards/__init__.py rename account_bank_statement_import_qif/{ => wizards}/account_bank_statement_import_qif.py (59%) create mode 100644 account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml diff --git a/account_bank_statement_import_qif/README.rst b/account_bank_statement_import_qif/README.rst index 66411e6..5707836 100644 --- a/account_bank_statement_import_qif/README.rst +++ b/account_bank_statement_import_qif/README.rst @@ -1,35 +1,48 @@ .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 -Module to import QIF bank statements. -===================================== +========================== +Import QIF bank statements +========================== -This module allows you to import the machine readable QIF Files in Odoo: they are parsed and stored in human readable format in +This module allows you to import the machine readable QIF Files in Odoo: they +are parsed and stored in human readable format in Accounting \ Bank and Cash \ Bank Statements. Important Note ---------------- -Because of the QIF format limitation, we cannot ensure the same transactions aren't imported several times or handle multicurrency. -Whenever possible, you should use a more appropriate file format like OFX. +-------------- +Because of the QIF format limitation, we cannot ensure the same transactions +aren't imported several times or handle multicurrency. Whenever possible, you +should use a more appropriate file format like OFX. -The module has been initiated by a backport of the new framework developed -by Odoo for V9 at its early stage. It's no more kept in sync with the V9 since -it has reach a stage where maintaining a pure backport of 9.0 in 8.0 is not -feasible anymore +The module was initiated as a backport of the new framework developed +by Odoo for V9 at its early stage. As Odoo has relicensed this module as +private inside its Odoo enterprise layer, now this one is maintained from the +original AGPL code. -Known issues / Roadmap -====================== +Usage +===== -* None +To use this module, you need to: + +#. Go to *Accounting* dashboard. +#. Click on *Import statement* from any of the bank journals. +#. Select a QIF file. +#. Press *Import*. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/174/9.0 Bug Tracker =========== -Bugs are tracked on `GitHub Issues `_. +Bugs are tracked on +`GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed feedback -`here `_. - +If you spotted it first, help us smashing it by providing a detailed and +welcomed feedback. Credits ======= @@ -41,6 +54,7 @@ Contributors * Alexis de Lattre * Laurent Mignon * Ronald Portier +* Pedro M. Baeza Maintainer ---------- @@ -55,4 +69,4 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index 3bf4df8..0796ed1 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -1,2 +1,4 @@ # -*- coding: utf-8 -*- -from . import account_bank_statement_import_qif +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import wizards diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__openerp__.py index 14a81a0..1e2eb75 100644 --- a/account_bank_statement_import_qif/__openerp__.py +++ b/account_bank_statement_import_qif/__openerp__.py @@ -1,16 +1,24 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'Import QIF Bank Statement', - 'category': 'Banking addons', - 'version': '8.0.1.0.0', + 'name': 'Import QIF Bank Statements', + 'category': 'Accounting', + 'version': '9.0.1.0.0', 'author': 'OpenERP SA,' + 'Tecnativa,' 'Odoo Community Association (OCA)', 'website': 'https://github.com/OCA/bank-statement-import', - 'images': [], 'depends': [ - 'account_bank_statement_import' + 'account_bank_statement_import', + ], + 'data': [ + 'wizards/account_bank_statement_import_qif_view.xml', ], - 'auto_install': False, 'installable': True, + 'license': 'AGPL-3', } diff --git a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot deleted file mode 100644 index 65c2bf0..0000000 --- a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot +++ /dev/null @@ -1,49 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * account_bank_statement_import_qif -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-06-08 12:01+0000\n" -"PO-Revision-Date: 2015-06-08 12:01+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: account_bank_statement_import_qif -#: help:account.bank.statement.import,journal_id:0 -msgid "Accounting journal related to the bank statement you're importing. It has be be manually chosen for statement formats which doesn't allow automatic journal detection (QIF for example)." -msgstr "" - -#. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:54 -#, python-format -msgid "Could not decipher the QIF file." -msgstr "" - -#. module: account_bank_statement_import_qif -#: field:account.bank.statement.import,hide_journal_field:0 -msgid "Hide the journal field in the view" -msgstr "" - -#. module: account_bank_statement_import_qif -#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import -msgid "Import Bank Statement" -msgstr "" - -#. module: account_bank_statement_import_qif -#: field:account.bank.statement.import,journal_id:0 -msgid "Journal" -msgstr "" - -#. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:98 -#, python-format -msgid "This file is either not a bank statement or is not correctly formed." -msgstr "" - diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 3872d17..40ced0f 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -21,7 +21,7 @@ msgstr "" #: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." -msgstr "" +msgstr "No se puede descifrar el archivo QIF." #. module: account_bank_statement_import_qif #: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import @@ -32,4 +32,4 @@ msgstr "Importar extracto bancario" #: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 #, python-format msgid "This file is either not a bank statement or is not correctly formed." -msgstr "" +msgstr "Este archivo no es un extracto bancario o no est?? correctamente formado." diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index 5c13125..af0e1cf 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -1,4 +1,9 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp.tests.common import TransactionCase from openerp.modules.module import get_module_resource @@ -13,17 +18,32 @@ class TestQifFile(TransactionCase): super(TestQifFile, self).setUp() self.statement_import_model = self.env['account.bank.statement.import'] self.statement_line_model = self.env['account.bank.statement.line'] + self.journal = self.env['account.journal'].create({ + 'name': 'Test bank journal', + 'code': 'TEST', + 'type': 'bank', + }) + self.partner = self.env['res.partner'].create({ + # Different case for trying insensitive case search + 'name': 'EPIC Technologies', + }) def test_qif_file_import(self): - from openerp.tools import float_compare qif_file_path = get_module_resource( - 'account_bank_statement_import_qif', - 'test_qif_file', 'test_qif.qif') + 'account_bank_statement_import_qif', 'tests', 'test_qif.qif', + ) qif_file = open(qif_file_path, 'rb').read().encode('base64') - bank_statement_improt = self.statement_import_model.with_context( - journal_id=self.ref('account.bank_journal')).create( - dict(data_file=qif_file)) - bank_statement_improt.import_file() - bank_statement = self.statement_line_model.search( - [('name', '=', 'YOUR LOCAL SUPERMARKET')], limit=1)[0].statement_id - assert float_compare(bank_statement.balance_end_real, -1896.09, 2) == 0 + wizard = self.statement_import_model.with_context( + journal_id=self.journal.id + ).create( + dict(data_file=qif_file) + ) + wizard.import_file() + statement = self.statement_line_model.search( + [('name', '=', 'YOUR LOCAL SUPERMARKET')], limit=1, + )[0].statement_id + self.assertAlmostEqual(statement.balance_end_real, -1896.09, 2) + line = self.statement_line_model.search( + [('name', '=', 'Epic Technologies')], limit=1, + ) + self.assertEqual(line.partner_id, self.partner) diff --git a/account_bank_statement_import_qif/test_qif_file/test_qif.qif b/account_bank_statement_import_qif/tests/test_qif.qif similarity index 100% rename from account_bank_statement_import_qif/test_qif_file/test_qif.qif rename to account_bank_statement_import_qif/tests/test_qif.qif diff --git a/account_bank_statement_import_qif/wizards/__init__.py b/account_bank_statement_import_qif/wizards/__init__.py new file mode 100644 index 0000000..f82d76e --- /dev/null +++ b/account_bank_statement_import_qif/wizards/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py similarity index 59% rename from account_bank_statement_import_qif/account_bank_statement_import_qif.py rename to account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index 0b9061e..1016bac 100644 --- a/account_bank_statement_import_qif/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -1,20 +1,21 @@ # -*- coding: utf-8 -*- +# Copyright 2015 Odoo S. A. +# Copyright 2015 Laurent Mignon +# Copyright 2015 Ronald Portier +# Copyright 2016 Pedro M. Baeza +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import dateutil.parser import StringIO from openerp.tools.translate import _ from openerp import api, models -from openerp.exceptions import Warning +from openerp.exceptions import UserError class AccountBankStatementImport(models.TransientModel): _inherit = "account.bank.statement.import" - @api.model - def _get_hide_journal_field(self): - return self.env.context.get('journal_id') and True - @api.model def _check_qif(self, data_file): return data_file.strip().startswith('!Type:') @@ -24,7 +25,6 @@ class AccountBankStatementImport(models.TransientModel): if not self._check_qif(data_file): return super(AccountBankStatementImport, self)._parse_file( data_file) - try: file_data = "" for line in StringIO.StringIO(data_file).readlines(): @@ -36,7 +36,7 @@ class AccountBankStatementImport(models.TransientModel): header = data_list[0].strip() header = header.split(":")[1] except: - raise Warning(_('Could not decipher the QIF file.')) + raise UserError(_('Could not decipher the QIF file.')) transactions = [] vals_line = {} total = 0 @@ -55,19 +55,10 @@ class AccountBankStatementImport(models.TransientModel): elif line[0] == 'N': # Check number vals_line['ref'] = line[1:] elif line[0] == 'P': # Payee - vals_line['name'] = ('name' in vals_line and - line[1:] + ': ' + vals_line['name'] or - line[1:]) - # Since QIF doesn't provide account numbers, we'll have to - # find res.partner and res.partner.bank here - # (normal behavious is to provide 'account_number', which - # the generic module uses to find partner/bank) - banks = self.env['res.partner.bank'].search( - [('owner_name', '=', line[1:])], limit=1) - if banks: - bank_account = banks[0] - vals_line['bank_account_id'] = bank_account.id - vals_line['partner_id'] = bank_account.partner_id.id + vals_line['name'] = ( + 'name' in vals_line and + line[1:] + ': ' + vals_line['name'] or line[1:] + ) elif line[0] == 'M': # Memo vals_line['name'] = ('name' in vals_line and vals_line['name'] + ': ' + line[1:] or @@ -80,11 +71,28 @@ class AccountBankStatementImport(models.TransientModel): else: pass else: - raise Warning(_('This file is either not a bank statement or is ' - 'not correctly formed.')) - + raise UserError(_('This file is either not a bank statement or is ' + 'not correctly formed.')) vals_bank_statement.update({ 'balance_end_real': total, 'transactions': transactions }) return None, None, [vals_bank_statement] + + def _complete_stmts_vals(self, stmt_vals, journal_id, account_number): + """Match partner_id if hasn't been deducted yet.""" + res = super(AccountBankStatementImport, self)._complete_stmts_vals( + stmt_vals, journal_id, account_number, + ) + # Since QIF doesn't provide account numbers (normal behaviour is to + # provide 'account_number', which the generic module uses to find + # the partner), we have to find res.partner through the name + partner_obj = self.env['res.partner'] + for statement in res: + for line_vals in statement['transactions']: + if not line_vals.get('partner_id') and line_vals.get('name'): + partner = partner_obj.search( + [('name', 'ilike', line_vals['name'])], limit=1, + ) + line_vals['partner_id'] = partner.id + return res diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml new file mode 100644 index 0000000..d6ab5b7 --- /dev/null +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif_view.xml @@ -0,0 +1,14 @@ + + + + + account.bank.statement.import + + + +
  • Quicken Interchange Format (.qif)
  • +
    +
    +
    + +
    From 9cf9070e3ad01b03b9b328dc83153350af2bd91a Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Fri, 9 Dec 2016 19:13:45 -0500 Subject: [PATCH 09/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/de.po | 43 +++++++++++++++++++ account_bank_statement_import_qif/i18n/es.po | 23 ++++++---- account_bank_statement_import_qif/i18n/fi.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/fr.po | 25 +++++++---- .../i18n/fr_CH.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/gl.po | 41 ++++++++++++++++++ .../i18n/lt_LT.po | 21 +++++---- .../i18n/nb_NO.po | 41 ++++++++++++++++++ account_bank_statement_import_qif/i18n/nl.po | 25 +++++++---- .../i18n/pt_BR.po | 21 +++++---- .../i18n/pt_PT.po | 42 ++++++++++++++++++ account_bank_statement_import_qif/i18n/sl.po | 21 +++++---- 12 files changed, 335 insertions(+), 50 deletions(-) create mode 100644 account_bank_statement_import_qif/i18n/de.po create mode 100644 account_bank_statement_import_qif/i18n/fi.po create mode 100644 account_bank_statement_import_qif/i18n/fr_CH.po create mode 100644 account_bank_statement_import_qif/i18n/gl.po create mode 100644 account_bank_statement_import_qif/i18n/nb_NO.po create mode 100644 account_bank_statement_import_qif/i18n/pt_PT.po diff --git a/account_bank_statement_import_qif/i18n/de.po b/account_bank_statement_import_qif/i18n/de.po new file mode 100644 index 0000000..402117f --- /dev/null +++ b/account_bank_statement_import_qif/i18n/de.po @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Rudolf Schnapka , 2016 +# Thomas A. Jaeger , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Thomas A. Jaeger , 2016\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "Konnte QIF-Datei nicht entziffern." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Kontoauszug importieren" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"Diese Datei ist entweder kein Kontoauszug oder ist fehlerhaft formatiert." diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 40ced0f..9c5acc7 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -3,14 +3,15 @@ # * account_bank_statement_import_qif # # Translators: +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-24 21:51+0000\n" -"PO-Revision-Date: 2015-06-08 12:44+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/es/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -18,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "No se puede descifrar el archivo QIF." @@ -29,7 +30,13 @@ msgid "Import Bank Statement" msgstr "Importar extracto bancario" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." -msgstr "Este archivo no es un extracto bancario o no est?? correctamente formado." +msgstr "" +"Este archivo no es un extracto bancario o no est?? correctamente formado." diff --git a/account_bank_statement_import_qif/i18n/fi.po b/account_bank_statement_import_qif/i18n/fi.po new file mode 100644 index 0000000..2f6bd9f --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fi.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Jarmo Kortetj??rvi , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-10 05:00+0000\n" +"PO-Revision-Date: 2016-12-10 05:00+0000\n" +"Last-Translator: Jarmo Kortetj??rvi , 2017\n" +"Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Tuo pankkiaineisto" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index ffd5800..92f8844 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# zuher83 , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-24 21:51+0000\n" -"PO-Revision-Date: 2015-06-28 20:27+0000\n" -"Last-Translator: zuher83 \n" -"Language-Team: French (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/fr/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "Impossible de d??chiffrer le fichier QIF." @@ -30,7 +30,14 @@ msgid "Import Bank Statement" msgstr "Importer Relev?? Bancaire" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." -msgstr "Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format correcte." +msgstr "" +"Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format " +"correcte." diff --git a/account_bank_statement_import_qif/i18n/fr_CH.po b/account_bank_statement_import_qif/i18n/fr_CH.po new file mode 100644 index 0000000..db9bfe5 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fr_CH.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: French (Switzerland) (https://www.transifex.com/oca/teams/23907/fr_CH/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr_CH\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer Relev??" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/gl.po b/account_bank_statement_import_qif/i18n/gl.po new file mode 100644 index 0000000..d06a6c6 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/gl.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Alejandro Santana , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Alejandro Santana , 2016\n" +"Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: gl\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar extracto bancario" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po index 0d3930e..2e6cd5f 100644 --- a/account_bank_statement_import_qif/i18n/lt_LT.po +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Arminas Grigonis , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-24 21:51+0000\n" -"PO-Revision-Date: 2015-07-23 13:36+0000\n" -"Last-Translator: Arminas Grigonis \n" -"Language-Team: Lithuanian (Lithuania) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/lt_LT/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/teams/23907/lt_LT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "Ne??manoma i????ifruoti QIF failo." @@ -30,7 +30,12 @@ msgid "Import Bank Statement" msgstr "Importuoti banko i??ra????" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Failas arba ne banko i??ra??as arba suformuotas neteisingai." diff --git a/account_bank_statement_import_qif/i18n/nb_NO.po b/account_bank_statement_import_qif/i18n/nb_NO.po new file mode 100644 index 0000000..b805e93 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/nb_NO.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Imre Kristoffer Eilertsen , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Imre Kristoffer Eilertsen , 2016\n" +"Language-Team: Norwegian Bokm??l (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nb_NO\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importer bankutsagn" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po index e1e2fe5..10d6cee 100644 --- a/account_bank_statement_import_qif/i18n/nl.po +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Erwin van der Ploeg , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-24 21:51+0000\n" -"PO-Revision-Date: 2015-08-17 19:04+0000\n" -"Last-Translator: Erwin van der Ploeg \n" -"Language-Team: Dutch (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/nl/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "Kon het QIF bestand niet ontcijferen." @@ -30,7 +30,14 @@ msgid "Import Bank Statement" msgstr "Importeer bankafschrift" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." -msgstr "Het bestand is of geen bankafschrift bestand of het bestand is niet in het correcte formaat." +msgstr "" +"Het bestand is of geen bankafschrift bestand of het bestand is niet in het " +"correcte formaat." diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po index 9a86342..f93a59c 100644 --- a/account_bank_statement_import_qif/i18n/pt_BR.po +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# danimaribeiro , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-09 09:23+0000\n" -"PO-Revision-Date: 2015-10-09 00:26+0000\n" -"Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/pt_BR/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "N??o foi poss??vel decifrar o arquivo QIF." @@ -30,7 +30,12 @@ msgid "Import Bank Statement" msgstr "Importar Extrato Banc??rio" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "O arquivo n??o ?? um extrato banc??rio ou o formato ?? incorreto." diff --git a/account_bank_statement_import_qif/i18n/pt_PT.po b/account_bank_statement_import_qif/i18n/pt_PT.po new file mode 100644 index 0000000..6027fd4 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -0,0 +1,42 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Pedro Castro Silva , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: Pedro Castro Silva , 2016\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_PT\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "N??o foi poss??vel decifrar o ficheiro QIF." + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Importar Extrato Banc??rio" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" +"O ficheiro n??o ?? um extrato banc??rio ou n??o est?? corretamente formatado." diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po index 9521623..a1942de 100644 --- a/account_bank_statement_import_qif/i18n/sl.po +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -3,15 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# Matja?? Mozeti?? , 2015 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: bank-statement-import (8.0)\n" +"Project-Id-Version: Odoo Server 9.0c\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-07-24 21:51+0000\n" -"PO-Revision-Date: 2015-06-28 05:24+0000\n" -"Last-Translator: Matja?? Mozeti?? \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-bank-statement-import-8-0/language/sl/)\n" +"POT-Creation-Date: 2016-12-09 17:00+0000\n" +"PO-Revision-Date: 2016-12-09 17:00+0000\n" +"Last-Translator: OCA Transbot , 2016\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 #, python-format msgid "Could not decipher the QIF file." msgstr "QIF datoteke ni bilo mogo??e de??ifrirati." @@ -30,7 +30,12 @@ msgid "Import Bank Statement" msgstr "Uvoz ban??nega izpiska" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/account_bank_statement_import_qif.py:83 +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Ta datoteka ni ban??ni izpisek, ali pa ni pravilno oblikovana." From 56559a264485746dc3edd3b191f09c441e459476 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Nam=C3=A8che?= Date: Sun, 15 Jan 2017 11:28:30 +0100 Subject: [PATCH 10/19] [MIG] account_bank_statement_import_qif: Migrated to 10.0 --- .../{__openerp__.py => __manifest__.py} | 2 +- .../tests/test_import_bank_statement.py | 4 ++-- .../wizards/account_bank_statement_import_qif.py | 9 ++++----- 3 files changed, 7 insertions(+), 8 deletions(-) rename account_bank_statement_import_qif/{__openerp__.py => __manifest__.py} (96%) diff --git a/account_bank_statement_import_qif/__openerp__.py b/account_bank_statement_import_qif/__manifest__.py similarity index 96% rename from account_bank_statement_import_qif/__openerp__.py rename to account_bank_statement_import_qif/__manifest__.py index 1e2eb75..35f3e42 100644 --- a/account_bank_statement_import_qif/__openerp__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -8,7 +8,7 @@ { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index af0e1cf..8614602 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -5,8 +5,8 @@ # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from openerp.tests.common import TransactionCase -from openerp.modules.module import get_module_resource +from odoo.tests.common import TransactionCase +from odoo.modules.module import get_module_resource class TestQifFile(TransactionCase): diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index 1016bac..4eb7058 100644 --- a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -5,12 +5,12 @@ # Copyright 2016 Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import dateutil.parser import StringIO +import dateutil.parser -from openerp.tools.translate import _ -from openerp import api, models -from openerp.exceptions import UserError +from odoo.tools.translate import _ +from odoo import api, models +from odoo.exceptions import UserError class AccountBankStatementImport(models.TransientModel): @@ -20,7 +20,6 @@ class AccountBankStatementImport(models.TransientModel): def _check_qif(self, data_file): return data_file.strip().startswith('!Type:') - @api.model def _parse_file(self, data_file): if not self._check_qif(data_file): return super(AccountBankStatementImport, self)._parse_file( From 21cafb880310587151c2235eedbcfb445416486a Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Fri, 24 Mar 2017 21:10:43 -0400 Subject: [PATCH 11/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/de.po | 17 ++++++++--------- account_bank_statement_import_qif/i18n/es.po | 14 +++++++------- account_bank_statement_import_qif/i18n/fr.po | 17 +++++++++-------- account_bank_statement_import_qif/i18n/lt_LT.po | 14 +++++++------- account_bank_statement_import_qif/i18n/nl.po | 14 +++++++------- account_bank_statement_import_qif/i18n/pt_BR.po | 14 +++++++------- account_bank_statement_import_qif/i18n/pt_PT.po | 14 +++++++------- account_bank_statement_import_qif/i18n/sl.po | 14 +++++++------- 8 files changed, 59 insertions(+), 59 deletions(-) diff --git a/account_bank_statement_import_qif/i18n/de.po b/account_bank_statement_import_qif/i18n/de.po index 402117f..311c06d 100644 --- a/account_bank_statement_import_qif/i18n/de.po +++ b/account_bank_statement_import_qif/i18n/de.po @@ -3,15 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# Rudolf Schnapka , 2016 -# Thomas A. Jaeger , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: Thomas A. Jaeger , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "Konnte QIF-Datei nicht entziffern." @@ -33,10 +32,10 @@ msgstr "Kontoauszug importieren" #. module: account_bank_statement_import_qif #: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view msgid "Quicken Interchange Format (.qif)" -msgstr "" +msgstr "Quicken Interchange Format (.qif)" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 9c5acc7..6b55639 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "No se puede descifrar el archivo QIF." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index 92f8844..9a1a99f 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -3,14 +3,15 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 +# Quentin THEURET , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-08-11 02:41+0000\n" +"PO-Revision-Date: 2017-08-11 02:41+0000\n" +"Last-Translator: Quentin THEURET , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "Impossible de d??chiffrer le fichier QIF." @@ -32,10 +33,10 @@ msgstr "Importer Relev?? Bancaire" #. module: account_bank_statement_import_qif #: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view msgid "Quicken Interchange Format (.qif)" -msgstr "" +msgstr "Quicken Interchange Format (.qif)" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po index 2e6cd5f..1fe6b4a 100644 --- a/account_bank_statement_import_qif/i18n/lt_LT.po +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/teams/23907/lt_LT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "Ne??manoma i????ifruoti QIF failo." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Failas arba ne banko i??ra??as arba suformuotas neteisingai." diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po index 10d6cee..ac5aa7c 100644 --- a/account_bank_statement_import_qif/i18n/nl.po +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "Kon het QIF bestand niet ontcijferen." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po index f93a59c..34dcc16 100644 --- a/account_bank_statement_import_qif/i18n/pt_BR.po +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "N??o foi poss??vel decifrar o arquivo QIF." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "O arquivo n??o ?? um extrato banc??rio ou o formato ?? incorreto." diff --git a/account_bank_statement_import_qif/i18n/pt_PT.po b/account_bank_statement_import_qif/i18n/pt_PT.po index 6027fd4..a65f1ff 100644 --- a/account_bank_statement_import_qif/i18n/pt_PT.po +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# Pedro Castro Silva , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: Pedro Castro Silva , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "N??o foi poss??vel decifrar o ficheiro QIF." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po index a1942de..7bc6153 100644 --- a/account_bank_statement_import_qif/i18n/sl.po +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -3,14 +3,14 @@ # * account_bank_statement_import_qif # # Translators: -# OCA Transbot , 2016 +# OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 9.0c\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-12-09 17:00+0000\n" -"PO-Revision-Date: 2016-12-09 17:00+0000\n" -"Last-Translator: OCA Transbot , 2016\n" +"POT-Creation-Date: 2017-04-11 21:55+0000\n" +"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 #, python-format msgid "Could not decipher the QIF file." msgstr "QIF datoteke ni bilo mogo??e de??ifrirati." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Ta datoteka ni ban??ni izpisek, ali pa ni pravilno oblikovana." From 9233798f585a6e6106887121f58673b975f1c583 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 26 Oct 2017 22:06:59 +0200 Subject: [PATCH 12/19] [MIG] account_bank_statement_import_qif: Migration to 11.0 * Metafiles updated * Test adapted to Python 3 * Code adapted to Python 3 --- account_bank_statement_import_qif/README.rst | 18 +++++++++++------- account_bank_statement_import_qif/__init__.py | 1 - .../__manifest__.py | 5 ++--- .../tests/__init__.py | 3 ++- .../tests/test_import_bank_statement.py | 6 +++--- .../wizards/__init__.py | 1 - .../account_bank_statement_import_qif.py | 10 +++------- 7 files changed, 21 insertions(+), 23 deletions(-) diff --git a/account_bank_statement_import_qif/README.rst b/account_bank_statement_import_qif/README.rst index 5707836..f971f70 100644 --- a/account_bank_statement_import_qif/README.rst +++ b/account_bank_statement_import_qif/README.rst @@ -26,14 +26,14 @@ Usage To use this module, you need to: -#. Go to *Accounting* dashboard. +#. Go to *Invoicing / Accounting* dashboard. #. Click on *Import statement* from any of the bank journals. #. Select a QIF file. #. Press *Import*. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/174/9.0 + :target: https://runbot.odoo-community.org/runbot/174/11.0 Bug Tracker =========== @@ -50,11 +50,15 @@ Credits Contributors ------------ -* Odoo SA -* Alexis de Lattre -* Laurent Mignon -* Ronald Portier -* Pedro M. Baeza +* Odoo SA +* Akretion + * Alexis de Lattre +* ACSONE A/V + * Laurent Mignon +* Therp + * Ronald Portier +* Tecnativa (https://www.tecnativa.com) + * Pedro M. Baeza Maintainer ---------- diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index 0796ed1..fbadf7a 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import wizards diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index 35f3e42..b70b5a8 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -1,14 +1,13 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Odoo S. A. # Copyright 2015 Laurent Mignon # Copyright 2015 Ronald Portier -# Copyright 2016 Pedro M. Baeza +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', diff --git a/account_bank_statement_import_qif/tests/__init__.py b/account_bank_statement_import_qif/tests/__init__.py index 9ce25a7..25ee5b4 100644 --- a/account_bank_statement_import_qif/tests/__init__.py +++ b/account_bank_statement_import_qif/tests/__init__.py @@ -1,2 +1,3 @@ -# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import test_import_bank_statement diff --git a/account_bank_statement_import_qif/tests/test_import_bank_statement.py b/account_bank_statement_import_qif/tests/test_import_bank_statement.py index 8614602..b5269e2 100644 --- a/account_bank_statement_import_qif/tests/test_import_bank_statement.py +++ b/account_bank_statement_import_qif/tests/test_import_bank_statement.py @@ -1,12 +1,12 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Odoo S. A. # Copyright 2015 Laurent Mignon # Copyright 2015 Ronald Portier -# Copyright 2016 Pedro M. Baeza +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests.common import TransactionCase from odoo.modules.module import get_module_resource +import base64 class TestQifFile(TransactionCase): @@ -32,7 +32,7 @@ class TestQifFile(TransactionCase): qif_file_path = get_module_resource( 'account_bank_statement_import_qif', 'tests', 'test_qif.qif', ) - qif_file = open(qif_file_path, 'rb').read().encode('base64') + qif_file = base64.b64encode(open(qif_file_path, 'rb').read()) wizard = self.statement_import_model.with_context( journal_id=self.journal.id ).create( diff --git a/account_bank_statement_import_qif/wizards/__init__.py b/account_bank_statement_import_qif/wizards/__init__.py index f82d76e..448bfc6 100644 --- a/account_bank_statement_import_qif/wizards/__init__.py +++ b/account_bank_statement_import_qif/wizards/__init__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index 4eb7058..aa73165 100644 --- a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -1,11 +1,9 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Odoo S. A. # Copyright 2015 Laurent Mignon # Copyright 2015 Ronald Portier -# Copyright 2016 Pedro M. Baeza +# Copyright 2016-2017 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -import StringIO import dateutil.parser from odoo.tools.translate import _ @@ -18,16 +16,14 @@ class AccountBankStatementImport(models.TransientModel): @api.model def _check_qif(self, data_file): - return data_file.strip().startswith('!Type:') + return data_file.strip().startswith(b'!Type:') def _parse_file(self, data_file): if not self._check_qif(data_file): return super(AccountBankStatementImport, self)._parse_file( data_file) try: - file_data = "" - for line in StringIO.StringIO(data_file).readlines(): - file_data += line + file_data = data_file.decode() if '\r' in file_data: data_list = file_data.split('\r') else: From f0302d3feb727b89c28515307b7a85b2325e6eb9 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 30 Dec 2017 03:18:44 +0100 Subject: [PATCH 13/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/de.po | 10 +++++----- account_bank_statement_import_qif/i18n/es.po | 15 ++++++++------- account_bank_statement_import_qif/i18n/fr.po | 13 ++++++------- account_bank_statement_import_qif/i18n/lt_LT.po | 10 +++++----- account_bank_statement_import_qif/i18n/nl.po | 10 +++++----- account_bank_statement_import_qif/i18n/pt_BR.po | 10 +++++----- account_bank_statement_import_qif/i18n/pt_PT.po | 10 +++++----- account_bank_statement_import_qif/i18n/sl.po | 10 +++++----- 8 files changed, 44 insertions(+), 44 deletions(-) diff --git a/account_bank_statement_import_qif/i18n/de.po b/account_bank_statement_import_qif/i18n/de.po index 311c06d..d8140e3 100644 --- a/account_bank_statement_import_qif/i18n/de.po +++ b/account_bank_statement_import_qif/i18n/de.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "Konnte QIF-Datei nicht entziffern." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "Quicken Interchange Format (.qif)" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index 6b55639..e6de694 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -4,13 +4,14 @@ # # Translators: # OCA Transbot , 2017 +# Pedro M. Baeza , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: Pedro M. Baeza , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -19,7 +20,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "No se puede descifrar el archivo QIF." @@ -32,10 +33,10 @@ msgstr "Importar extracto bancario" #. module: account_bank_statement_import_qif #: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view msgid "Quicken Interchange Format (.qif)" -msgstr "" +msgstr "Quicken Interchange Format (.qif)" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index 9a1a99f..1a26855 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -4,14 +4,13 @@ # # Translators: # OCA Transbot , 2017 -# Quentin THEURET , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-08-11 02:41+0000\n" -"PO-Revision-Date: 2017-08-11 02:41+0000\n" -"Last-Translator: Quentin THEURET , 2017\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" +"Last-Translator: OCA Transbot , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -20,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "Impossible de d??chiffrer le fichier QIF." @@ -36,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "Quicken Interchange Format (.qif)" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po index 1fe6b4a..765adc3 100644 --- a/account_bank_statement_import_qif/i18n/lt_LT.po +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/teams/23907/lt_LT/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "Ne??manoma i????ifruoti QIF failo." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Failas arba ne banko i??ra??as arba suformuotas neteisingai." diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po index ac5aa7c..63ca1bb 100644 --- a/account_bank_statement_import_qif/i18n/nl.po +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "Kon het QIF bestand niet ontcijferen." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po index 34dcc16..79f72f6 100644 --- a/account_bank_statement_import_qif/i18n/pt_BR.po +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "N??o foi poss??vel decifrar o arquivo QIF." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "O arquivo n??o ?? um extrato banc??rio ou o formato ?? incorreto." diff --git a/account_bank_statement_import_qif/i18n/pt_PT.po b/account_bank_statement_import_qif/i18n/pt_PT.po index a65f1ff..8947e81 100644 --- a/account_bank_statement_import_qif/i18n/pt_PT.po +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "N??o foi poss??vel decifrar o ficheiro QIF." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po index 7bc6153..b75e3dd 100644 --- a/account_bank_statement_import_qif/i18n/sl.po +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -6,10 +6,10 @@ # OCA Transbot , 2017 msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-04-11 21:55+0000\n" -"PO-Revision-Date: 2017-04-11 21:55+0000\n" +"POT-Creation-Date: 2017-12-17 03:38+0000\n" +"PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "MIME-Version: 1.0\n" @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:38 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "QIF datoteke ni bilo mogo??e de??ifrirati." @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:73 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "Ta datoteka ni ban??ni izpisek, ali pa ni pravilno oblikovana." From f535467b31dd20a6ca12f1f068184ba406774a98 Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 24 Mar 2018 03:22:55 +0100 Subject: [PATCH 14/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/fr.po | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index 1a26855..c8f3f4a 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -4,13 +4,14 @@ # # Translators: # OCA Transbot , 2017 +# Lixon Jean-Yves , 2017 msgid "" msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2017-12-17 03:38+0000\n" -"PO-Revision-Date: 2017-12-17 03:38+0000\n" -"Last-Translator: OCA Transbot , 2017\n" +"POT-Creation-Date: 2018-03-21 03:39+0000\n" +"PO-Revision-Date: 2018-03-21 03:39+0000\n" +"Last-Translator: Lixon Jean-Yves , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -27,12 +28,12 @@ msgstr "Impossible de d??chiffrer le fichier QIF." #. module: account_bank_statement_import_qif #: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import msgid "Import Bank Statement" -msgstr "Importer Relev?? Bancaire" +msgstr "Importer un relev?? bancaire" #. module: account_bank_statement_import_qif #: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view msgid "Quicken Interchange Format (.qif)" -msgstr "Quicken Interchange Format (.qif)" +msgstr "Format d'??change avec Quicken (.qif)" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 From 9c9d73975a426932dd76189eba7e77ef0bd715ae Mon Sep 17 00:00:00 2001 From: OCA Transbot Date: Sat, 9 Jun 2018 03:28:15 +0200 Subject: [PATCH 15/19] OCA Transbot updated translations from Transifex --- account_bank_statement_import_qif/i18n/fa.po | 41 ++++++++++++++++++++ account_bank_statement_import_qif/i18n/hr.po | 41 ++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 account_bank_statement_import_qif/i18n/fa.po create mode 100644 account_bank_statement_import_qif/i18n/hr.po diff --git a/account_bank_statement_import_qif/i18n/fa.po b/account_bank_statement_import_qif/i18n/fa.po new file mode 100644 index 0000000..0930c66 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/fa.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# Mehdi Zarrinkolah , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-08 08:27+0000\n" +"PO-Revision-Date: 2018-06-08 08:27+0000\n" +"Last-Translator: Mehdi Zarrinkolah , 2018\n" +"Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fa\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "???????? QIF ???????????????? ??????" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "???????? ???????????? ?????????? " + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "???????? ???????????? ???????? qif" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "?????? ???????? ???? ???????????? ?????????? ???????? ???? ???? ?????????? ?????? ?????? ????????." diff --git a/account_bank_statement_import_qif/i18n/hr.po b/account_bank_statement_import_qif/i18n/hr.po new file mode 100644 index 0000000..6b0550e --- /dev/null +++ b/account_bank_statement_import_qif/i18n/hr.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-08 08:27+0000\n" +"PO-Revision-Date: 2018-06-08 08:27+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "Uvoz bankovnog izvoda" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" From 23ee5a744f5050982d783831f54febf70d95f72a Mon Sep 17 00:00:00 2001 From: oca-travis Date: Thu, 12 Jul 2018 15:17:47 +0000 Subject: [PATCH 16/19] [UPD] Update account_bank_statement_import_qif.pot --- .../account_bank_statement_import_qif.pot | 37 +++++++++++++++++++ account_bank_statement_import_qif/i18n/de.po | 4 +- account_bank_statement_import_qif/i18n/es.po | 4 +- account_bank_statement_import_qif/i18n/fa.po | 4 +- account_bank_statement_import_qif/i18n/fi.po | 8 ++-- account_bank_statement_import_qif/i18n/fr.po | 7 ++-- .../i18n/fr_CH.po | 11 +++--- account_bank_statement_import_qif/i18n/gl.po | 8 ++-- account_bank_statement_import_qif/i18n/hr.po | 7 ++-- .../i18n/lt_LT.po | 10 +++-- .../i18n/nb_NO.po | 11 +++--- account_bank_statement_import_qif/i18n/nl.po | 4 +- .../i18n/pt_BR.po | 7 ++-- .../i18n/pt_PT.po | 7 ++-- account_bank_statement_import_qif/i18n/sl.po | 7 ++-- 15 files changed, 90 insertions(+), 46 deletions(-) create mode 100644 account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot diff --git a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot new file mode 100644 index 0000000..08eb5d0 --- /dev/null +++ b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_bank_statement_import_qif +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 +#, python-format +msgid "Could not decipher the QIF file." +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import +msgid "Import Bank Statement" +msgstr "" + +#. module: account_bank_statement_import_qif +#: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view +msgid "Quicken Interchange Format (.qif)" +msgstr "" + +#. module: account_bank_statement_import_qif +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 +#, python-format +msgid "This file is either not a bank statement or is not correctly formed." +msgstr "" + diff --git a/account_bank_statement_import_qif/i18n/de.po b/account_bank_statement_import_qif/i18n/de.po index d8140e3..b31e354 100644 --- a/account_bank_statement_import_qif/i18n/de.po +++ b/account_bank_statement_import_qif/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/es.po b/account_bank_statement_import_qif/i18n/es.po index e6de694..2e2b05a 100644 --- a/account_bank_statement_import_qif/i18n/es.po +++ b/account_bank_statement_import_qif/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 # Pedro M. Baeza , 2017 @@ -13,10 +13,10 @@ msgstr "" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: Pedro M. Baeza , 2017\n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/fa.po b/account_bank_statement_import_qif/i18n/fa.po index 0930c66..7fc26bc 100644 --- a/account_bank_statement_import_qif/i18n/fa.po +++ b/account_bank_statement_import_qif/i18n/fa.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # Mehdi Zarrinkolah , 2018 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2018-06-08 08:27+0000\n" "Last-Translator: Mehdi Zarrinkolah , 2018\n" "Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n" +"Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fa\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/fi.po b/account_bank_statement_import_qif/i18n/fi.po index 2f6bd9f..677bb62 100644 --- a/account_bank_statement_import_qif/i18n/fi.po +++ b/account_bank_statement_import_qif/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # Jarmo Kortetj??rvi , 2017 msgid "" @@ -12,14 +12,14 @@ msgstr "" "PO-Revision-Date: 2016-12-10 05:00+0000\n" "Last-Translator: Jarmo Kortetj??rvi , 2017\n" "Language-Team: Finnish (https://www.transifex.com/oca/teams/23907/fi/)\n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "" @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/fr.po b/account_bank_statement_import_qif/i18n/fr.po index c8f3f4a..61384f2 100644 --- a/account_bank_statement_import_qif/i18n/fr.po +++ b/account_bank_statement_import_qif/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 # Lixon Jean-Yves , 2017 @@ -13,10 +13,10 @@ msgstr "" "PO-Revision-Date: 2018-03-21 03:39+0000\n" "Last-Translator: Lixon Jean-Yves , 2017\n" "Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif @@ -40,5 +40,4 @@ msgstr "Format d'??change avec Quicken (.qif)" #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" -"Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format " -"correcte." +"Ce fichier n'est pas un relev?? bancaire ou n'est pas dans un format correcte." diff --git a/account_bank_statement_import_qif/i18n/fr_CH.po b/account_bank_statement_import_qif/i18n/fr_CH.po index db9bfe5..c0bd8c0 100644 --- a/account_bank_statement_import_qif/i18n/fr_CH.po +++ b/account_bank_statement_import_qif/i18n/fr_CH.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2016 msgid "" @@ -11,15 +11,16 @@ msgstr "" "POT-Creation-Date: 2016-12-09 17:00+0000\n" "PO-Revision-Date: 2016-12-09 17:00+0000\n" "Last-Translator: OCA Transbot , 2016\n" -"Language-Team: French (Switzerland) (https://www.transifex.com/oca/teams/23907/fr_CH/)\n" +"Language-Team: French (Switzerland) (https://www.transifex.com/oca/" +"teams/23907/fr_CH/)\n" +"Language: fr_CH\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr_CH\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "" @@ -35,7 +36,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/gl.po b/account_bank_statement_import_qif/i18n/gl.po index d06a6c6..a3d16dd 100644 --- a/account_bank_statement_import_qif/i18n/gl.po +++ b/account_bank_statement_import_qif/i18n/gl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # Alejandro Santana , 2016 msgid "" @@ -12,14 +12,14 @@ msgstr "" "PO-Revision-Date: 2016-12-09 17:00+0000\n" "Last-Translator: Alejandro Santana , 2016\n" "Language-Team: Galician (https://www.transifex.com/oca/teams/23907/gl/)\n" +"Language: gl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: gl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "" @@ -35,7 +35,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/hr.po b/account_bank_statement_import_qif/i18n/hr.po index 6b0550e..d5a0eb6 100644 --- a/account_bank_statement_import_qif/i18n/hr.po +++ b/account_bank_statement_import_qif/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2018 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2018-06-08 08:27+0000\n" "Last-Translator: OCA Transbot , 2018\n" "Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"Language: hr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: hr\n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 diff --git a/account_bank_statement_import_qif/i18n/lt_LT.po b/account_bank_statement_import_qif/i18n/lt_LT.po index 765adc3..af826f1 100644 --- a/account_bank_statement_import_qif/i18n/lt_LT.po +++ b/account_bank_statement_import_qif/i18n/lt_LT.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,12 +11,14 @@ msgstr "" "POT-Creation-Date: 2017-12-17 03:38+0000\n" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/teams/23907/lt_LT/)\n" +"Language-Team: Lithuanian (Lithuania) (https://www.transifex.com/oca/" +"teams/23907/lt_LT/)\n" +"Language: lt_LT\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: lt_LT\n" -"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%100<10 || n%100>=20) ? 1 : 2);\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 diff --git a/account_bank_statement_import_qif/i18n/nb_NO.po b/account_bank_statement_import_qif/i18n/nb_NO.po index b805e93..2f6d86a 100644 --- a/account_bank_statement_import_qif/i18n/nb_NO.po +++ b/account_bank_statement_import_qif/i18n/nb_NO.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # Imre Kristoffer Eilertsen , 2016 msgid "" @@ -11,15 +11,16 @@ msgstr "" "POT-Creation-Date: 2016-12-09 17:00+0000\n" "PO-Revision-Date: 2016-12-09 17:00+0000\n" "Last-Translator: Imre Kristoffer Eilertsen , 2016\n" -"Language-Team: Norwegian Bokm??l (Norway) (https://www.transifex.com/oca/teams/23907/nb_NO/)\n" +"Language-Team: Norwegian Bokm??l (Norway) (https://www.transifex.com/oca/" +"teams/23907/nb_NO/)\n" +"Language: nb_NO\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nb_NO\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:39 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." msgstr "" @@ -35,7 +36,7 @@ msgid "Quicken Interchange Format (.qif)" msgstr "" #. module: account_bank_statement_import_qif -#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:74 +#: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 #, python-format msgid "This file is either not a bank statement or is not correctly formed." msgstr "" diff --git a/account_bank_statement_import_qif/i18n/nl.po b/account_bank_statement_import_qif/i18n/nl.po index 63ca1bb..e89e0c4 100644 --- a/account_bank_statement_import_qif/i18n/nl.po +++ b/account_bank_statement_import_qif/i18n/nl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Dutch (https://www.transifex.com/oca/teams/23907/nl/)\n" +"Language: nl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: nl\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/pt_BR.po b/account_bank_statement_import_qif/i18n/pt_BR.po index 79f72f6..7975924 100644 --- a/account_bank_statement_import_qif/i18n/pt_BR.po +++ b/account_bank_statement_import_qif/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-12-17 03:38+0000\n" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/pt_PT.po b/account_bank_statement_import_qif/i18n/pt_PT.po index 8947e81..b00b1ff 100644 --- a/account_bank_statement_import_qif/i18n/pt_PT.po +++ b/account_bank_statement_import_qif/i18n/pt_PT.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-12-17 03:38+0000\n" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" -"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/teams/23907/pt_PT/)\n" +"Language-Team: Portuguese (Portugal) (https://www.transifex.com/oca/" +"teams/23907/pt_PT/)\n" +"Language: pt_PT\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_PT\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: account_bank_statement_import_qif diff --git a/account_bank_statement_import_qif/i18n/sl.po b/account_bank_statement_import_qif/i18n/sl.po index b75e3dd..020928a 100644 --- a/account_bank_statement_import_qif/i18n/sl.po +++ b/account_bank_statement_import_qif/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_bank_statement_import_qif -# +# # Translators: # OCA Transbot , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "PO-Revision-Date: 2017-12-17 03:38+0000\n" "Last-Translator: OCA Transbot , 2017\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 From 0f8f46126d0997390e773ec396c73efa9ca8f1db Mon Sep 17 00:00:00 2001 From: derKonig Date: Sat, 21 Jul 2018 10:48:26 +0000 Subject: [PATCH 17/19] Translated using Weblate (Persian) Currently translated at 100.0% (4 of 4 strings) Translation: bank-statement-import-11.0/bank-statement-import-11.0-account_bank_statement_import_qif Translate-URL: https://translation.odoo-community.org/projects/bank-statement-import-11-0/bank-statement-import-11-0-account_bank_statement_import_qif/fa/ --- account_bank_statement_import_qif/i18n/fa.po | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/account_bank_statement_import_qif/i18n/fa.po b/account_bank_statement_import_qif/i18n/fa.po index 7fc26bc..4c6f88d 100644 --- a/account_bank_statement_import_qif/i18n/fa.po +++ b/account_bank_statement_import_qif/i18n/fa.po @@ -9,30 +9,31 @@ msgstr "" "Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-06-08 08:27+0000\n" -"PO-Revision-Date: 2018-06-08 08:27+0000\n" -"Last-Translator: Mehdi Zarrinkolah , 2018\n" +"PO-Revision-Date: 2018-07-22 11:31+0000\n" +"Last-Translator: derKonig \n" "Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n" "Language: fa\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n > 1);\n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.0.1\n" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:34 #, python-format msgid "Could not decipher the QIF file." -msgstr "???????? QIF ???????????????? ??????" +msgstr "???????? QIF ???????????????? ??????." #. module: account_bank_statement_import_qif #: model:ir.model,name:account_bank_statement_import_qif.model_account_bank_statement_import msgid "Import Bank Statement" -msgstr "???????? ???????????? ?????????? " +msgstr "???????? ???????????? ??????????" #. module: account_bank_statement_import_qif #: model:ir.ui.view,arch_db:account_bank_statement_import_qif.account_bank_statement_import_view msgid "Quicken Interchange Format (.qif)" -msgstr "???????? ???????????? ???????? qif" +msgstr "???????? ???????????? ???????? (.qif)" #. module: account_bank_statement_import_qif #: code:addons/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py:69 From bc7a97dc237e2ca67b9f7a81a2b49b2684a73e27 Mon Sep 17 00:00:00 2001 From: Graeme Gellatly Date: Thu, 16 Aug 2018 01:11:35 +1200 Subject: [PATCH 18/19] FIX QIF errors --- account_bank_statement_import_qif/__manifest__.py | 2 +- .../wizards/account_bank_statement_import_qif.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index b70b5a8..f5fca4d 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -7,7 +7,7 @@ { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '11.0.1.0.0', + 'version': '11.0.1.0.1', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', diff --git a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py index aa73165..7f9e6fe 100644 --- a/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py +++ b/account_bank_statement_import_qif/wizards/account_bank_statement_import_qif.py @@ -35,7 +35,7 @@ class AccountBankStatementImport(models.TransientModel): transactions = [] vals_line = {} total = 0 - if header == "Bank": + if header in ("Bank", "CCard"): vals_bank_statement = {} for line in data_list: line = line.strip() @@ -58,7 +58,7 @@ class AccountBankStatementImport(models.TransientModel): vals_line['name'] = ('name' in vals_line and vals_line['name'] + ': ' + line[1:] or line[1:]) - elif line[0] == '^': # end of item + elif line[0] == '^' and vals_line: # end of item transactions.append(vals_line) vals_line = {} elif line[0] == '\n': From 7c8f3d1ded1996eeba95914bc860ca187f71218b Mon Sep 17 00:00:00 2001 From: Erick Tejada Date: Fri, 24 May 2019 12:49:36 -0400 Subject: [PATCH 19/19] [MIG] account_bank_statement_import_qif: Migration to 12.0 --- account_bank_statement_import_qif/__init__.py | 1 + account_bank_statement_import_qif/__manifest__.py | 2 +- .../i18n/account_bank_statement_import_qif.pot | 2 +- .../models/__init__.py | 3 +++ .../models/account_journal.py | 13 +++++++++++++ 5 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 account_bank_statement_import_qif/models/__init__.py create mode 100644 account_bank_statement_import_qif/models/account_journal.py diff --git a/account_bank_statement_import_qif/__init__.py b/account_bank_statement_import_qif/__init__.py index fbadf7a..7588e52 100644 --- a/account_bank_statement_import_qif/__init__.py +++ b/account_bank_statement_import_qif/__init__.py @@ -1,3 +1,4 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import models from . import wizards diff --git a/account_bank_statement_import_qif/__manifest__.py b/account_bank_statement_import_qif/__manifest__.py index f5fca4d..4eee423 100644 --- a/account_bank_statement_import_qif/__manifest__.py +++ b/account_bank_statement_import_qif/__manifest__.py @@ -7,7 +7,7 @@ { 'name': 'Import QIF Bank Statements', 'category': 'Accounting', - 'version': '11.0.1.0.1', + 'version': '12.0.1.0.0', 'author': 'OpenERP SA,' 'Tecnativa,' 'Odoo Community Association (OCA)', diff --git a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot index 08eb5d0..c814a25 100644 --- a/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot +++ b/account_bank_statement_import_qif/i18n/account_bank_statement_import_qif.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" diff --git a/account_bank_statement_import_qif/models/__init__.py b/account_bank_statement_import_qif/models/__init__.py new file mode 100644 index 0000000..ec99cd1 --- /dev/null +++ b/account_bank_statement_import_qif/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import account_journal diff --git a/account_bank_statement_import_qif/models/account_journal.py b/account_bank_statement_import_qif/models/account_journal.py new file mode 100644 index 0000000..37c00e9 --- /dev/null +++ b/account_bank_statement_import_qif/models/account_journal.py @@ -0,0 +1,13 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import models, _ + + +class AccountJournal(models.Model): + _inherit = "account.journal" + + def _get_bank_statements_available_import_formats(self): + res = super(AccountJournal, self).\ + _get_bank_statements_available_import_formats() + res.extend([_('.qif')]) + return res