← Back to team overview

banking-addons-team team mailing list archive

[Merge] lp:~endiansolutions/banking-addons/6.1-clieop_filename into lp:banking-addons

 

Erwin van der Ploeg (Endian Solutions) has proposed merging lp:~endiansolutions/banking-addons/6.1-clieop_filename into lp:banking-addons.

Requested reviews:
  Banking Addons Team (banking-addons-team)
Related bugs:
  Bug #1074102 in Banking Addons: "Clieop03 filename"
  https://bugs.launchpad.net/banking-addons/+bug/1074102

For more details, see:
https://code.launchpad.net/~endiansolutions/banking-addons/6.1-clieop_filename/+merge/141482
-- 
https://code.launchpad.net/~endiansolutions/banking-addons/6.1-clieop_filename/+merge/141482
Your team Banking Addons Team is requested to review the proposed merge of lp:~endiansolutions/banking-addons/6.1-clieop_filename into lp:banking-addons.
=== modified file 'account_banking_nl_clieop/account_banking_nl_clieop.py'
--- account_banking_nl_clieop/account_banking_nl_clieop.py	2012-03-10 13:51:08 +0000
+++ account_banking_nl_clieop/account_banking_nl_clieop.py	2012-12-30 11:14:21 +0000
@@ -61,7 +61,10 @@
         '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 @@
                 ('done', 'Reconciled'),
             ], 'State', readonly=True),
     }
+
     def get_daynr(self, cr, uid, context=None):
         '''
         Return highest day number

=== modified file 'account_banking_nl_clieop/account_banking_nl_clieop.xml'
--- account_banking_nl_clieop/account_banking_nl_clieop.xml	2011-07-21 11:30:59 +0000
+++ account_banking_nl_clieop/account_banking_nl_clieop.xml	2012-12-30 11:14:21 +0000
@@ -27,7 +27,8 @@
 			    <field name="date_generated" />
 			    <field name="testcode" />
 			    <newline />
-			    <field name="file" colspan="4" />
+                <field name="filename" invisible="True"/>
+			    <field name="file" colspan="4" filename="filename"/>
 			</page>
 			<page string="Payment Orders">
 			    <field name="payment_order_ids" colspan="4" nolabel="1">

=== modified file 'account_banking_nl_clieop/wizard/export_clieop.py'
--- account_banking_nl_clieop/wizard/export_clieop.py	2012-03-10 13:51:08 +0000
+++ account_banking_nl_clieop/wizard/export_clieop.py	2012-12-30 11:14:21 +0000
@@ -143,8 +143,11 @@
             'payment_order_id', 'Payment Orders',
             readonly=True,
             ),
+        'filename': fields.char(
+            'File Name', size=32,
+            ),
         }
-    
+
     _defaults = {
         'test': True,
         }
@@ -334,6 +337,7 @@
                 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']]]
@@ -343,6 +347,7 @@
                 filetype = order.name_transactioncode,
                 testcode = order.testcode,
                 file_id = file_id,
+                filename = 'Clieop03-{0}.txt'.format(order.identification),
                 state = 'finish',
                 ), context)
         return {
@@ -375,7 +380,7 @@
             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']:

=== modified file 'account_banking_nl_clieop/wizard/export_clieop_view.xml'
--- account_banking_nl_clieop/wizard/export_clieop_view.xml	2011-07-21 11:30:59 +0000
+++ account_banking_nl_clieop/wizard/export_clieop_view.xml	2012-12-30 11:14:21 +0000
@@ -37,8 +37,9 @@
 			<field name="prefered_date" />
 			<field name="testcode" />
 			<newline/>
+			<field name="filename" invisible="True"/>
 			<field name="file_id" />
-			<field name="file" />
+			<field name="file" filename="filename"/>
 			<newline/>
 			<button icon="gtk-close"
 				string="Cancel" 


Follow ups