diff --git a/account_banking_nl_clieop/account_banking_nl_clieop.py b/account_banking_nl_clieop/account_banking_nl_clieop.py index 69fc306db..0fe28ba14 100644 --- a/account_banking_nl_clieop/account_banking_nl_clieop.py +++ b/account_banking_nl_clieop/account_banking_nl_clieop.py @@ -61,7 +61,10 @@ class clieop_export(osv.osv): 'date_generated': fields.date('Generation Date', readonly=True, select=True), 'file': - fields.binary('ClieOp File', readonly=True), + fields.binary('ClieOp File', readonly=True,), + 'filename': fields.char( + 'File Name', size=32, + ), 'state': fields.selection([ ('draft', 'Draft'), @@ -69,6 +72,7 @@ class clieop_export(osv.osv): ('done', 'Reconciled'), ], 'State', readonly=True), } + def get_daynr(self, cr, uid, context=None): ''' Return highest day number diff --git a/account_banking_nl_clieop/account_banking_nl_clieop.xml b/account_banking_nl_clieop/account_banking_nl_clieop.xml index 0c0a01fe5..f40861f8a 100644 --- a/account_banking_nl_clieop/account_banking_nl_clieop.xml +++ b/account_banking_nl_clieop/account_banking_nl_clieop.xml @@ -14,33 +14,34 @@ form
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/account_banking_nl_clieop/wizard/export_clieop.py b/account_banking_nl_clieop/wizard/export_clieop.py index 36b00049c..2780c8491 100644 --- a/account_banking_nl_clieop/wizard/export_clieop.py +++ b/account_banking_nl_clieop/wizard/export_clieop.py @@ -138,13 +138,19 @@ class banking_export_clieop_wizard(osv.osv_memory): readonly=True, string='File', ), + 'filename': fields.related( + 'file_id', 'filename', + type='char', size=32, + readonly=True, + string='Filename', + ), 'payment_order_ids': fields.many2many( 'payment.order', 'rel_wiz_payorders', 'wizard_id', 'payment_order_id', 'Payment Orders', readonly=True, ), } - + _defaults = { 'test': True, } @@ -334,6 +340,7 @@ class banking_export_clieop_wizard(osv.osv_memory): no_transactions = order.nr_posts, testcode = order.testcode, file = base64.encodestring(clieopfile.rawdata), + filename = 'Clieop03-{0}.txt'.format(order.identification), daynumber = int(clieopfile.header.file_id[2:]), payment_order_ids = [ [6, 0, [x.id for x in clieop_export['payment_order_ids']]] @@ -375,7 +382,7 @@ class banking_export_clieop_wizard(osv.osv_memory): clieop_obj = self.pool.get('banking.export.clieop') payment_order_obj = self.pool.get('payment.order') clieop_file = clieop_obj.write( - cursor, uid, clieop_export['file_id'].id, {'state':'sent'} + cursor, uid, clieop_export['file_id'].id, {'state': 'sent'} ) wf_service = netsvc.LocalService('workflow') for order in clieop_export['payment_order_ids']: diff --git a/account_banking_nl_clieop/wizard/export_clieop_view.xml b/account_banking_nl_clieop/wizard/export_clieop_view.xml index 454560eb1..3c6754e51 100644 --- a/account_banking_nl_clieop/wizard/export_clieop_view.xml +++ b/account_banking_nl_clieop/wizard/export_clieop_view.xml @@ -6,53 +6,54 @@ banking.export.clieop.wizard form -
- - - - - - - - - - - -