Merge lp:~bas-solutions/banking-addons/6.1-clieop_filename into lp:banking-addons/6.1

Proposed by Erwin van der Ploeg (BAS Solutions)
Status: Merged
Merged at revision: 150
Proposed branch: lp:~bas-solutions/banking-addons/6.1-clieop_filename
Merge into: lp:banking-addons/6.1
Diff against target: 94 lines (+16/-5)
4 files modified
account_banking_nl_clieop/account_banking_nl_clieop.py (+5/-1)
account_banking_nl_clieop/account_banking_nl_clieop.xml (+2/-1)
account_banking_nl_clieop/wizard/export_clieop.py (+7/-2)
account_banking_nl_clieop/wizard/export_clieop_view.xml (+2/-1)
To merge this branch: bzr merge lp:~bas-solutions/banking-addons/6.1-clieop_filename
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) Approve
Review via email: mp+141482@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

Thanks! As mentioned in the previous review, I reformatted the affected XML files to remove all tabs. Additionally, I changed the second 'filename' field (on the wizard model) to a related field refering to the clieop file model, analogous to a number of other fields of the file model that are reflected in the wizard model.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== 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 @@
61 'date_generated':61 'date_generated':
62 fields.date('Generation Date', readonly=True, select=True),62 fields.date('Generation Date', readonly=True, select=True),
63 'file':63 'file':
64 fields.binary('ClieOp File', readonly=True),64 fields.binary('ClieOp File', readonly=True,),
65 'filename': fields.char(
66 'File Name', size=32,
67 ),
65 'state':68 'state':
66 fields.selection([69 fields.selection([
67 ('draft', 'Draft'),70 ('draft', 'Draft'),
@@ -69,6 +72,7 @@
69 ('done', 'Reconciled'),72 ('done', 'Reconciled'),
70 ], 'State', readonly=True),73 ], 'State', readonly=True),
71 }74 }
75
72 def get_daynr(self, cr, uid, context=None):76 def get_daynr(self, cr, uid, context=None):
73 '''77 '''
74 Return highest day number78 Return highest day number
7579
=== 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 @@
27 <field name="date_generated" />27 <field name="date_generated" />
28 <field name="testcode" />28 <field name="testcode" />
29 <newline />29 <newline />
30 <field name="file" colspan="4" />30 <field name="filename" invisible="True"/>
31 <field name="file" colspan="4" filename="filename"/>
31 </page>32 </page>
32 <page string="Payment Orders">33 <page string="Payment Orders">
33 <field name="payment_order_ids" colspan="4" nolabel="1">34 <field name="payment_order_ids" colspan="4" nolabel="1">
3435
=== 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 @@
143 'payment_order_id', 'Payment Orders',143 'payment_order_id', 'Payment Orders',
144 readonly=True,144 readonly=True,
145 ),145 ),
146 'filename': fields.char(
147 'File Name', size=32,
148 ),
146 }149 }
147 150
148 _defaults = {151 _defaults = {
149 'test': True,152 'test': True,
150 }153 }
@@ -334,6 +337,7 @@
334 no_transactions = order.nr_posts,337 no_transactions = order.nr_posts,
335 testcode = order.testcode,338 testcode = order.testcode,
336 file = base64.encodestring(clieopfile.rawdata),339 file = base64.encodestring(clieopfile.rawdata),
340 filename = 'Clieop03-{0}.txt'.format(order.identification),
337 daynumber = int(clieopfile.header.file_id[2:]),341 daynumber = int(clieopfile.header.file_id[2:]),
338 payment_order_ids = [342 payment_order_ids = [
339 [6, 0, [x.id for x in clieop_export['payment_order_ids']]]343 [6, 0, [x.id for x in clieop_export['payment_order_ids']]]
@@ -343,6 +347,7 @@
343 filetype = order.name_transactioncode,347 filetype = order.name_transactioncode,
344 testcode = order.testcode,348 testcode = order.testcode,
345 file_id = file_id,349 file_id = file_id,
350 filename = 'Clieop03-{0}.txt'.format(order.identification),
346 state = 'finish',351 state = 'finish',
347 ), context)352 ), context)
348 return {353 return {
@@ -375,7 +380,7 @@
375 clieop_obj = self.pool.get('banking.export.clieop')380 clieop_obj = self.pool.get('banking.export.clieop')
376 payment_order_obj = self.pool.get('payment.order')381 payment_order_obj = self.pool.get('payment.order')
377 clieop_file = clieop_obj.write(382 clieop_file = clieop_obj.write(
378 cursor, uid, clieop_export['file_id'].id, {'state':'sent'}383 cursor, uid, clieop_export['file_id'].id, {'state': 'sent'}
379 )384 )
380 wf_service = netsvc.LocalService('workflow')385 wf_service = netsvc.LocalService('workflow')
381 for order in clieop_export['payment_order_ids']:386 for order in clieop_export['payment_order_ids']:
382387
=== 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 @@
37 <field name="prefered_date" />37 <field name="prefered_date" />
38 <field name="testcode" />38 <field name="testcode" />
39 <newline/>39 <newline/>
40 <field name="filename" invisible="True"/>
40 <field name="file_id" />41 <field name="file_id" />
41 <field name="file" />42 <field name="file" filename="filename"/>
42 <newline/>43 <newline/>
43 <button icon="gtk-close"44 <button icon="gtk-close"
44 string="Cancel" 45 string="Cancel"

Subscribers

People subscribed via source and target branches