Merge lp:~avanzosc/sepa-tools/6.0 into lp:sepa-tools/6.0
- 6.0
- Merge into 6.0
Proposed by
Oihane (Avanzosc)
Status: | Needs review |
---|---|
Proposed branch: | lp:~avanzosc/sepa-tools/6.0 |
Merge into: | lp:sepa-tools/6.0 |
Diff against target: |
651 lines (+354/-1) 26 files modified
account_payment_direct_debit/view/account_invoice.xml (+1/-0) account_payment_direct_debit/view/account_payment.xml (+1/-0) account_payment_direct_debit/view/payment_type.xml (+1/-0) account_payment_export/view/account_payment.xml (+1/-0) account_payment_export/view/bank_payment_manual.xml (+1/-0) account_payment_export/view/payment_mode.xml (+1/-0) account_payment_pain_base/banking_export_pain.py (+1/-1) account_payment_pain_base/company_view.xml (+1/-0) account_payment_pain_base/payment_line_view.xml (+2/-0) account_payment_pain_base/payment_mode_view.xml (+1/-0) account_payment_sepa_credit_transfer/account_banking_sepa_view.xml (+2/-0) account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml (+1/-0) account_payment_sepa_direct_debit/account_banking_sdd_view.xml (+2/-0) account_payment_sepa_direct_debit/account_invoice_view.xml (+1/-0) account_payment_sepa_direct_debit/account_payment_view.xml (+1/-0) account_payment_sepa_direct_debit/company_view.xml (+1/-0) account_payment_sepa_direct_debit/res_partner_bank_view.xml (+3/-0) account_payment_sepa_direct_debit/sdd_mandate_view.xml (+3/-0) account_payment_sepa_direct_debit/wizard/export_sdd_view.xml (+1/-0) l10n_es_iban_converter/__init__.py (+24/-0) l10n_es_iban_converter/__openerp__.py (+44/-0) l10n_es_iban_converter/i18n/base_iban_converter.pot (+48/-0) l10n_es_iban_converter/i18n/es.po (+48/-0) l10n_es_iban_converter/wizard/__init__.py (+24/-0) l10n_es_iban_converter/wizard/wizard_partner_cc_iban.py (+105/-0) l10n_es_iban_converter/wizard/wizard_partner_cc_iban_view.xml (+35/-0) |
To merge this branch: | bzr merge lp:~avanzosc/sepa-tools/6.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Pedro Manuel Baeza | code review | Approve | |
Review via email: mp+229576@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
lp:~avanzosc/sepa-tools/6.0
updated
- 11. By Oihane (Avanzosc)
-
[MOD] Format acc number
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
review:
Needs Fixing
(code review)
lp:~avanzosc/sepa-tools/6.0
updated
- 12. By Oihane (Avanzosc)
-
[MOD] Requested modifications
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote : | # |
LGTM
review:
Approve
(code review)
lp:~avanzosc/sepa-tools/6.0
updated
Unmerged revisions
- 14. By Ainara
-
[IMP] cambiar except_orm por osv.except_osv
- 13. By Ainara
-
[FIX] añadir tipo en las vistas
- 12. By Oihane (Avanzosc)
-
[MOD] Requested modifications
- 11. By Oihane (Avanzosc)
-
[MOD] Format acc number
- 10. By Oihane (Avanzosc)
-
[ADD] New module <l10n_es_
iban_converter>
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'account_payment_direct_debit/view/account_invoice.xml' |
2 | --- account_payment_direct_debit/view/account_invoice.xml 2014-02-11 18:29:05 +0000 |
3 | +++ account_payment_direct_debit/view/account_invoice.xml 2015-01-30 12:42:29 +0000 |
4 | @@ -4,6 +4,7 @@ |
5 | <record id="invoice_form" model="ir.ui.view"> |
6 | <field name="name">account.invoice.form</field> |
7 | <field name="model">account.invoice</field> |
8 | + <field name="type">form</field> |
9 | <field name="inherit_id" ref="account.invoice_form"/> |
10 | <field name="arch" type="xml"> |
11 | <data> |
12 | |
13 | === modified file 'account_payment_direct_debit/view/account_payment.xml' |
14 | --- account_payment_direct_debit/view/account_payment.xml 2014-02-11 18:29:05 +0000 |
15 | +++ account_payment_direct_debit/view/account_payment.xml 2015-01-30 12:42:29 +0000 |
16 | @@ -56,6 +56,7 @@ |
17 | <record id="view_payment_line_tree" model="ir.ui.view"> |
18 | <field name="name">Payment Lines</field> |
19 | <field name="model">payment.line</field> |
20 | + <field name="type">tree</field> |
21 | <field name="inherit_id" ref="account_payment.view_payment_line_tree"/> |
22 | <field eval="4" name="priority"/> |
23 | <field name="arch" type="xml"> |
24 | |
25 | === modified file 'account_payment_direct_debit/view/payment_type.xml' |
26 | --- account_payment_direct_debit/view/payment_type.xml 2014-02-11 18:29:05 +0000 |
27 | +++ account_payment_direct_debit/view/payment_type.xml 2015-01-30 12:42:29 +0000 |
28 | @@ -5,6 +5,7 @@ |
29 | <record model="ir.ui.view" id="view_payment_type_form_inherit"> |
30 | <field name="name">view.payment.type.form</field> |
31 | <field name="model">payment.type</field> |
32 | + <field name="type">form</field> |
33 | <field name="inherit_id" ref="account_payment_extension.view_payment_type_form"/> |
34 | <field name="arch" type="xml"> |
35 | <field name="suitable_bank_types" position="after"> |
36 | |
37 | === modified file 'account_payment_export/view/account_payment.xml' |
38 | --- account_payment_export/view/account_payment.xml 2014-02-11 18:29:05 +0000 |
39 | +++ account_payment_export/view/account_payment.xml 2015-01-30 12:42:29 +0000 |
40 | @@ -7,6 +7,7 @@ |
41 | <record id="view_banking_payment_order_form_1" model="ir.ui.view"> |
42 | <field name="name">account.payment.order.form.banking-1</field> |
43 | <field name="inherit_id" ref="account_payment.view_payment_order_form" /> |
44 | + <field name="type">form</field> |
45 | <field name="model">payment.order</field> |
46 | <field name="arch" type="xml"> |
47 | <data> |
48 | |
49 | === modified file 'account_payment_export/view/bank_payment_manual.xml' |
50 | --- account_payment_export/view/bank_payment_manual.xml 2014-02-11 18:29:05 +0000 |
51 | +++ account_payment_export/view/bank_payment_manual.xml 2015-01-30 12:42:29 +0000 |
52 | @@ -4,6 +4,7 @@ |
53 | <record id="view_payment_manual_form" model="ir.ui.view"> |
54 | <field name="name">Form for manual payment wizard</field> |
55 | <field name="model">payment.manual</field> |
56 | + <field name="type">form</field> |
57 | <field name="arch" type="xml"> |
58 | <form string="Manual payment"> |
59 | <label string="Please execute payment order manually, and click OK when succesfully sent." colspan="4"/> |
60 | |
61 | === modified file 'account_payment_export/view/payment_mode.xml' |
62 | --- account_payment_export/view/payment_mode.xml 2014-02-11 18:29:05 +0000 |
63 | +++ account_payment_export/view/payment_mode.xml 2015-01-30 12:42:29 +0000 |
64 | @@ -8,6 +8,7 @@ |
65 | <record id="view_payment_mode_tree_inherit" model="ir.ui.view"> |
66 | <field name="name">payment.mode.tree.inherit</field> |
67 | <field name="model">payment.mode</field> |
68 | + <field name="type">tree</field> |
69 | <field name="inherit_id" ref="account_payment.view_payment_mode_tree"/> |
70 | <field name="arch" type="xml"> |
71 | <field name="company_id" position="after"> |
72 | |
73 | === modified file 'account_payment_pain_base/banking_export_pain.py' |
74 | --- account_payment_pain_base/banking_export_pain.py 2014-02-11 18:29:05 +0000 |
75 | +++ account_payment_pain_base/banking_export_pain.py 2015-01-30 12:42:29 +0000 |
76 | @@ -295,7 +295,7 @@ |
77 | party_agent_bic = etree.SubElement( |
78 | party_agent_institution, gen_args.get('bic_xml_tag')) |
79 | party_agent_bic.text = bic |
80 | - except except_orm: |
81 | + except osv.except_osv: |
82 | if order == 'C': |
83 | if iban[0:2] != gen_args['initiating_party_country_code']: |
84 | raise osv.except_osv( |
85 | |
86 | === modified file 'account_payment_pain_base/company_view.xml' |
87 | --- account_payment_pain_base/company_view.xml 2014-02-11 18:29:05 +0000 |
88 | +++ account_payment_pain_base/company_view.xml 2015-01-30 12:42:29 +0000 |
89 | @@ -10,6 +10,7 @@ |
90 | <record id="view_company_form" model="ir.ui.view"> |
91 | <field name="name">pain.group.on.res.company.form</field> |
92 | <field name="model">res.company</field> |
93 | + <field name="type">form</field> |
94 | <field name="inherit_id" ref="base.view_company_form"/> |
95 | <field name="arch" type="xml"> |
96 | <page string="Configuration" position="inside"> |
97 | |
98 | === modified file 'account_payment_pain_base/payment_line_view.xml' |
99 | --- account_payment_pain_base/payment_line_view.xml 2014-02-11 18:29:05 +0000 |
100 | +++ account_payment_pain_base/payment_line_view.xml 2015-01-30 12:42:29 +0000 |
101 | @@ -10,6 +10,7 @@ |
102 | <record id="view_payment_line_form" model="ir.ui.view"> |
103 | <field name="name">pain.base.payment.line.form</field> |
104 | <field name="model">payment.line</field> |
105 | + <field name="type">form</field> |
106 | <field name="inherit_id" ref="account_payment.view_payment_line_form"/> |
107 | <field name="arch" type="xml"> |
108 | <field name="bank_id" position="after"> |
109 | @@ -25,6 +26,7 @@ |
110 | <record id="view_payment_order_form" model="ir.ui.view"> |
111 | <field name="name">pain.base.payment.line.inside.order.form</field> |
112 | <field name="model">payment.order</field> |
113 | + <field name="type">form</field> |
114 | <field name="inherit_id" ref="account_payment.view_payment_order_form"/> |
115 | <field name="arch" type="xml"> |
116 | <xpath expr="//field[@name='line_ids']/form//field[@name='bank_id']" position="after"> |
117 | |
118 | === modified file 'account_payment_pain_base/payment_mode_view.xml' |
119 | --- account_payment_pain_base/payment_mode_view.xml 2014-02-11 18:29:05 +0000 |
120 | +++ account_payment_pain_base/payment_mode_view.xml 2015-01-30 12:42:29 +0000 |
121 | @@ -10,6 +10,7 @@ |
122 | <record id="view_payment_mode_form_inherit" model="ir.ui.view"> |
123 | <field name="name">add.convert_to_ascii.in.payment.mode.form</field> |
124 | <field name="model">payment.mode</field> |
125 | + <field name="type">form</field> |
126 | <field name="inherit_id" ref="account_payment_extension.view_payment_mode_form_require_bank_account"/> |
127 | <field name="arch" type="xml"> |
128 | <field name="type" position="after"> |
129 | |
130 | === modified file 'account_payment_sepa_credit_transfer/account_banking_sepa_view.xml' |
131 | --- account_payment_sepa_credit_transfer/account_banking_sepa_view.xml 2014-02-11 18:29:05 +0000 |
132 | +++ account_payment_sepa_credit_transfer/account_banking_sepa_view.xml 2015-01-30 12:42:29 +0000 |
133 | @@ -10,6 +10,7 @@ |
134 | <record id="view_banking_export_sepa_form" model="ir.ui.view"> |
135 | <field name="name">account.banking.export.sepa.form</field> |
136 | <field name="model">banking.export.sepa</field> |
137 | + <field name="type">form</field> |
138 | <field name="arch" type="xml"> |
139 | <form string="SEPA Credit Transfer"> |
140 | <notebook> |
141 | @@ -43,6 +44,7 @@ |
142 | <record id="view_banking_export_sepa_tree" model="ir.ui.view"> |
143 | <field name="name">account.banking.export.sepa.tree</field> |
144 | <field name="model">banking.export.sepa</field> |
145 | + <field name="type">tree</field> |
146 | <field name="arch" type="xml"> |
147 | <tree string="SEPA Credit Transfer"> |
148 | <field name="filename"/> |
149 | |
150 | === modified file 'account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml' |
151 | --- account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml 2014-02-11 18:29:05 +0000 |
152 | +++ account_payment_sepa_credit_transfer/wizard/export_sepa_view.xml 2015-01-30 12:42:29 +0000 |
153 | @@ -10,6 +10,7 @@ |
154 | <record id="banking_export_sepa_wizard_view" model="ir.ui.view"> |
155 | <field name="name">banking.export.sepa.wizard.view</field> |
156 | <field name="model">banking.export.sepa.wizard</field> |
157 | + <field name="type">form</field> |
158 | <field name="arch" type="xml"> |
159 | <form string="SEPA File Generation"> |
160 | <field name="state" invisible="True"/> |
161 | |
162 | === modified file 'account_payment_sepa_direct_debit/account_banking_sdd_view.xml' |
163 | --- account_payment_sepa_direct_debit/account_banking_sdd_view.xml 2014-02-11 18:29:05 +0000 |
164 | +++ account_payment_sepa_direct_debit/account_banking_sdd_view.xml 2015-01-30 12:42:29 +0000 |
165 | @@ -10,6 +10,7 @@ |
166 | <record id="view_banking_export_sdd_form" model="ir.ui.view"> |
167 | <field name="name">account.banking.export.sdd.form</field> |
168 | <field name="model">banking.export.sdd</field> |
169 | + <field name="type">form</field> |
170 | <field name="arch" type="xml"> |
171 | <form string="SEPA Direct Debit"> |
172 | <notebook> |
173 | @@ -43,6 +44,7 @@ |
174 | <record id="view_banking_export_sdd_tree" model="ir.ui.view"> |
175 | <field name="name">account.banking.export.sdd.tree</field> |
176 | <field name="model">banking.export.sdd</field> |
177 | + <field name="type">tree</field> |
178 | <field name="arch" type="xml"> |
179 | <tree string="SEPA Direct Debit"> |
180 | <field name="filename"/> |
181 | |
182 | === modified file 'account_payment_sepa_direct_debit/account_invoice_view.xml' |
183 | --- account_payment_sepa_direct_debit/account_invoice_view.xml 2014-02-11 18:29:05 +0000 |
184 | +++ account_payment_sepa_direct_debit/account_invoice_view.xml 2015-01-30 12:42:29 +0000 |
185 | @@ -10,6 +10,7 @@ |
186 | <record id="invoice_form" model="ir.ui.view"> |
187 | <field name="name">add.sdd.mandate.on.customer.invoice.form</field> |
188 | <field name="model">account.invoice</field> |
189 | + <field name="type">form</field> |
190 | <field name="inherit_id" ref="account.invoice_form"/> |
191 | <field name="arch" type="xml"> |
192 | <field name="partner_bank_id" position="after"> |
193 | |
194 | === modified file 'account_payment_sepa_direct_debit/account_payment_view.xml' |
195 | --- account_payment_sepa_direct_debit/account_payment_view.xml 2014-02-11 18:29:05 +0000 |
196 | +++ account_payment_sepa_direct_debit/account_payment_view.xml 2015-01-30 12:42:29 +0000 |
197 | @@ -10,6 +10,7 @@ |
198 | <record id="sdd_view_payment_order_form" model="ir.ui.view"> |
199 | <field name="name">sdd.payment.order.form</field> |
200 | <field name="model">payment.order</field> |
201 | + <field name="type">form</field> |
202 | <field name="inherit_id" ref="account_payment.view_payment_order_form"/> |
203 | <field name="arch" type="xml"> |
204 | <xpath expr="//field[@name='line_ids']/form/notebook/page/field[@name='bank_id']" position="after"> |
205 | |
206 | === modified file 'account_payment_sepa_direct_debit/company_view.xml' |
207 | --- account_payment_sepa_direct_debit/company_view.xml 2014-02-11 18:29:05 +0000 |
208 | +++ account_payment_sepa_direct_debit/company_view.xml 2015-01-30 12:42:29 +0000 |
209 | @@ -10,6 +10,7 @@ |
210 | <record id="sdd_res_company_form" model="ir.ui.view"> |
211 | <field name="name">sepa_direct_debit.res.company.form</field> |
212 | <field name="model">res.company</field> |
213 | + <field name="type">form</field> |
214 | <field name="inherit_id" ref="account_payment_pain_base.view_company_form"/> |
215 | <field name="arch" type="xml"> |
216 | <field name="initiating_party_issuer" position="after"> |
217 | |
218 | === modified file 'account_payment_sepa_direct_debit/res_partner_bank_view.xml' |
219 | --- account_payment_sepa_direct_debit/res_partner_bank_view.xml 2014-02-11 18:29:05 +0000 |
220 | +++ account_payment_sepa_direct_debit/res_partner_bank_view.xml 2015-01-30 12:42:29 +0000 |
221 | @@ -10,6 +10,7 @@ |
222 | <record id="sdd_mandate_partner_bank_form" model="ir.ui.view"> |
223 | <field name="name">sdd.mandate.res.partner.bank.form</field> |
224 | <field name="model">res.partner.bank</field> |
225 | + <field name="type">form</field> |
226 | <field name="inherit_id" ref="base.view_partner_bank_form"/> |
227 | <field name="arch" type="xml"> |
228 | <field name="state_id" position="after"> |
229 | @@ -22,6 +23,7 @@ |
230 | <record id="sdd_mandate_partner_bank_tree" model="ir.ui.view"> |
231 | <field name="name">sdd.mandate.res.partner.bank.tree</field> |
232 | <field name="model">res.partner.bank</field> |
233 | + <field name="type">tree</field> |
234 | <field name="inherit_id" ref="base.view_partner_bank_tree"/> |
235 | <field name="arch" type="xml"> |
236 | <field name="partner_id" position="after"> |
237 | @@ -35,6 +37,7 @@ |
238 | <record id="sdd_mandate_partner_form" model="ir.ui.view"> |
239 | <field name="name">sdd.mandate.partner.form</field> |
240 | <field name="model">res.partner</field> |
241 | + <field name="type">form</field> |
242 | <field name="inherit_id" ref="account.view_partner_property_form"/> |
243 | <field name="arch" type="xml"> |
244 | <xpath expr="//field[@name='bank_ids']/form/field[@name='state_id']" position="after"> |
245 | |
246 | === modified file 'account_payment_sepa_direct_debit/sdd_mandate_view.xml' |
247 | --- account_payment_sepa_direct_debit/sdd_mandate_view.xml 2014-02-11 18:29:05 +0000 |
248 | +++ account_payment_sepa_direct_debit/sdd_mandate_view.xml 2015-01-30 12:42:29 +0000 |
249 | @@ -10,6 +10,7 @@ |
250 | <record id="sdd_mandate_form" model="ir.ui.view"> |
251 | <field name="name">sdd.mandate.form</field> |
252 | <field name="model">sdd.mandate</field> |
253 | + <field name="type">form</field> |
254 | <field name="arch" type="xml"> |
255 | <form string="SEPA Direct Debit Mandate"> |
256 | <group colspan="4"> |
257 | @@ -45,6 +46,7 @@ |
258 | <record id="sdd_mandate_tree" model="ir.ui.view"> |
259 | <field name="name">sdd.mandate.tree</field> |
260 | <field name="model">sdd.mandate</field> |
261 | + <field name="type">tree</field> |
262 | <field name="arch" type="xml"> |
263 | <tree string="SEPA Direct Debit Mandate" colors="blue:state=='draft';black:state in ('expired', 'cancel')"> |
264 | <field name="company_id" groups="base.group_multi_company"/> |
265 | @@ -61,6 +63,7 @@ |
266 | <record id="sdd_mandate_search" model="ir.ui.view"> |
267 | <field name="name">sdd.mandate.search</field> |
268 | <field name="model">sdd.mandate</field> |
269 | + <field name="type">search</field> |
270 | <field name="arch" type="xml"> |
271 | <search string="Search SEPA Direct Debit Mandates"> |
272 | <field name="partner_id"/> |
273 | |
274 | === modified file 'account_payment_sepa_direct_debit/wizard/export_sdd_view.xml' |
275 | --- account_payment_sepa_direct_debit/wizard/export_sdd_view.xml 2014-02-11 18:29:05 +0000 |
276 | +++ account_payment_sepa_direct_debit/wizard/export_sdd_view.xml 2015-01-30 12:42:29 +0000 |
277 | @@ -10,6 +10,7 @@ |
278 | <record id="banking_export_sdd_wizard_view" model="ir.ui.view"> |
279 | <field name="name">banking.export.sdd.wizard.view</field> |
280 | <field name="model">banking.export.sdd.wizard</field> |
281 | + <field name="type">form</field> |
282 | <field name="arch" type="xml"> |
283 | <form string="SEPA Direct Debit XML file generation"> |
284 | <field name="state" invisible="True"/> |
285 | |
286 | === added directory 'l10n_es_iban_converter' |
287 | === added file 'l10n_es_iban_converter/__init__.py' |
288 | --- l10n_es_iban_converter/__init__.py 1970-01-01 00:00:00 +0000 |
289 | +++ l10n_es_iban_converter/__init__.py 2015-01-30 12:42:29 +0000 |
290 | @@ -0,0 +1,24 @@ |
291 | +# -*- encoding: utf-8 -*- |
292 | +######################################################################## |
293 | +# |
294 | +# @authors: Ignacio Ibeas <ignacio@acysos.com> |
295 | +# Copyright (C) 2013 Acysos S.L. |
296 | +# |
297 | +#This program is free software: you can redistribute it and/or modify |
298 | +#it under the terms of the GNU General Public License as published by |
299 | +#the Free Software Foundation, either version 3 of the License, or |
300 | +#(at your option) any later version. |
301 | +# |
302 | +# This module is GPLv3 or newer and incompatible |
303 | +# with OpenERP SA "AGPL + Private Use License"! |
304 | +# |
305 | +#This program is distributed in the hope that it will be useful, |
306 | +#but WITHOUT ANY WARRANTY; without even the implied warranty of |
307 | +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
308 | +#GNU General Public License for more details. |
309 | +# |
310 | +#You should have received a copy of the GNU General Public License |
311 | +#along with this program. If not, see http://www.gnu.org/licenses. |
312 | +######################################################################## |
313 | + |
314 | +from . import wizard |
315 | |
316 | === added file 'l10n_es_iban_converter/__openerp__.py' |
317 | --- l10n_es_iban_converter/__openerp__.py 1970-01-01 00:00:00 +0000 |
318 | +++ l10n_es_iban_converter/__openerp__.py 2015-01-30 12:42:29 +0000 |
319 | @@ -0,0 +1,44 @@ |
320 | +# -*- encoding: utf-8 -*- |
321 | +######################################################################## |
322 | +# |
323 | +# @authors: Ignacio Ibeas <ignacio@acysos.com> |
324 | +# Copyright (C) 2013 Acysos S.L. |
325 | +# |
326 | +#This program is free software: you can redistribute it and/or modify |
327 | +#it under the terms of the GNU General Public License as published by |
328 | +#the Free Software Foundation, either version 3 of the License, or |
329 | +#(at your option) any later version. |
330 | +# |
331 | +# This module is GPLv3 or newer and incompatible |
332 | +# with OpenERP SA "AGPL + Private Use License"! |
333 | +# |
334 | +#This program is distributed in the hope that it will be useful, |
335 | +#but WITHOUT ANY WARRANTY; without even the implied warranty of |
336 | +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
337 | +#GNU General Public License for more details. |
338 | +# |
339 | +#You should have received a copy of the GNU General Public License |
340 | +#along with this program. If not, see http://www.gnu.org/licenses. |
341 | +######################################################################## |
342 | + |
343 | +{ |
344 | + "name": "IBAN Converter - Spanish localization", |
345 | + "version": "1.0", |
346 | + "depends": [ |
347 | + "base", |
348 | + "base_iban", |
349 | + "l10n_es_partner", |
350 | + ], |
351 | + "author": "Acysos S.L., Avanzosc S.L.", |
352 | + "website": "http://www.acysos.com, http://www.avanzosc.com", |
353 | + "category": "Tools", |
354 | + "complexity": "normal", |
355 | + "description": """ |
356 | +This module create one action in res.partner object to convert CCC to IBAN |
357 | +and vice versa. |
358 | + """, |
359 | + 'update_xml': [ |
360 | + 'wizard/wizard_partner_cc_iban_view.xml', |
361 | + ], |
362 | + 'installable': True, |
363 | +} |
364 | |
365 | === added directory 'l10n_es_iban_converter/i18n' |
366 | === added file 'l10n_es_iban_converter/i18n/base_iban_converter.pot' |
367 | --- l10n_es_iban_converter/i18n/base_iban_converter.pot 1970-01-01 00:00:00 +0000 |
368 | +++ l10n_es_iban_converter/i18n/base_iban_converter.pot 2015-01-30 12:42:29 +0000 |
369 | @@ -0,0 +1,48 @@ |
370 | +# Translation of OpenERP Server. |
371 | +# This file contains the translation of the following modules: |
372 | +# * l10n_es_iban_converter |
373 | +# |
374 | +msgid "" |
375 | +msgstr "" |
376 | +"Project-Id-Version: OpenERP Server 6.0.4\n" |
377 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
378 | +"POT-Creation-Date: 2014-08-05 08:47+0000\n" |
379 | +"PO-Revision-Date: 2014-08-05 08:47+0000\n" |
380 | +"Last-Translator: <>\n" |
381 | +"Language-Team: \n" |
382 | +"MIME-Version: 1.0\n" |
383 | +"Content-Type: text/plain; charset=UTF-8\n" |
384 | +"Content-Transfer-Encoding: \n" |
385 | +"Plural-Forms: \n" |
386 | + |
387 | +#. module: l10n_es_iban_converter |
388 | +#: model:ir.actions.act_window,name:l10n_es_iban_converter.action_partner_to_cciban |
389 | +#: view:wizard.partner.cc.iban:0 |
390 | +msgid "Convert CCC <-> IBAN" |
391 | +msgstr "" |
392 | + |
393 | +#. module: l10n_es_iban_converter |
394 | +#: view:wizard.partner.cc.iban:0 |
395 | +msgid "Ok" |
396 | +msgstr "" |
397 | + |
398 | +#. module: l10n_es_iban_converter |
399 | +#: model:ir.model,name:l10n_es_iban_converter.model_wizard_partner_cc_iban |
400 | +msgid "Wizard Partner CC IBAN" |
401 | +msgstr "" |
402 | + |
403 | +#. module: l10n_es_iban_converter |
404 | +#: view:wizard.partner.cc.iban:0 |
405 | +msgid "Cancel" |
406 | +msgstr "" |
407 | + |
408 | +#. module: l10n_es_iban_converter |
409 | +#: field:wizard.partner.cc.iban,bank_state:0 |
410 | +msgid "Bank Account Type" |
411 | +msgstr "" |
412 | + |
413 | +#. module: l10n_es_iban_converter |
414 | +#: view:wizard.partner.cc.iban:0 |
415 | +msgid "You are going to update account number in partners banks, select which type to do you want to change" |
416 | +msgstr "" |
417 | + |
418 | |
419 | === added file 'l10n_es_iban_converter/i18n/es.po' |
420 | --- l10n_es_iban_converter/i18n/es.po 1970-01-01 00:00:00 +0000 |
421 | +++ l10n_es_iban_converter/i18n/es.po 2015-01-30 12:42:29 +0000 |
422 | @@ -0,0 +1,48 @@ |
423 | +# Translation of OpenERP Server. |
424 | +# This file contains the translation of the following modules: |
425 | +# * l10n_es_iban_converter |
426 | +# |
427 | +msgid "" |
428 | +msgstr "" |
429 | +"Project-Id-Version: OpenERP Server 6.0.4\n" |
430 | +"Report-Msgid-Bugs-To: support@openerp.com\n" |
431 | +"POT-Creation-Date: 2014-08-05 08:50+0000\n" |
432 | +"PO-Revision-Date: 2014-08-05 10:57+0100\n" |
433 | +"Last-Translator: Oihane <oihanecruce@gmail.com>\n" |
434 | +"Language-Team: \n" |
435 | +"MIME-Version: 1.0\n" |
436 | +"Content-Type: text/plain; charset=UTF-8\n" |
437 | +"Content-Transfer-Encoding: 8bit\n" |
438 | +"Plural-Forms: \n" |
439 | + |
440 | +#. module: l10n_es_iban_converter |
441 | +#: model:ir.actions.act_window,name:l10n_es_iban_converter.action_partner_to_cciban |
442 | +#: view:wizard.partner.cc.iban:0 |
443 | +msgid "Convert CCC <-> IBAN" |
444 | +msgstr "Convertir CCC <-> IBAN" |
445 | + |
446 | +#. module: l10n_es_iban_converter |
447 | +#: view:wizard.partner.cc.iban:0 |
448 | +msgid "Ok" |
449 | +msgstr "Aceptar" |
450 | + |
451 | +#. module: l10n_es_iban_converter |
452 | +#: model:ir.model,name:l10n_es_iban_converter.model_wizard_partner_cc_iban |
453 | +msgid "Wizard Partner CC IBAN" |
454 | +msgstr "Wizard Partner CC IBAN" |
455 | + |
456 | +#. module: l10n_es_iban_converter |
457 | +#: view:wizard.partner.cc.iban:0 |
458 | +msgid "Cancel" |
459 | +msgstr "Cancelar" |
460 | + |
461 | +#. module: l10n_es_iban_converter |
462 | +#: field:wizard.partner.cc.iban,bank_state:0 |
463 | +msgid "Bank Account Type" |
464 | +msgstr "Tipo de cuenta de banco" |
465 | + |
466 | +#. module: l10n_es_iban_converter |
467 | +#: view:wizard.partner.cc.iban:0 |
468 | +msgid "You are going to update account number in partners banks, select which type to do you want to change" |
469 | +msgstr "Va a actualizar los números de cuenta, elija el tipo de cuenta al que quiere cambiar" |
470 | + |
471 | |
472 | === added directory 'l10n_es_iban_converter/wizard' |
473 | === added file 'l10n_es_iban_converter/wizard/__init__.py' |
474 | --- l10n_es_iban_converter/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
475 | +++ l10n_es_iban_converter/wizard/__init__.py 2015-01-30 12:42:29 +0000 |
476 | @@ -0,0 +1,24 @@ |
477 | +# -*- encoding: utf-8 -*- |
478 | +######################################################################## |
479 | +# |
480 | +# @authors: Ignacio Ibeas <ignacio@acysos.com> |
481 | +# Copyright (C) 2013 Acysos S.L. |
482 | +# |
483 | +#This program is free software: you can redistribute it and/or modify |
484 | +#it under the terms of the GNU General Public License as published by |
485 | +#the Free Software Foundation, either version 3 of the License, or |
486 | +#(at your option) any later version. |
487 | +# |
488 | +# This module is GPLv3 or newer and incompatible |
489 | +# with OpenERP SA "AGPL + Private Use License"! |
490 | +# |
491 | +#This program is distributed in the hope that it will be useful, |
492 | +#but WITHOUT ANY WARRANTY; without even the implied warranty of |
493 | +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
494 | +#GNU General Public License for more details. |
495 | +# |
496 | +#You should have received a copy of the GNU General Public License |
497 | +#along with this program. If not, see http://www.gnu.org/licenses. |
498 | +######################################################################## |
499 | + |
500 | +from . import wizard_partner_cc_iban |
501 | |
502 | === added file 'l10n_es_iban_converter/wizard/wizard_partner_cc_iban.py' |
503 | --- l10n_es_iban_converter/wizard/wizard_partner_cc_iban.py 1970-01-01 00:00:00 +0000 |
504 | +++ l10n_es_iban_converter/wizard/wizard_partner_cc_iban.py 2015-01-30 12:42:29 +0000 |
505 | @@ -0,0 +1,105 @@ |
506 | +# -*- encoding: utf-8 -*- |
507 | +######################################################################## |
508 | +# |
509 | +# @authors: Ignacio Ibeas <ignacio@acysos.com> |
510 | +# Copyright (C) 2013 Acysos S.L. |
511 | +# |
512 | +#This program is free software: you can redistribute it and/or modify |
513 | +#it under the terms of the GNU General Public License as published by |
514 | +#the Free Software Foundation, either version 3 of the License, or |
515 | +#(at your option) any later version. |
516 | +# |
517 | +# This module is GPLv3 or newer and incompatible |
518 | +# with OpenERP SA "AGPL + Private Use License"! |
519 | +# |
520 | +#This program is distributed in the hope that it will be useful, |
521 | +#but WITHOUT ANY WARRANTY; without even the implied warranty of |
522 | +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
523 | +#GNU General Public License for more details. |
524 | +# |
525 | +#You should have received a copy of the GNU General Public License |
526 | +#along with this program. If not, see http://www.gnu.org/licenses. |
527 | +######################################################################## |
528 | + |
529 | +from osv import fields, osv |
530 | + |
531 | + |
532 | +_mapping = {'A': '10', 'B': '11', 'C': '12', 'D': '13', 'E': '14', 'F': '15', |
533 | + 'G': '16', 'H': '17', 'I': '18', 'J': '19', 'K': '20', 'L': '21', |
534 | + 'M': '22', 'N': '23', 'O': '24', 'P': '25', 'Q': '26', 'R': '27', |
535 | + 'S': '28', 'T': '29', 'U': '30', 'V': '31', 'W': '32', 'X': '33', |
536 | + 'Y': '34', 'Z': '35'} |
537 | + |
538 | + |
539 | +class wizard_partner_cc_iban(osv.osv_memory): |
540 | + _name = "wizard.partner.cc.iban" |
541 | + _description = "Wizard Partner CC IBAN" |
542 | + |
543 | + def _bank_type_get(self, cr, uid, context=None): |
544 | + partner_bank_obj = self.pool.get('res.partner.bank') |
545 | + return partner_bank_obj._bank_type_get(cr, uid, context=context) |
546 | + |
547 | + _columns = { |
548 | + 'bank_state': fields.selection(_bank_type_get, 'Bank Account Type', |
549 | + required=True), |
550 | + } |
551 | + |
552 | + def update_cc_iban(self, cr, uid, ids, context=None): |
553 | + if context is None: |
554 | + context = {} |
555 | + data = self.read(cr, uid, ids, context=context)[0] |
556 | + bank_obj = self.pool.get('res.partner.bank') |
557 | + partner_obj = self.pool.get('res.partner') |
558 | + partner_ids = context.get('active_ids') |
559 | + if partner_ids: |
560 | + for partner in partner_obj.browse(cr, uid, partner_ids, |
561 | + context=context): |
562 | + if partner.bank_ids: |
563 | + for bank in partner.bank_ids: |
564 | + new_data = {} |
565 | + country = bank.acc_country_id |
566 | + if not country: |
567 | + country = bank.bank.country |
568 | + new_data['acc_country_id'] = country.id |
569 | + if bank.state == data['bank_state']: |
570 | + continue |
571 | + if bank.state == 'bank': |
572 | + iban = self.convert_to_iban(cr, uid, |
573 | + bank.acc_number, |
574 | + country.code, |
575 | + context=context) |
576 | + new_data.update( |
577 | + {'iban': iban, |
578 | + 'state': 'iban'}) |
579 | + elif bank.state == 'iban': |
580 | + ccc = self.convert_to_ccc(cr, uid, bank.iban, |
581 | + context=context) |
582 | + new_data.update( |
583 | + {'acc_number': ccc, |
584 | + 'state': 'bank'}) |
585 | + bank_obj.write(cr, uid, [bank.id], new_data, |
586 | + context=context) |
587 | + return {'type': 'ir.actions.act_window_close'} |
588 | + |
589 | + def convert_to_iban(self, cr, uid, acc_number, country_code, context=None): |
590 | + code_char = _mapping[country_code[:1]] + _mapping[country_code[1:]] |
591 | + ccc = acc_number.replace(" ", "") |
592 | + for key, replacement in _mapping.items(): |
593 | + ccc_number = ccc.replace(key, replacement) |
594 | + ccc_convert = int(ccc_number + code_char + '00') |
595 | + remainder = ccc_convert % 97 |
596 | + control_digit = 98 - remainder |
597 | + if control_digit < 10: |
598 | + control_digit = '0' + str(control_digit) |
599 | + else: |
600 | + control_digit = str(control_digit) |
601 | + iban = country_code + control_digit + str(ccc) |
602 | + return iban |
603 | + |
604 | + def convert_to_ccc(self, cr, uid, acc_number, context=None): |
605 | + ccc = acc_number.replace(" ", "") |
606 | + acc_number = ccc[4:] |
607 | + return "%s %s %s %s" % (acc_number[0:4], acc_number[4:8], |
608 | + acc_number[8:10], acc_number[10:]) |
609 | + |
610 | +wizard_partner_cc_iban() |
611 | |
612 | === added file 'l10n_es_iban_converter/wizard/wizard_partner_cc_iban_view.xml' |
613 | --- l10n_es_iban_converter/wizard/wizard_partner_cc_iban_view.xml 1970-01-01 00:00:00 +0000 |
614 | +++ l10n_es_iban_converter/wizard/wizard_partner_cc_iban_view.xml 2015-01-30 12:42:29 +0000 |
615 | @@ -0,0 +1,35 @@ |
616 | +<?xml version="1.0" encoding="UTF-8"?> |
617 | +<openerp> |
618 | + <data> |
619 | + |
620 | + <record id="wizard_partner_cc_iban_view" model="ir.ui.view"> |
621 | + <field name="name">wizard.partner.cc.iban.view</field> |
622 | + <field name="model">wizard.partner.cc.iban</field> |
623 | + <field name="type">form</field> |
624 | + <field name="arch" type="xml"> |
625 | + <form string="Convert CCC <-> IBAN"> |
626 | + <group colspan="4"> |
627 | + <separator colspan="4" /> |
628 | + <label |
629 | + string="You are going to update account number in partners banks, select which type to do you want to change" /> |
630 | + <field name="bank_state" nolabel="1" /> |
631 | + </group> |
632 | + <group colspan="4"> |
633 | + <button icon='gtk-cancel' special="cancel" |
634 | + string="Cancel" /> |
635 | + <button name="update_cc_iban" icon='gtk-ok' |
636 | + type="object" string="Ok" /> |
637 | + </group> |
638 | + </form> |
639 | + </field> |
640 | + </record> |
641 | + |
642 | + <!-- ACTION partner To CC IBAN --> |
643 | + <act_window id="action_partner_to_cciban" key2="client_action_multi" |
644 | + name="Convert CCC <-> IBAN" res_model="wizard.partner.cc.iban" |
645 | + src_model="res.partner" view_id="wizard_partner_cc_iban_view" |
646 | + view_mode="form" target="new" view_type="form" |
647 | + groups="base.group_extended" /> |
648 | + |
649 | + </data> |
650 | +</openerp> |
651 | \ No newline at end of file |
Some comments inline.