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
1=== modified file 'account_banking_nl_clieop/account_banking_nl_clieop.py'
2--- account_banking_nl_clieop/account_banking_nl_clieop.py 2012-03-10 13:51:08 +0000
3+++ account_banking_nl_clieop/account_banking_nl_clieop.py 2012-12-30 11:14:21 +0000
4@@ -61,7 +61,10 @@
5 'date_generated':
6 fields.date('Generation Date', readonly=True, select=True),
7 'file':
8- fields.binary('ClieOp File', readonly=True),
9+ fields.binary('ClieOp File', readonly=True,),
10+ 'filename': fields.char(
11+ 'File Name', size=32,
12+ ),
13 'state':
14 fields.selection([
15 ('draft', 'Draft'),
16@@ -69,6 +72,7 @@
17 ('done', 'Reconciled'),
18 ], 'State', readonly=True),
19 }
20+
21 def get_daynr(self, cr, uid, context=None):
22 '''
23 Return highest day number
24
25=== modified file 'account_banking_nl_clieop/account_banking_nl_clieop.xml'
26--- account_banking_nl_clieop/account_banking_nl_clieop.xml 2011-07-21 11:30:59 +0000
27+++ account_banking_nl_clieop/account_banking_nl_clieop.xml 2012-12-30 11:14:21 +0000
28@@ -27,7 +27,8 @@
29 <field name="date_generated" />
30 <field name="testcode" />
31 <newline />
32- <field name="file" colspan="4" />
33+ <field name="filename" invisible="True"/>
34+ <field name="file" colspan="4" filename="filename"/>
35 </page>
36 <page string="Payment Orders">
37 <field name="payment_order_ids" colspan="4" nolabel="1">
38
39=== modified file 'account_banking_nl_clieop/wizard/export_clieop.py'
40--- account_banking_nl_clieop/wizard/export_clieop.py 2012-03-10 13:51:08 +0000
41+++ account_banking_nl_clieop/wizard/export_clieop.py 2012-12-30 11:14:21 +0000
42@@ -143,8 +143,11 @@
43 'payment_order_id', 'Payment Orders',
44 readonly=True,
45 ),
46+ 'filename': fields.char(
47+ 'File Name', size=32,
48+ ),
49 }
50-
51+
52 _defaults = {
53 'test': True,
54 }
55@@ -334,6 +337,7 @@
56 no_transactions = order.nr_posts,
57 testcode = order.testcode,
58 file = base64.encodestring(clieopfile.rawdata),
59+ filename = 'Clieop03-{0}.txt'.format(order.identification),
60 daynumber = int(clieopfile.header.file_id[2:]),
61 payment_order_ids = [
62 [6, 0, [x.id for x in clieop_export['payment_order_ids']]]
63@@ -343,6 +347,7 @@
64 filetype = order.name_transactioncode,
65 testcode = order.testcode,
66 file_id = file_id,
67+ filename = 'Clieop03-{0}.txt'.format(order.identification),
68 state = 'finish',
69 ), context)
70 return {
71@@ -375,7 +380,7 @@
72 clieop_obj = self.pool.get('banking.export.clieop')
73 payment_order_obj = self.pool.get('payment.order')
74 clieop_file = clieop_obj.write(
75- cursor, uid, clieop_export['file_id'].id, {'state':'sent'}
76+ cursor, uid, clieop_export['file_id'].id, {'state': 'sent'}
77 )
78 wf_service = netsvc.LocalService('workflow')
79 for order in clieop_export['payment_order_ids']:
80
81=== modified file 'account_banking_nl_clieop/wizard/export_clieop_view.xml'
82--- account_banking_nl_clieop/wizard/export_clieop_view.xml 2011-07-21 11:30:59 +0000
83+++ account_banking_nl_clieop/wizard/export_clieop_view.xml 2012-12-30 11:14:21 +0000
84@@ -37,8 +37,9 @@
85 <field name="prefered_date" />
86 <field name="testcode" />
87 <newline/>
88+ <field name="filename" invisible="True"/>
89 <field name="file_id" />
90- <field name="file" />
91+ <field name="file" filename="filename"/>
92 <newline/>
93 <button icon="gtk-close"
94 string="Cancel"

Subscribers

People subscribed via source and target branches