mirror of
https://gitlab.com/flectra-community/bank-payment.git
synced 2024-11-22 13:42:07 +00:00
Automatic Update form OCA2FC Migrator
This commit is contained in:
parent
d46438712a
commit
f6542d28cc
@ -17,7 +17,7 @@ addon | version | summary
|
||||
[account_banking_sepa_direct_debit](account_banking_sepa_direct_debit/) | 2.0.1.0.4| Create SEPA files for Direct Debit
|
||||
[account_banking_sepa_credit_transfer](account_banking_sepa_credit_transfer/) | 2.0.1.0.0| Create SEPA XML files for Credit Transfers
|
||||
[account_banking_mandate_sale](account_banking_mandate_sale/) | 2.0.1.0.0| Adds mandates on sale orders
|
||||
[account_banking_pain_base](account_banking_pain_base/) | 2.0.1.0.2| Base module for PAIN file generation
|
||||
[account_banking_pain_base](account_banking_pain_base/) | 2.0.1.0.3| Base module for PAIN file generation
|
||||
[account_payment_sale](account_payment_sale/) | 2.0.1.0.2| Adds payment mode on sale orders
|
||||
[account_banking_mandate](account_banking_mandate/) | 2.0.2.0.1| Banking mandates
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
{
|
||||
'name': 'Account Banking PAIN Base Module',
|
||||
'summary': 'Base module for PAIN file generation',
|
||||
'version': '2.0.1.0.2',
|
||||
'version': '2.0.1.0.3',
|
||||
'license': 'AGPL-3',
|
||||
'author': "Akretion, "
|
||||
"Noviat, "
|
||||
|
@ -207,7 +207,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -231,7 +231,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -574,7 +574,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -218,7 +218,7 @@ msgid "Credit Card Payment "
|
||||
msgstr "Kreditkarten Zahlung "
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, fuzzy, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr "Kreditkarten Zahlung"
|
||||
@ -243,7 +243,7 @@ msgid "Debit Card Payment"
|
||||
msgstr "EC-Kartenzahlung"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -625,7 +625,7 @@ msgid "PAIN Version"
|
||||
msgstr "PAIN Version"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -217,7 +217,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -242,7 +242,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -622,7 +622,7 @@ msgid "PAIN Version"
|
||||
msgstr "Versión PAIN"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -217,7 +217,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -242,7 +242,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -605,7 +605,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -221,7 +221,7 @@ msgid "Credit Card Payment "
|
||||
msgstr "Ostala plaćanja"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, fuzzy, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr "Ostala plaćanja"
|
||||
@ -247,7 +247,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -611,7 +611,7 @@ msgid "PAIN Version"
|
||||
msgstr "PAIN verzija"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -217,7 +217,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -242,7 +242,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -605,7 +605,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -221,7 +221,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -246,7 +246,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -609,7 +609,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -219,7 +219,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -244,7 +244,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -622,7 +622,7 @@ msgid "PAIN Version"
|
||||
msgstr "PAIN Versie"
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -217,7 +217,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -242,7 +242,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -604,7 +604,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -217,7 +217,7 @@ msgid "Credit Card Payment "
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:451
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:479
|
||||
#, python-format
|
||||
msgid "Creditor name"
|
||||
msgstr ""
|
||||
@ -242,7 +242,7 @@ msgid "Debit Card Payment"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:453
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:481
|
||||
#, python-format
|
||||
msgid "Debtor name"
|
||||
msgstr ""
|
||||
@ -607,7 +607,7 @@ msgid "PAIN Version"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_banking_pain_base
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:449
|
||||
#: code:addons/account_banking_pain_base/models/account_payment_order.py:477
|
||||
#, python-format
|
||||
msgid "Partner name"
|
||||
msgstr ""
|
||||
|
@ -340,6 +340,28 @@ class AccountPaymentOrder(models.Model):
|
||||
% self.company_id.name)
|
||||
return True
|
||||
|
||||
@api.model
|
||||
def has_fininst_postal_address(self, gen_args):
|
||||
pain_flavor = gen_args.get('pain_flavor')
|
||||
return (
|
||||
pain_flavor.startswith("pain.001.001.03")
|
||||
or pain_flavor.startswith("pain.001.001.04")
|
||||
or pain_flavor.startswith("pain.001.001.05")
|
||||
or pain_flavor.startswith("pain.008.001.02")
|
||||
or pain_flavor.startswith("pain.008.001.03")
|
||||
or pain_flavor.startswith("pain.008.001.04")
|
||||
)
|
||||
|
||||
@api.model
|
||||
def generate_fininst_postal_address(self, parent_node, bank):
|
||||
if not (bank.country or bank.city):
|
||||
return
|
||||
postal_address = etree.SubElement(parent_node, 'PstlAdr')
|
||||
if bank.city:
|
||||
etree.SubElement(postal_address, 'TwnNm').text = bank.city
|
||||
if bank.country:
|
||||
etree.SubElement(postal_address, 'Ctry').text = bank.country.code
|
||||
|
||||
@api.model
|
||||
def generate_party_agent(
|
||||
self, parent_node, party_type, order, partner_bank, gen_args,
|
||||
@ -360,6 +382,9 @@ class AccountPaymentOrder(models.Model):
|
||||
party_agent_bic = etree.SubElement(
|
||||
party_agent_institution, gen_args.get('bic_xml_tag'))
|
||||
party_agent_bic.text = partner_bank.bank_bic
|
||||
if self.has_fininst_postal_address(gen_args):
|
||||
self.generate_fininst_postal_address(
|
||||
party_agent_institution, partner_bank.bank_id)
|
||||
else:
|
||||
if order == 'B' or (
|
||||
order == 'C' and gen_args['payment_method'] == 'DD'):
|
||||
@ -367,6 +392,9 @@ class AccountPaymentOrder(models.Model):
|
||||
parent_node, '%sAgt' % party_type)
|
||||
party_agent_institution = etree.SubElement(
|
||||
party_agent, 'FinInstnId')
|
||||
if self.has_fininst_postal_address(gen_args):
|
||||
self.generate_fininst_postal_address(
|
||||
party_agent_institution, partner_bank.bank_id)
|
||||
party_agent_other = etree.SubElement(
|
||||
party_agent_institution, 'Othr')
|
||||
party_agent_other_identification = etree.SubElement(
|
||||
|
Loading…
Reference in New Issue
Block a user