Skip to content

Commit efdcd14

Browse files
committed
Merge PR #564 into 8.0
Signed-off-by eLBati
2 parents eea18b6 + e649219 commit efdcd14

3 files changed

Lines changed: 5 additions & 39 deletions

File tree

l10n_it_sepa_bonifici/__openerp__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
44
{
55
'name': 'Banking SEPA Italian Credit Transfer CBI',
6-
'version': '8.0.1.0.0',
6+
'version': '8.0.1.0.1',
77
'category': 'Banking',
88
'author':
99
'Openforce di Alessandro Camilli, Odoo Community Association (OCA)',

l10n_it_sepa_bonifici/i18n/l10n_it_sepa_bonifici.pot

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ msgid "Last Updated on"
156156
msgstr ""
157157

158158
#. module: l10n_it_sepa_bonifici
159-
#: code:addons/l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py:238
159+
#: code:addons/l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py:234
160160
#: code:addons/l10n_it_sepa_bonifici/wizard/export_sepa_cbi_estero.py:301
161161
#, python-format
162162
msgid "Missing Bank Account on invoice '%s' (payment order line reference '%s')"
163163
msgstr ""
164164

165165
#. module: l10n_it_sepa_bonifici
166-
#: code:addons/l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py:260
167166
#: code:addons/l10n_it_sepa_bonifici/wizard/export_sepa_cbi_estero.py:323
168167
#, python-format
169168
msgid "Missing Country for Partner '%s' (payment order line reference '%s')"

l10n_it_sepa_bonifici/wizard/export_sepa_cbi.py

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,8 @@ def create_sepa(self):
184184
CtrlSum_node.getparent().remove(CtrlSum_node)
185185
self.generate_party_block(
186186
payment_info_2_0, 'Dbtr', 'B',
187-
'self.payment_order_ids[0].mode.bank_id.partner_id.'
188-
'name',
189-
'self.payment_order_ids[0].mode.bank_id.acc_number',
190-
'self.payment_order_ids[0].mode.bank_id.bank.bic or '
191-
'self.payment_order_ids[0].mode.bank_id.bank_bic',
192-
{'self': self}, gen_args)
187+
self.payment_order_ids[0].mode.bank_id,
188+
gen_args)
193189
charge_bearer_2_24 = etree.SubElement(payment_info_2_0, 'ChrgBr')
194190
charge_bearer_2_24.text = self.charge_bearer
195191
transactions_count_2_4 = 0
@@ -240,36 +236,7 @@ def create_sepa(self):
240236
% (line.ml_inv_ref.number, line.name))
241237
self.generate_party_block(
242238
credit_transfer_transaction_info_2_27, 'Cdtr', 'C',
243-
'line.partner_id.name', 'line.bank_id.acc_number',
244-
'line.bank_id.bank.bic', {'line': line}, gen_args)
245-
# Add info for Cross Border payment
246-
partner_creditor = line.partner_id
247-
creditor_node = credit_transfer_transaction_info_2_27\
248-
.xpath('//Cdtr')[transactions_count_1_6 - 1]
249-
creditor_address_node = etree.SubElement(creditor_node,
250-
'PstlAdr')
251-
creditor_address_country_node = etree.SubElement(
252-
creditor_address_node, 'Ctry')
253-
iso_country = False
254-
if line.bank_id.state == 'iban':
255-
iso_country = line.bank_id.iban[:2]
256-
elif partner_creditor.country_id:
257-
iso_country = partner_creditor.country_id.code
258-
if not iso_country:
259-
raise UserError(
260-
_("Missing Country for Partner '%s' (payment "
261-
"order line reference '%s')") %
262-
(line.partner_id.name, line.name))
263-
creditor_address_country_node.text = iso_country
264-
creditor_address_line_node = etree.SubElement(
265-
creditor_address_node, 'AdrLine')
266-
if partner_creditor:
267-
address = '%s %s %s' % (
268-
partner_creditor.street or '',
269-
partner_creditor.city or '',
270-
partner_creditor.country_id and
271-
partner_creditor.country_id.name or '',)
272-
creditor_address_line_node.text = address[:70]
239+
line.bank_id, gen_args)
273240

274241
self.generate_remittance_info_block(
275242
credit_transfer_transaction_info_2_27, line, gen_args)

0 commit comments

Comments
 (0)