# -*- coding: utf-8 -*- """ Migration script pre l10n_sk_partner 19.0.2.0.4 Opravuje l10n_sk šablóny: 1. vat_registry_tax_id_external_layout: ID -> IČO, DIČ 2. report_invoice_document: IČO, DIČ pre odberateľa na faktúre """ def migrate(cr, version): # --- 1. Oprava dodávateľského bloku --- layout_template = ( '' '\n
  • ' '\n I\u010cO: ' '\n
  • ' '\n
  • ' '\n DI\u010c: ' '\n
  • ' '\n
    ' ) 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' """, (layout_template, layout_template)) # --- 2. Oprava odberateľského bloku na faktúre --- invoice_template = ( '' '\n ' '\n
    ' '\n I\u010cO: ' '\n
    ' '\n
    ' '\n DI\u010c: ' '\n
    ' '\n
    ' '\n ' '\n
    ' '\n I\u010cO: ' '\n
    ' '\n
    ' '\n DI\u010c: ' '\n
    ' '\n
    ' '\n ' '\n
    ' '\n I\u010cO: ' '\n
    ' '\n
    ' '\n DI\u010c: ' '\n
    ' '\n
    ' '\n ' '\n

    ' '\n Trade registry: ' '\n

    ' '\n
    ' '\n
    ' ) 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.report_invoice_document' """, (invoice_template, invoice_template))