feat: pridanie IČ DPH do dodávateľského bloku na faktúrach (v2.0.7)
Šablóna l10n_sk.vat_registry_tax_id_external_layout zobrazovala len IČO a DIČ. Pridaný aj IČ DPH (company.vat) ako tretia položka. Aktualizovaný aj hooks.py pre budúce čisté inštalácie. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
{
|
||||
'name': 'Slovakia - Partner DIČ',
|
||||
'version': '19.0.2.0.6',
|
||||
'version': '19.0.2.0.7',
|
||||
'category': 'Localization',
|
||||
'summary': 'Pridáva DIČ pole na kontakty a opravuje IČO label pre Slovensko',
|
||||
'description': """
|
||||
|
||||
@@ -21,6 +21,9 @@ def post_init_hook(env):
|
||||
<li t-if="company.income_tax_id and company.account_fiscal_country_id.code == 'SK'">
|
||||
DIČ: <span t-field="company.income_tax_id"/>
|
||||
</li>
|
||||
<li t-if="company.vat and company.account_fiscal_country_id.code == 'SK'">
|
||||
IČ DPH: <span t-field="company.vat"/>
|
||||
</li>
|
||||
</t>"""
|
||||
|
||||
new_template_sk = """<t t-name="l10n_sk.vat_registry_tax_id_external_layout">
|
||||
@@ -30,6 +33,9 @@ def post_init_hook(env):
|
||||
<li t-if="company.income_tax_id and company.account_fiscal_country_id.code == 'SK'">
|
||||
DIČ: <span t-field="company.income_tax_id"/>
|
||||
</li>
|
||||
<li t-if="company.vat and company.account_fiscal_country_id.code == 'SK'">
|
||||
IČ DPH: <span t-field="company.vat"/>
|
||||
</li>
|
||||
</t>"""
|
||||
|
||||
env.cr.execute("""
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Migration script pre l10n_sk_partner 19.0.2.0.7
|
||||
Pridáva IČ DPH (VAT) do dodávateľského bloku na faktúrach.
|
||||
Šablóna l10n_sk.vat_registry_tax_id_external_layout zobrazovala
|
||||
len IČO a DIČ — pridávame aj IČ DPH (company.vat).
|
||||
"""
|
||||
|
||||
TEMPLATE = (
|
||||
'<t t-name="l10n_sk.vat_registry_tax_id_external_layout">\n'
|
||||
' <li t-if="company.company_registry and company.account_fiscal_country_id.code == \'SK\'">\n'
|
||||
' IČO: <span t-field="company.company_registry"/>\n'
|
||||
' </li>\n'
|
||||
' <li t-if="company.income_tax_id and company.account_fiscal_country_id.code == \'SK\'">\n'
|
||||
' DIČ: <span t-field="company.income_tax_id"/>\n'
|
||||
' </li>\n'
|
||||
' <li t-if="company.vat and company.account_fiscal_country_id.code == \'SK\'">\n'
|
||||
' IČ DPH: <span t-field="company.vat"/>\n'
|
||||
' </li>\n'
|
||||
' </t>'
|
||||
)
|
||||
|
||||
|
||||
def migrate(cr, version):
|
||||
cr.execute("""
|
||||
UPDATE ir_ui_view
|
||||
SET arch_db = jsonb_build_object('en_US', %s, 'sk_SK', %s),
|
||||
arch_updated = true
|
||||
WHERE key = 'l10n_sk.vat_registry_tax_id_external_layout'
|
||||
""", (TEMPLATE, TEMPLATE))
|
||||
Reference in New Issue
Block a user