Merge lp:~therp-nl/banking-addons/ba70-aggregate_payment into lp:banking-addons
- ba70-aggregate_payment
- Merge into banking-addons-70
Proposed by
Stefan Rijnhart (Opener)
Status: | Work in progress |
---|---|
Proposed branch: | lp:~therp-nl/banking-addons/ba70-aggregate_payment |
Merge into: | lp:banking-addons |
Diff against target: |
866 lines (+788/-2) 12 files modified
account_banking/res_partner_bank.py (+5/-0) account_banking_aggregate_payment/__init__.py (+1/-0) account_banking_aggregate_payment/__openerp__.py (+49/-0) account_banking_aggregate_payment/data/payment_mode_type.xml (+17/-0) account_banking_aggregate_payment/i18n/account_banking_aggregate_payment.pot (+175/-0) account_banking_aggregate_payment/i18n/nl.po (+170/-0) account_banking_aggregate_payment/model/__init__.py (+2/-0) account_banking_aggregate_payment/model/export_aggregate.py (+252/-0) account_banking_aggregate_payment/model/payment_mode.py (+35/-0) account_banking_aggregate_payment/view/export_aggregate.xml (+29/-0) account_banking_aggregate_payment/view/payment_mode.xml (+51/-0) account_banking_payment/model/account_payment.py (+2/-2) |
To merge this branch: | bzr merge lp:~therp-nl/banking-addons/ba70-aggregate_payment |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Maxime Chambreuil (http://www.savoirfairelinux.com) | code review | Approve | |
Holger Brunn (Therp) | Needs Fixing | ||
Guewen Baconnier @ Camptocamp | Needs Information | ||
Review via email: mp+178466@code.launchpad.net |
Commit message
[MIG] Aggregate payment module
Description of the change
To post a comment you must log in.
Revision history for this message
Guewen Baconnier @ Camptocamp (gbaconnier-c2c) wrote : | # |
review:
Needs Information
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote : | # |
#521 if you know where it goes wrong, please tell the user
#591 i think you shouldn't be using context_today here. That's only for passing stuff to the user
review:
Needs Fixing
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote : | # |
...forget about the comment about #591, by now I think you're doing the right thing here
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) : | # |
review:
Approve
(code review)
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote : | # |
Thanks for the pointer, Guewen. I will look into it.
- 180. By Stefan Rijnhart (Opener)
-
[MRG] parent branch
- 181. By Stefan Rijnhart (Opener)
-
[FIX] Search
Unmerged revisions
- 181. By Stefan Rijnhart (Opener)
-
[FIX] Search
- 180. By Stefan Rijnhart (Opener)
-
[MRG] parent branch
- 179. By Stefan Rijnhart (Opener)
-
[RFR] Adapt aggregate payment module to new payment order workflow
[RFR] Finetune names and references of created moves and move lines
[RFR] Adapt reference to view that moved to another module
[RFR] Remove view types as per OpenERP 7.0 API change - 178. By Stefan Rijnhart (Opener)
-
[ADD] Version 6.1 of the aggregate payment module
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_banking/res_partner_bank.py' | |||
2 | --- account_banking/res_partner_bank.py 2014-03-15 16:05:33 +0000 | |||
3 | +++ account_banking/res_partner_bank.py 2015-06-24 07:17:58 +0000 | |||
4 | @@ -68,6 +68,11 @@ | |||
5 | 68 | if bban: | 68 | if bban: |
6 | 69 | extra_terms.append( | 69 | extra_terms.append( |
7 | 70 | ('acc_number_domestic', term[1], bban)) | 70 | ('acc_number_domestic', term[1], bban)) |
8 | 71 | else: | ||
9 | 72 | result = [('acc_number', term[1], term[2])] | ||
10 | 73 | if 'acc_number_domestic' in self._columns: | ||
11 | 74 | extra_terms = [('acc_number_domestic', term[1], term[2])] | ||
12 | 75 | |||
13 | 71 | for extra_term in extra_terms: | 76 | for extra_term in extra_terms: |
14 | 72 | result = ['|'] + result + [extra_term] | 77 | result = ['|'] + result + [extra_term] |
15 | 73 | return result | 78 | return result |
16 | 74 | 79 | ||
17 | === added directory 'account_banking_aggregate_payment' | |||
18 | === added file 'account_banking_aggregate_payment/__init__.py' | |||
19 | --- account_banking_aggregate_payment/__init__.py 1970-01-01 00:00:00 +0000 | |||
20 | +++ account_banking_aggregate_payment/__init__.py 2015-06-24 07:17:58 +0000 | |||
21 | @@ -0,0 +1,1 @@ | |||
22 | 1 | import model | ||
23 | 0 | 2 | ||
24 | === added file 'account_banking_aggregate_payment/__openerp__.py' | |||
25 | --- account_banking_aggregate_payment/__openerp__.py 1970-01-01 00:00:00 +0000 | |||
26 | +++ account_banking_aggregate_payment/__openerp__.py 2015-06-24 07:17:58 +0000 | |||
27 | @@ -0,0 +1,49 @@ | |||
28 | 1 | # -*- coding: utf-8 -*- | ||
29 | 2 | ############################################################################## | ||
30 | 3 | # | ||
31 | 4 | # OpenERP, Open Source Management Solution | ||
32 | 5 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | ||
33 | 6 | # | ||
34 | 7 | # This program is free software: you can redistribute it and/or modify | ||
35 | 8 | # it under the terms of the GNU Affero General Public License as | ||
36 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
37 | 10 | # License, or (at your option) any later version. | ||
38 | 11 | # | ||
39 | 12 | # This program is distributed in the hope that it will be useful, | ||
40 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
41 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
42 | 15 | # GNU Affero General Public License for more details. | ||
43 | 16 | # | ||
44 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
45 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
46 | 19 | # | ||
47 | 20 | ############################################################################## | ||
48 | 21 | { | ||
49 | 22 | 'name': 'Account Banking Aggregate Payment', | ||
50 | 23 | 'version': '0.1.173', | ||
51 | 24 | 'license': 'AGPL-3', | ||
52 | 25 | 'author': 'Therp BV', | ||
53 | 26 | 'website': 'https://launchpad.net/banking-addons', | ||
54 | 27 | 'category': 'Banking addons', | ||
55 | 28 | 'depends': ['account_direct_debit'], | ||
56 | 29 | 'data': [ | ||
57 | 30 | 'data/payment_mode_type.xml', | ||
58 | 31 | 'view/payment_mode.xml', | ||
59 | 32 | 'view/export_aggregate.xml', | ||
60 | 33 | ], | ||
61 | 34 | 'description': ''' | ||
62 | 35 | This module allows for aggregating payments for various creditors | ||
63 | 36 | and making them payable to a single partner. This is practiced in | ||
64 | 37 | certain purchasing consortia. | ||
65 | 38 | |||
66 | 39 | After collection of the payable invoices on a payment order of type | ||
67 | 40 | 'Aggregate payment', the move lines in the payment order are | ||
68 | 41 | reconciled by a move on a transit account, the total amount of which | ||
69 | 42 | is then transferred onto the designated partner's account payable | ||
70 | 43 | (upon confirmation of the aggregate payment order). | ||
71 | 44 | |||
72 | 45 | The payment order wizard then proceeds to create a new payment order | ||
73 | 46 | of a user chosen payment mode with only the aggregate move line in it. | ||
74 | 47 | ''', | ||
75 | 48 | 'active': False, | ||
76 | 49 | } | ||
77 | 0 | 50 | ||
78 | === added directory 'account_banking_aggregate_payment/data' | |||
79 | === added file 'account_banking_aggregate_payment/data/payment_mode_type.xml' | |||
80 | --- account_banking_aggregate_payment/data/payment_mode_type.xml 1970-01-01 00:00:00 +0000 | |||
81 | +++ account_banking_aggregate_payment/data/payment_mode_type.xml 2015-06-24 07:17:58 +0000 | |||
82 | @@ -0,0 +1,17 @@ | |||
83 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
84 | 2 | <openerp> | ||
85 | 3 | <data> | ||
86 | 4 | |||
87 | 5 | <record model="payment.mode.type" | ||
88 | 6 | id="type_aggregate"> | ||
89 | 7 | <field name="name">Aggregate payment</field> | ||
90 | 8 | <field name="code">AGGR</field> | ||
91 | 9 | <field name="suitable_bank_types" | ||
92 | 10 | eval="[(6, 0, (ref('base_iban.bank_iban'), | ||
93 | 11 | ref('base.bank_normal')))]" /> | ||
94 | 12 | <field name="ir_model_id" | ||
95 | 13 | ref="model_banking_export_aggregate"/> | ||
96 | 14 | </record> | ||
97 | 15 | |||
98 | 16 | </data> | ||
99 | 17 | </openerp> | ||
100 | 0 | 18 | ||
101 | === added directory 'account_banking_aggregate_payment/i18n' | |||
102 | === added file 'account_banking_aggregate_payment/i18n/account_banking_aggregate_payment.pot' | |||
103 | --- account_banking_aggregate_payment/i18n/account_banking_aggregate_payment.pot 1970-01-01 00:00:00 +0000 | |||
104 | +++ account_banking_aggregate_payment/i18n/account_banking_aggregate_payment.pot 2015-06-24 07:17:58 +0000 | |||
105 | @@ -0,0 +1,175 @@ | |||
106 | 1 | # Translation of OpenERP Server. | ||
107 | 2 | # This file contains the translation of the following modules: | ||
108 | 3 | # * account_banking_aggregate_payment | ||
109 | 4 | # | ||
110 | 5 | msgid "" | ||
111 | 6 | msgstr "" | ||
112 | 7 | "Project-Id-Version: OpenERP Server 6.1\n" | ||
113 | 8 | "Report-Msgid-Bugs-To: \n" | ||
114 | 9 | "POT-Creation-Date: 2013-06-13 19:35+0000\n" | ||
115 | 10 | "PO-Revision-Date: 2013-06-13 19:35+0000\n" | ||
116 | 11 | "Last-Translator: <>\n" | ||
117 | 12 | "Language-Team: \n" | ||
118 | 13 | "MIME-Version: 1.0\n" | ||
119 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
120 | 15 | "Content-Transfer-Encoding: \n" | ||
121 | 16 | "Plural-Forms: \n" | ||
122 | 17 | |||
123 | 18 | #. module: account_banking_aggregate_payment | ||
124 | 19 | #: view:payment.mode:0 | ||
125 | 20 | msgid "Aggregate payment" | ||
126 | 21 | msgstr "Aggregate payment" | ||
127 | 22 | |||
128 | 23 | #. module: account_banking_aggregate_payment | ||
129 | 24 | #: view:banking.export.aggregate:0 | ||
130 | 25 | msgid "Create" | ||
131 | 26 | msgstr "Create" | ||
132 | 27 | |||
133 | 28 | #. module: account_banking_aggregate_payment | ||
134 | 29 | #: help:payment.mode,aggregate_partner_id:0 | ||
135 | 30 | msgid "The single partner on the chained payment order" | ||
136 | 31 | msgstr "The single partner on the chained payment order" | ||
137 | 32 | |||
138 | 33 | #. module: account_banking_aggregate_payment | ||
139 | 34 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:134 | ||
140 | 35 | #, python-format | ||
141 | 36 | msgid "Aggregate Payment Order %s" | ||
142 | 37 | msgstr "Aggregate Payment Order %s" | ||
143 | 38 | |||
144 | 39 | #. module: account_banking_aggregate_payment | ||
145 | 40 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:230 | ||
146 | 41 | #, python-format | ||
147 | 42 | msgid "Payment order workflow does not go into state \"done\"" | ||
148 | 43 | msgstr "Payment order workflow does not go into state \"done\"" | ||
149 | 44 | |||
150 | 45 | #. module: account_banking_aggregate_payment | ||
151 | 46 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:143 | ||
152 | 47 | #, python-format | ||
153 | 48 | msgid "No move line provided for line %s" | ||
154 | 49 | msgstr "No move line provided for line %s" | ||
155 | 50 | |||
156 | 51 | #. module: account_banking_aggregate_payment | ||
157 | 52 | #: model:ir.model,name:account_banking_aggregate_payment.model_payment_mode | ||
158 | 53 | msgid "Payment Mode" | ||
159 | 54 | msgstr "Payment Mode" | ||
160 | 55 | |||
161 | 56 | #. module: account_banking_aggregate_payment | ||
162 | 57 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:48 | ||
163 | 58 | #, python-format | ||
164 | 59 | msgid "Please only select a single payment order" | ||
165 | 60 | msgstr "Please only select a single payment order" | ||
166 | 61 | |||
167 | 62 | #. module: account_banking_aggregate_payment | ||
168 | 63 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:147 | ||
169 | 64 | #, python-format | ||
170 | 65 | msgid "Move line %s has already been paid/reconciled" | ||
171 | 66 | msgstr "Move line %s has already been paid/reconciled" | ||
172 | 67 | |||
173 | 68 | #. module: account_banking_aggregate_payment | ||
174 | 69 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:44 | ||
175 | 70 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:121 | ||
176 | 71 | #, python-format | ||
177 | 72 | msgid "Please select a payment order" | ||
178 | 73 | msgstr "Please select a payment order" | ||
179 | 74 | |||
180 | 75 | #. module: account_banking_aggregate_payment | ||
181 | 76 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:125 | ||
182 | 77 | #, python-format | ||
183 | 78 | msgid "This operation can only be performed on a single payment order" | ||
184 | 79 | msgstr "This operation can only be performed on a single payment order" | ||
185 | 80 | |||
186 | 81 | #. module: account_banking_aggregate_payment | ||
187 | 82 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:155 | ||
188 | 83 | #, python-format | ||
189 | 84 | msgid "Transit %s" | ||
190 | 85 | msgstr "Transit %s" | ||
191 | 86 | |||
192 | 87 | #. module: account_banking_aggregate_payment | ||
193 | 88 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:191 | ||
194 | 89 | #, python-format | ||
195 | 90 | msgid "Transit reconciliation" | ||
196 | 91 | msgstr "Transit reconciliation" | ||
197 | 92 | |||
198 | 93 | #. module: account_banking_aggregate_payment | ||
199 | 94 | #: view:banking.export.aggregate:0 | ||
200 | 95 | msgid "Export aggregate payment order" | ||
201 | 96 | msgstr "Export aggregate payment order" | ||
202 | 97 | |||
203 | 98 | #. module: account_banking_aggregate_payment | ||
204 | 99 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:208 | ||
205 | 100 | #, python-format | ||
206 | 101 | msgid "Amount payable" | ||
207 | 102 | msgstr "Amount payable" | ||
208 | 103 | |||
209 | 104 | #. module: account_banking_aggregate_payment | ||
210 | 105 | #: field:payment.mode,aggregate_partner_id:0 | ||
211 | 106 | msgid "Aggregate payment beneficiary" | ||
212 | 107 | msgstr "Aggregate payment beneficiary" | ||
213 | 108 | |||
214 | 109 | #. module: account_banking_aggregate_payment | ||
215 | 110 | #: help:payment.mode,chained_mode_id:0 | ||
216 | 111 | msgid "The payment type of the chained payment order" | ||
217 | 112 | msgstr "The payment type of the chained payment order" | ||
218 | 113 | |||
219 | 114 | #. module: account_banking_aggregate_payment | ||
220 | 115 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:43 | ||
221 | 116 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:47 | ||
222 | 117 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:65 | ||
223 | 118 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:71 | ||
224 | 119 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:120 | ||
225 | 120 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:124 | ||
226 | 121 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:142 | ||
227 | 122 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:146 | ||
228 | 123 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:229 | ||
229 | 124 | #, python-format | ||
230 | 125 | msgid "Error" | ||
231 | 126 | msgstr "Error" | ||
232 | 127 | |||
233 | 128 | #. module: account_banking_aggregate_payment | ||
234 | 129 | #: model:ir.model,name:account_banking_aggregate_payment.model_banking_export_aggregate | ||
235 | 130 | msgid "Execute aggregate payment" | ||
236 | 131 | msgstr "Execute aggregate payment" | ||
237 | 132 | |||
238 | 133 | #. module: account_banking_aggregate_payment | ||
239 | 134 | #: view:banking.export.aggregate:0 | ||
240 | 135 | msgid "When you confirm this order, the total amount will be made payable to the partner that has been set on the payment mode. A new payment order will open in your screen with this one payment." | ||
241 | 136 | msgstr "When you confirm this order, the total amount will be made payable to the partner that has been set on the payment mode. A new payment order will open in your screen with this one payment." | ||
242 | 137 | |||
243 | 138 | #. module: account_banking_aggregate_payment | ||
244 | 139 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:172 | ||
245 | 140 | #, python-format | ||
246 | 141 | msgid "Reconciliation %s" | ||
247 | 142 | msgstr "Reconciliation %s" | ||
248 | 143 | |||
249 | 144 | #. module: account_banking_aggregate_payment | ||
250 | 145 | #: field:banking.export.aggregate,reference:0 | ||
251 | 146 | msgid "Reference" | ||
252 | 147 | msgstr "Reference" | ||
253 | 148 | |||
254 | 149 | #. module: account_banking_aggregate_payment | ||
255 | 150 | #: field:banking.export.aggregate,payment_order_id:0 | ||
256 | 151 | msgid "Payment order" | ||
257 | 152 | msgstr "Payment order" | ||
258 | 153 | |||
259 | 154 | #. module: account_banking_aggregate_payment | ||
260 | 155 | #: field:payment.mode,chained_mode_id:0 | ||
261 | 156 | msgid "Chained payment mode" | ||
262 | 157 | msgstr "Chained payment mode" | ||
263 | 158 | |||
264 | 159 | #. module: account_banking_aggregate_payment | ||
265 | 160 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:66 | ||
266 | 161 | #, python-format | ||
267 | 162 | msgid "Cannot reconcile between different accounts" | ||
268 | 163 | msgstr "Cannot reconcile between different accounts" | ||
269 | 164 | |||
270 | 165 | #. module: account_banking_aggregate_payment | ||
271 | 166 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:72 | ||
272 | 167 | #, python-format | ||
273 | 168 | msgid "Line is already fully reconciled" | ||
274 | 169 | msgstr "Line is already fully reconciled" | ||
275 | 170 | |||
276 | 171 | #. module: account_banking_aggregate_payment | ||
277 | 172 | #: view:banking.export.aggregate:0 | ||
278 | 173 | msgid "Cancel" | ||
279 | 174 | msgstr "Cancel" | ||
280 | 175 | |||
281 | 0 | 176 | ||
282 | === added file 'account_banking_aggregate_payment/i18n/nl.po' | |||
283 | --- account_banking_aggregate_payment/i18n/nl.po 1970-01-01 00:00:00 +0000 | |||
284 | +++ account_banking_aggregate_payment/i18n/nl.po 2015-06-24 07:17:58 +0000 | |||
285 | @@ -0,0 +1,170 @@ | |||
286 | 1 | # Translation of OpenERP Server. | ||
287 | 2 | # This file contains the translation of the following modules: | ||
288 | 3 | # * account_banking_aggregate_payment | ||
289 | 4 | # | ||
290 | 5 | msgid "" | ||
291 | 6 | msgstr "" | ||
292 | 7 | "Project-Id-Version: OpenERP Server 6.1\n" | ||
293 | 8 | "Report-Msgid-Bugs-To: \n" | ||
294 | 9 | "POT-Creation-Date: 2013-06-13 19:35+0000\n" | ||
295 | 10 | "PO-Revision-Date: 2013-06-13 19:35+0000\n" | ||
296 | 11 | "Last-Translator: <stefan@therp.nl>\n" | ||
297 | 12 | "Language-Team: \n" | ||
298 | 13 | "MIME-Version: 1.0\n" | ||
299 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | ||
300 | 15 | "Content-Transfer-Encoding: \n" | ||
301 | 16 | "Plural-Forms: \n" | ||
302 | 17 | |||
303 | 18 | #. module: account_banking_aggregate_payment | ||
304 | 19 | #: view:payment.mode:0 | ||
305 | 20 | msgid "Aggregate payment" | ||
306 | 21 | msgstr "Verzamelbetaalopdracht" | ||
307 | 22 | |||
308 | 23 | #. module: account_banking_aggregate_payment | ||
309 | 24 | #: view:banking.export.aggregate:0 | ||
310 | 25 | msgid "Create" | ||
311 | 26 | msgstr "Aanmaken" | ||
312 | 27 | |||
313 | 28 | #. module: account_banking_aggregate_payment | ||
314 | 29 | #: help:payment.mode,aggregate_partner_id:0 | ||
315 | 30 | msgid "The single partner on the chained payment order" | ||
316 | 31 | msgstr "De relatie die geldt als crediteur van het verzameld bedrag" | ||
317 | 32 | |||
318 | 33 | #. module: account_banking_aggregate_payment | ||
319 | 34 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:134 | ||
320 | 35 | #, python-format | ||
321 | 36 | msgid "Aggregate Payment Order %s" | ||
322 | 37 | msgstr "Verzamelbetaling %s" | ||
323 | 38 | |||
324 | 39 | #. module: account_banking_aggregate_payment | ||
325 | 40 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:230 | ||
326 | 41 | #, python-format | ||
327 | 42 | msgid "Payment order workflow does not go into state \"done\"" | ||
328 | 43 | msgstr "De workflow van de betaalopdracht komt niet in de status \"verwerkt\"" | ||
329 | 44 | |||
330 | 45 | #. module: account_banking_aggregate_payment | ||
331 | 46 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:143 | ||
332 | 47 | #, python-format | ||
333 | 48 | msgid "No move line provided for line %s" | ||
334 | 49 | msgstr "Er is geen boeking voor regel %s" | ||
335 | 50 | |||
336 | 51 | #. module: account_banking_aggregate_payment | ||
337 | 52 | #: model:ir.model,name:account_banking_aggregate_payment.model_payment_mode | ||
338 | 53 | msgid "Payment Mode" | ||
339 | 54 | msgstr "Betaalwijze" | ||
340 | 55 | |||
341 | 56 | #. module: account_banking_aggregate_payment | ||
342 | 57 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:48 | ||
343 | 58 | #, python-format | ||
344 | 59 | msgid "Please only select a single payment order" | ||
345 | 60 | msgstr "Er kan maar één betaalopdracht worden geselecteerd" | ||
346 | 61 | |||
347 | 62 | #. module: account_banking_aggregate_payment | ||
348 | 63 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:147 | ||
349 | 64 | #, python-format | ||
350 | 65 | msgid "Move line %s has already been paid/reconciled" | ||
351 | 66 | msgstr "Boekingsregel %s is al afgeletterd" | ||
352 | 67 | |||
353 | 68 | #. module: account_banking_aggregate_payment | ||
354 | 69 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:44 | ||
355 | 70 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:121 | ||
356 | 71 | #, python-format | ||
357 | 72 | msgid "Please select a payment order" | ||
358 | 73 | msgstr "Selecteer alstublieft een betaalopdracht" | ||
359 | 74 | |||
360 | 75 | #. module: account_banking_aggregate_payment | ||
361 | 76 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:125 | ||
362 | 77 | #, python-format | ||
363 | 78 | msgid "This operation can only be performed on a single payment order" | ||
364 | 79 | msgstr "Deze bewerking kan alleen worden uitgevoerd op een enkele betaalopdracht" | ||
365 | 80 | |||
366 | 81 | #. module: account_banking_aggregate_payment | ||
367 | 82 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:155 | ||
368 | 83 | #, python-format | ||
369 | 84 | msgid "Transit %s" | ||
370 | 85 | msgstr "Tussenboeking %s" | ||
371 | 86 | |||
372 | 87 | #. module: account_banking_aggregate_payment | ||
373 | 88 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:191 | ||
374 | 89 | #, python-format | ||
375 | 90 | msgid "Transit reconciliation" | ||
376 | 91 | msgstr "Aflettering tussenboeking" | ||
377 | 92 | |||
378 | 93 | #. module: account_banking_aggregate_payment | ||
379 | 94 | #: view:banking.export.aggregate:0 | ||
380 | 95 | msgid "Export aggregate payment order" | ||
381 | 96 | msgstr "Verwerken een verzamelbetalingsopdracht" | ||
382 | 97 | |||
383 | 98 | #. module: account_banking_aggregate_payment | ||
384 | 99 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:208 | ||
385 | 100 | #, python-format | ||
386 | 101 | msgid "Amount payable" | ||
387 | 102 | msgstr "Verschuldigd bedrag" | ||
388 | 103 | |||
389 | 104 | #. module: account_banking_aggregate_payment | ||
390 | 105 | #: field:payment.mode,aggregate_partner_id:0 | ||
391 | 106 | msgid "Aggregate payment beneficiary" | ||
392 | 107 | msgstr "Begunstigde van de verzamelbetaling" | ||
393 | 108 | |||
394 | 109 | #. module: account_banking_aggregate_payment | ||
395 | 110 | #: help:payment.mode,chained_mode_id:0 | ||
396 | 111 | msgid "The payment type of the chained payment order" | ||
397 | 112 | msgstr "De betaalwijze van de gekoppelde betaalopdracht" | ||
398 | 113 | |||
399 | 114 | #. module: account_banking_aggregate_payment | ||
400 | 115 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:43 | ||
401 | 116 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:47 | ||
402 | 117 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:65 | ||
403 | 118 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:71 | ||
404 | 119 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:120 | ||
405 | 120 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:124 | ||
406 | 121 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:142 | ||
407 | 122 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:146 | ||
408 | 123 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:229 | ||
409 | 124 | #, python-format | ||
410 | 125 | msgid "Error" | ||
411 | 126 | msgstr "Fout" | ||
412 | 127 | |||
413 | 128 | #. module: account_banking_aggregate_payment | ||
414 | 129 | #: model:ir.model,name:account_banking_aggregate_payment.model_banking_export_aggregate | ||
415 | 130 | msgid "Execute aggregate payment" | ||
416 | 131 | msgstr "Verzamelbetaling boeken" | ||
417 | 132 | |||
418 | 133 | #. module: account_banking_aggregate_payment | ||
419 | 134 | #: view:banking.export.aggregate:0 | ||
420 | 135 | msgid "When you confirm this order, the total amount will be made payable to the partner that has been set on the payment mode. A new payment order will open in your screen with this one payment." | ||
421 | 136 | msgstr "Als u deze betaalopdracht bevestigd, dan wordt het totaalbedrag betaalbaar gemaakt aan de relatie die op de betaalwijze aangegeven staat. In het scherm wordt een nieuwe betaalopdracht geopend met alleen dit totaalbedrag." | ||
422 | 137 | |||
423 | 138 | #. module: account_banking_aggregate_payment | ||
424 | 139 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:172 | ||
425 | 140 | #, python-format | ||
426 | 141 | msgid "Reconciliation %s" | ||
427 | 142 | msgstr "Aflettering %s" | ||
428 | 143 | |||
429 | 144 | #. module: account_banking_aggregate_payment | ||
430 | 145 | #: field:banking.export.aggregate,payment_order_id:0 | ||
431 | 146 | msgid "Payment order" | ||
432 | 147 | msgstr "Betaalopdracht" | ||
433 | 148 | |||
434 | 149 | #. module: account_banking_aggregate_payment | ||
435 | 150 | #: field:payment.mode,chained_mode_id:0 | ||
436 | 151 | msgid "Chained payment mode" | ||
437 | 152 | msgstr "Gekoppelde betaalwijze" | ||
438 | 153 | |||
439 | 154 | #. module: account_banking_aggregate_payment | ||
440 | 155 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:66 | ||
441 | 156 | #, python-format | ||
442 | 157 | msgid "Cannot reconcile between different accounts" | ||
443 | 158 | msgstr "Kan niet afletteren tussen verschillende grootboekrekeningen" | ||
444 | 159 | |||
445 | 160 | #. module: account_banking_aggregate_payment | ||
446 | 161 | #: code:addons/account_banking_aggregate_payment/model/export_aggregate.py:72 | ||
447 | 162 | #, python-format | ||
448 | 163 | msgid "Line is already fully reconciled" | ||
449 | 164 | msgstr "De regel is al afgeletterd" | ||
450 | 165 | |||
451 | 166 | #. module: account_banking_aggregate_payment | ||
452 | 167 | #: view:banking.export.aggregate:0 | ||
453 | 168 | msgid "Cancel" | ||
454 | 169 | msgstr "Annuleer" | ||
455 | 170 | |||
456 | 0 | 171 | ||
457 | === added directory 'account_banking_aggregate_payment/model' | |||
458 | === added file 'account_banking_aggregate_payment/model/__init__.py' | |||
459 | --- account_banking_aggregate_payment/model/__init__.py 1970-01-01 00:00:00 +0000 | |||
460 | +++ account_banking_aggregate_payment/model/__init__.py 2015-06-24 07:17:58 +0000 | |||
461 | @@ -0,0 +1,2 @@ | |||
462 | 1 | import payment_mode | ||
463 | 2 | import export_aggregate | ||
464 | 0 | 3 | ||
465 | === added file 'account_banking_aggregate_payment/model/export_aggregate.py' | |||
466 | --- account_banking_aggregate_payment/model/export_aggregate.py 1970-01-01 00:00:00 +0000 | |||
467 | +++ account_banking_aggregate_payment/model/export_aggregate.py 2015-06-24 07:17:58 +0000 | |||
468 | @@ -0,0 +1,252 @@ | |||
469 | 1 | # -*- coding: utf-8 -*- | ||
470 | 2 | ############################################################################## | ||
471 | 3 | # | ||
472 | 4 | # OpenERP, Open Source Management Solution | ||
473 | 5 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | ||
474 | 6 | # | ||
475 | 7 | # This program is free software: you can redistribute it and/or modify | ||
476 | 8 | # it under the terms of the GNU Affero General Public License as | ||
477 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
478 | 10 | # License, or (at your option) any later version. | ||
479 | 11 | # | ||
480 | 12 | # This program is distributed in the hope that it will be useful, | ||
481 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
482 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
483 | 15 | # GNU Affero General Public License for more details. | ||
484 | 16 | # | ||
485 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
486 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
487 | 19 | # | ||
488 | 20 | ############################################################################## | ||
489 | 21 | |||
490 | 22 | from openerp.osv import orm, fields | ||
491 | 23 | from openerp.tools.translate import _ | ||
492 | 24 | from openerp import netsvc | ||
493 | 25 | |||
494 | 26 | |||
495 | 27 | class banking_export_aggregate(orm.TransientModel): | ||
496 | 28 | _name = 'banking.export.aggregate' | ||
497 | 29 | _description = 'Execute aggregate payment order' | ||
498 | 30 | _rec_name = 'payment_order_id' | ||
499 | 31 | |||
500 | 32 | _columns = { | ||
501 | 33 | 'payment_order_id': fields.many2one( | ||
502 | 34 | 'payment.order', 'Payment order', | ||
503 | 35 | required=True), | ||
504 | 36 | } | ||
505 | 37 | |||
506 | 38 | def create(self, cr, uid, vals, context=None): | ||
507 | 39 | if context is None: | ||
508 | 40 | context = {} | ||
509 | 41 | if not vals.get('payment_order_id'): | ||
510 | 42 | if not context.get('active_ids'): | ||
511 | 43 | raise orm.except_orm( | ||
512 | 44 | _('Error'), | ||
513 | 45 | _('Please select a payment order')) | ||
514 | 46 | if len(context['active_ids']) > 1: | ||
515 | 47 | raise orm.except_orm( | ||
516 | 48 | _('Error'), | ||
517 | 49 | _('Please only select a single payment order')) | ||
518 | 50 | vals['payment_order_id'] = context['active_ids'][0] | ||
519 | 51 | return super(banking_export_aggregate, self).create( | ||
520 | 52 | cr, uid, vals, context=context) | ||
521 | 53 | |||
522 | 54 | def reconcile_lines(self, cr, uid, move_line_ids, context=None): | ||
523 | 55 | """ | ||
524 | 56 | Reconcile move lines lines, really. ERP core functionality. | ||
525 | 57 | """ | ||
526 | 58 | reconcile_obj = self.pool.get('account.move.reconcile') | ||
527 | 59 | account_move_line_obj = self.pool.get('account.move.line') | ||
528 | 60 | currency_obj = self.pool.get('res.currency') | ||
529 | 61 | lines = account_move_line_obj.browse(cr, uid, move_line_ids, context=context) | ||
530 | 62 | |||
531 | 63 | for line in lines[1:]: | ||
532 | 64 | if line.account_id != lines[0].account_id: | ||
533 | 65 | raise orm.except_orm( | ||
534 | 66 | _('Error'), | ||
535 | 67 | _('Cannot reconcile between different accounts')) | ||
536 | 68 | |||
537 | 69 | if any([line.reconcile_id and line.reconcile_id.line_id | ||
538 | 70 | for line in lines]): | ||
539 | 71 | raise orm.except_orm( | ||
540 | 72 | _('Error'), | ||
541 | 73 | _('Line is already fully reconciled')) | ||
542 | 74 | |||
543 | 75 | currency = lines[0].company_id.currency_id | ||
544 | 76 | |||
545 | 77 | partials = [] | ||
546 | 78 | line_ids = [] | ||
547 | 79 | for line in lines: | ||
548 | 80 | if line.id not in line_ids: | ||
549 | 81 | line_ids.append(line.id) | ||
550 | 82 | if line.reconcile_partial_id: | ||
551 | 83 | line_ids += line.reconcile_partial_id.line_partial_ids | ||
552 | 84 | if line.reconcile_partial_id.id not in partials: | ||
553 | 85 | partials.append(line.reconcile_partial_id.id) | ||
554 | 86 | |||
555 | 87 | total = account_move_line_obj.get_balance(cr, uid, line_ids) | ||
556 | 88 | is_zero = currency_obj.is_zero(cr, uid, currency, total) | ||
557 | 89 | |||
558 | 90 | vals = { | ||
559 | 91 | 'type': 'auto', | ||
560 | 92 | 'line_id': is_zero and [(6, 0, line_ids)] or [(6, 0, [])], | ||
561 | 93 | 'line_partial_ids': is_zero and [(6, 0, [])] or [(6, 0, line_ids)], | ||
562 | 94 | } | ||
563 | 95 | |||
564 | 96 | if partials: | ||
565 | 97 | if len(partials) > 1: | ||
566 | 98 | reconcile_obj.unlink( | ||
567 | 99 | cr, uid, partials[1:], context=context) | ||
568 | 100 | reconcile_obj.write( | ||
569 | 101 | cr, uid, partials[0], | ||
570 | 102 | vals, context=context) | ||
571 | 103 | else: | ||
572 | 104 | reconcile_obj.create( | ||
573 | 105 | cr, uid, vals, context=context) | ||
574 | 106 | |||
575 | 107 | for line_id in line_ids: | ||
576 | 108 | netsvc.LocalService("workflow").trg_trigger( | ||
577 | 109 | uid, 'account.move.line', line_id, cr) | ||
578 | 110 | return True | ||
579 | 111 | |||
580 | 112 | def create_aggregate_order(self, cr, uid, ids, context=None): | ||
581 | 113 | wf_service = netsvc.LocalService('workflow') | ||
582 | 114 | |||
583 | 115 | def wf_trigger_check(order, state): | ||
584 | 116 | wf_service.trg_validate(uid, 'payment.order', order.id, state, cr) | ||
585 | 117 | order.refresh() | ||
586 | 118 | if order.state != state: | ||
587 | 119 | raise orm.except_orm( | ||
588 | 120 | _('Error'), | ||
589 | 121 | _('Payment order workflow does not go into state ' | ||
590 | 122 | '"%s"') % state) | ||
591 | 123 | |||
592 | 124 | account_move_line_obj = self.pool.get('account.move.line') | ||
593 | 125 | account_move_obj = self.pool.get('account.move') | ||
594 | 126 | payment_order_obj = self.pool.get('payment.order') | ||
595 | 127 | payment_order_line_obj = self.pool.get('payment.line') | ||
596 | 128 | payment_order_ids = context.get('active_ids', []) | ||
597 | 129 | if not payment_order_ids: | ||
598 | 130 | raise orm.except_orm( | ||
599 | 131 | _('Error'), | ||
600 | 132 | _('Please select a payment order')) | ||
601 | 133 | if len(payment_order_ids) > 1: | ||
602 | 134 | raise orm.except_orm( | ||
603 | 135 | _('Error'), | ||
604 | 136 | _('This operation can only be performed on a single ' | ||
605 | 137 | 'payment order')) | ||
606 | 138 | |||
607 | 139 | today = fields.date.context_today(self, cr, uid, context=context) | ||
608 | 140 | order = payment_order_obj.browse( | ||
609 | 141 | cr, uid, payment_order_ids[0], context=context) | ||
610 | 142 | |||
611 | 143 | wf_trigger_check(order, 'sent') | ||
612 | 144 | |||
613 | 145 | move_id = account_move_obj.create(cr, uid, { | ||
614 | 146 | 'journal_id': order.mode.transfer_journal_id.id, | ||
615 | 147 | 'ref': _('Aggregate Payment Order %s') % order.reference, | ||
616 | 148 | }, context=context) | ||
617 | 149 | |||
618 | 150 | line_ids = [] | ||
619 | 151 | for order_line in order.line_ids: | ||
620 | 152 | for line in order_line.transit_move_line_id.move_id.line_id: | ||
621 | 153 | if line.account_id.type == 'other': | ||
622 | 154 | account_id = line.account_id.id | ||
623 | 155 | if line.reconcile_id: | ||
624 | 156 | raise orm.except_orm( | ||
625 | 157 | _('Error'), | ||
626 | 158 | _('Transfer move line %s has already been ' | ||
627 | 159 | 'paid/reconciled') % | ||
628 | 160 | line.name | ||
629 | 161 | ) | ||
630 | 162 | line_ids.append(line.id) | ||
631 | 163 | |||
632 | 164 | # TODO: take multicurrency into account? | ||
633 | 165 | |||
634 | 166 | total = account_move_line_obj.get_balance( | ||
635 | 167 | cr, uid, line_ids) | ||
636 | 168 | |||
637 | 169 | # Write the aggregate partner on the order's counter move line | ||
638 | 170 | account_move_line_obj.write( | ||
639 | 171 | cr, uid, line_ids, | ||
640 | 172 | {'partner_id': order.mode.aggregate_partner_id.id}, | ||
641 | 173 | context=context) | ||
642 | 174 | |||
643 | 175 | # Create the counter move to the order's transit move line | ||
644 | 176 | # and reconcile | ||
645 | 177 | vals = { | ||
646 | 178 | 'name': _('Transfer reconciliation'), | ||
647 | 179 | 'move_id': move_id, | ||
648 | 180 | 'partner_id': order.mode.aggregate_partner_id.id, | ||
649 | 181 | 'account_id': account_id, | ||
650 | 182 | 'debit': total < 0 and -total or 0.0, | ||
651 | 183 | 'credit': total >= 0 and total or 0.0, | ||
652 | 184 | 'date': today, | ||
653 | 185 | } | ||
654 | 186 | |||
655 | 187 | aggregate_move_line_id = account_move_line_obj.create( | ||
656 | 188 | cr, uid, vals, context=context) | ||
657 | 189 | |||
658 | 190 | self.reconcile_lines( | ||
659 | 191 | cr, uid, line_ids + [aggregate_move_line_id], | ||
660 | 192 | context=context) | ||
661 | 193 | |||
662 | 194 | destination_account_id = ( | ||
663 | 195 | order.mode.aggregate_partner_id.property_account_receivable.id | ||
664 | 196 | if order.payment_order_type == 'debit' | ||
665 | 197 | else order.mode.aggregate_partner_id.property_account_payable.id) | ||
666 | 198 | |||
667 | 199 | # create the credit move line on the aggregate partner | ||
668 | 200 | vals.update({ | ||
669 | 201 | 'name': _('Amount payable'), | ||
670 | 202 | 'account_id': destination_account_id, | ||
671 | 203 | 'partner_id': order.mode.aggregate_partner_id.id, | ||
672 | 204 | 'debit': total >= 0 and total or 0.0, | ||
673 | 205 | 'credit': total < 0 and -total or 0.0, | ||
674 | 206 | }) | ||
675 | 207 | |||
676 | 208 | payable_move_line = account_move_line_obj.browse( | ||
677 | 209 | cr, uid, | ||
678 | 210 | account_move_line_obj.create( | ||
679 | 211 | cr, uid, vals, context=context), | ||
680 | 212 | context=context) | ||
681 | 213 | |||
682 | 214 | account_move_obj.post(cr, uid, [move_id], context=context) | ||
683 | 215 | |||
684 | 216 | wf_trigger_check(order, 'done') | ||
685 | 217 | |||
686 | 218 | payment_order_id = payment_order_obj.create( | ||
687 | 219 | cr, uid, { | ||
688 | 220 | 'company_id': order.company_id.id, | ||
689 | 221 | 'mode': order.mode.chained_mode_id.id, | ||
690 | 222 | }, context=context) | ||
691 | 223 | |||
692 | 224 | lines2bank = account_move_line_obj.line2bank( | ||
693 | 225 | cr, uid, [payable_move_line.id], order.mode.id, context) | ||
694 | 226 | |||
695 | 227 | payment_order_line_obj.create(cr, uid,{ | ||
696 | 228 | 'move_line_id': payable_move_line.id, | ||
697 | 229 | 'amount_currency': payable_move_line.amount_to_pay, | ||
698 | 230 | 'bank_id': lines2bank.get(payable_move_line.id), | ||
699 | 231 | 'order_id': payment_order_id, | ||
700 | 232 | 'partner_id': order.mode.aggregate_partner_id.id, | ||
701 | 233 | 'communication': order.reference.replace('/', ''), | ||
702 | 234 | 'communication2': False, | ||
703 | 235 | 'state': 'structured', | ||
704 | 236 | 'date': today, | ||
705 | 237 | 'currency': ( | ||
706 | 238 | order.company_id.currency_id.id), | ||
707 | 239 | }, context=context) | ||
708 | 240 | |||
709 | 241 | return { | ||
710 | 242 | 'name': payment_order_obj._description, | ||
711 | 243 | 'view_type': 'form', | ||
712 | 244 | 'view_mode': 'form', | ||
713 | 245 | 'res_model': payment_order_obj._name, | ||
714 | 246 | 'domain': [], | ||
715 | 247 | 'context': context, | ||
716 | 248 | 'type': 'ir.actions.act_window', | ||
717 | 249 | 'target': 'current', | ||
718 | 250 | 'res_id': payment_order_id, | ||
719 | 251 | 'nodestroy': True, | ||
720 | 252 | } | ||
721 | 0 | 253 | ||
722 | === added file 'account_banking_aggregate_payment/model/payment_mode.py' | |||
723 | --- account_banking_aggregate_payment/model/payment_mode.py 1970-01-01 00:00:00 +0000 | |||
724 | +++ account_banking_aggregate_payment/model/payment_mode.py 2015-06-24 07:17:58 +0000 | |||
725 | @@ -0,0 +1,35 @@ | |||
726 | 1 | # -*- coding: utf-8 -*- | ||
727 | 2 | ############################################################################## | ||
728 | 3 | # | ||
729 | 4 | # OpenERP, Open Source Management Solution | ||
730 | 5 | # This module copyright (C) 2013 Therp BV (<http://therp.nl>). | ||
731 | 6 | # | ||
732 | 7 | # This program is free software: you can redistribute it and/or modify | ||
733 | 8 | # it under the terms of the GNU Affero General Public License as | ||
734 | 9 | # published by the Free Software Foundation, either version 3 of the | ||
735 | 10 | # License, or (at your option) any later version. | ||
736 | 11 | # | ||
737 | 12 | # This program is distributed in the hope that it will be useful, | ||
738 | 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
739 | 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
740 | 15 | # GNU Affero General Public License for more details. | ||
741 | 16 | # | ||
742 | 17 | # You should have received a copy of the GNU Affero General Public License | ||
743 | 18 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
744 | 19 | # | ||
745 | 20 | ############################################################################## | ||
746 | 21 | |||
747 | 22 | from openerp.osv import orm, fields | ||
748 | 23 | |||
749 | 24 | |||
750 | 25 | class payment_mode(orm.Model): | ||
751 | 26 | _inherit = "payment.mode" | ||
752 | 27 | _columns = { | ||
753 | 28 | 'aggregate_partner_id': fields.many2one( | ||
754 | 29 | 'res.partner', 'Aggregate payment beneficiary', | ||
755 | 30 | help="The single partner on the chained payment order", | ||
756 | 31 | ), | ||
757 | 32 | 'chained_mode_id': fields.many2one( | ||
758 | 33 | 'payment.mode', 'Chained payment mode', | ||
759 | 34 | help="The payment type of the chained payment order"), | ||
760 | 35 | } | ||
761 | 0 | 36 | ||
762 | === added directory 'account_banking_aggregate_payment/view' | |||
763 | === added file 'account_banking_aggregate_payment/view/export_aggregate.xml' | |||
764 | --- account_banking_aggregate_payment/view/export_aggregate.xml 1970-01-01 00:00:00 +0000 | |||
765 | +++ account_banking_aggregate_payment/view/export_aggregate.xml 2015-06-24 07:17:58 +0000 | |||
766 | @@ -0,0 +1,29 @@ | |||
767 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
768 | 2 | <openerp> | ||
769 | 3 | <data> | ||
770 | 4 | <record id="banking_export_aggregate_view" model="ir.ui.view"> | ||
771 | 5 | <field name="name">Export aggregate payment order</field> | ||
772 | 6 | <field name="model">banking.export.aggregate</field> | ||
773 | 7 | <field name="arch" type="xml"> | ||
774 | 8 | <form string="Export aggregate payment order"> | ||
775 | 9 | <label string="When you confirm this order, the total | ||
776 | 10 | amount will be made payable to the partner | ||
777 | 11 | that has been set on the payment mode. A | ||
778 | 12 | new payment order will open in your screen | ||
779 | 13 | with this one payment."/> | ||
780 | 14 | <group col="2" colspan="1"> | ||
781 | 15 | <button icon="gtk-close" | ||
782 | 16 | special="cancel" | ||
783 | 17 | string="Cancel" | ||
784 | 18 | /> | ||
785 | 19 | <button icon="gtk-ok" | ||
786 | 20 | string="Create" | ||
787 | 21 | name="create_aggregate_order" | ||
788 | 22 | type="object" | ||
789 | 23 | /> | ||
790 | 24 | </group> | ||
791 | 25 | </form> | ||
792 | 26 | </field> | ||
793 | 27 | </record> | ||
794 | 28 | </data> | ||
795 | 29 | </openerp> | ||
796 | 0 | 30 | ||
797 | === added file 'account_banking_aggregate_payment/view/payment_mode.xml' | |||
798 | --- account_banking_aggregate_payment/view/payment_mode.xml 1970-01-01 00:00:00 +0000 | |||
799 | +++ account_banking_aggregate_payment/view/payment_mode.xml 2015-06-24 07:17:58 +0000 | |||
800 | @@ -0,0 +1,51 @@ | |||
801 | 1 | <?xml version="1.0" encoding="utf-8"?> | ||
802 | 2 | <openerp> | ||
803 | 3 | <data> | ||
804 | 4 | <record id="view_payment_mode_form" model="ir.ui.view"> | ||
805 | 5 | <field name="name">Adaptations for aggregate payment modes</field> | ||
806 | 6 | <field name="model">payment.mode</field> | ||
807 | 7 | <field name="inherit_id" | ||
808 | 8 | ref="account_banking_payment.view_payment_mode_form_inherit"/> | ||
809 | 9 | <field name="arch" type="xml"> | ||
810 | 10 | <field name="payment_term_ids" position="after"> | ||
811 | 11 | <group colspan="2" col="2" string="Aggregate payment" | ||
812 | 12 | attrs="{ | ||
813 | 13 | 'invisible': [ | ||
814 | 14 | ('type', '!=', | ||
815 | 15 | %(account_banking_aggregate_payment.type_aggregate)d | ||
816 | 16 | )]}"> | ||
817 | 17 | <field name="aggregate_partner_id" | ||
818 | 18 | attrs="{'required': [ | ||
819 | 19 | ('type', '=', | ||
820 | 20 | %(account_banking_aggregate_payment.type_aggregate)d | ||
821 | 21 | )]}" | ||
822 | 22 | /> | ||
823 | 23 | <field name="chained_mode_id" | ||
824 | 24 | attrs="{'required': [ | ||
825 | 25 | ('type', '=', | ||
826 | 26 | %(account_banking_aggregate_payment.type_aggregate)d | ||
827 | 27 | )]}" | ||
828 | 28 | /> | ||
829 | 29 | </group> | ||
830 | 30 | </field> | ||
831 | 31 | |||
832 | 32 | <field name="transfer_account_id" position="attributes"> | ||
833 | 33 | <attribute name="attrs">{ | ||
834 | 34 | 'required': [ | ||
835 | 35 | ('type', '=', | ||
836 | 36 | %(account_banking_aggregate_payment.type_aggregate)d | ||
837 | 37 | )]}</attribute> | ||
838 | 38 | </field> | ||
839 | 39 | |||
840 | 40 | <field name="transfer_journal_id" position="attributes"> | ||
841 | 41 | <attribute name="attrs">{ | ||
842 | 42 | 'required': [ | ||
843 | 43 | ('type', '=', | ||
844 | 44 | %(account_banking_aggregate_payment.type_aggregate)d | ||
845 | 45 | )]}</attribute> | ||
846 | 46 | </field> | ||
847 | 47 | |||
848 | 48 | </field> | ||
849 | 49 | </record> | ||
850 | 50 | </data> | ||
851 | 51 | </openerp> | ||
852 | 0 | 52 | ||
853 | === modified file 'account_banking_payment/model/account_payment.py' | |||
854 | --- account_banking_payment/model/account_payment.py 2014-03-18 22:51:10 +0000 | |||
855 | +++ account_banking_payment/model/account_payment.py 2015-06-24 07:17:58 +0000 | |||
856 | @@ -289,8 +289,8 @@ | |||
857 | 289 | account_move_line_obj = self.pool.get('account.move.line') | 289 | account_move_line_obj = self.pool.get('account.move.line') |
858 | 290 | payment_line_obj = self.pool.get('payment.line') | 290 | payment_line_obj = self.pool.get('payment.line') |
859 | 291 | labels = { | 291 | labels = { |
862 | 292 | 'payment': _('Payment order'), | 292 | 'payment': _('Payment'), |
863 | 293 | 'debit': _('Direct debit order'), | 293 | 'debit': _('Direct debit'), |
864 | 294 | } | 294 | } |
865 | 295 | for order in self.browse(cr, uid, ids, context=context): | 295 | for order in self.browse(cr, uid, ids, context=context): |
866 | 296 | if not order.mode.transfer_journal_id \ | 296 | if not order.mode.transfer_journal_id \ |
Is there a reason why you didn't use the account_ move_line. reconcile( ) / account_ move_line. partial_ reconcile( )?
I think there is one, but I'm curious to know why you couldn't use it (performance?).
Aside of this question, from a code point of view, sounds good to me.