diff --git a/l10n_cs/__init__.py b/l10n_cs/__init__.py index f71423d..6935188 100644 --- a/l10n_cs/__init__.py +++ b/l10n_cs/__init__.py @@ -1,7 +1,8 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (C) 2018 PERLUR Group (). +# Copyright (C) 2012 - 2018 PERLUR Group (). +# Copyright (C) 2018 Optimal 4 s.r.o. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,8 +19,4 @@ # ############################################################################## -def _preserve_tag_on_taxes(cr, registry): - from odoo.addons.account.models.chart_template import preserve_existing_tags_on_taxes - preserve_existing_tags_on_taxes(cr, registry, 'l10n_cs') - -import res_partner +from . import models \ No newline at end of file diff --git a/l10n_cs/__manifest__.py b/l10n_cs/__manifest__.py index 42dad32..b2c1169 100644 --- a/l10n_cs/__manifest__.py +++ b/l10n_cs/__manifest__.py @@ -1,7 +1,8 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (C) 2012 - 2017 PERLUR Group (). +# Copyright (C) 2012 - 2018 PERLUR Group (). +# Copyright (C) 2018 Optimal 4 s.r.o. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -21,26 +22,26 @@ { 'name': 'Czech - Accounting', - 'version': '2.0', + 'version': '2.1', 'category': 'Accounting', 'description': """ This is the latest Czech Odoo (OpenERP) localisation necessary to run Odoo accounting for Czech businesses with: ============================================================================================================ - a Chart Of Accounts for Czech Republic - - VAT tax structure with VATs for years 2010, 2011, 2012, 2013 and 2014 + - VAT tax structure with VATs for years 2018 - a few other adaptations""", 'author': 'PERLUR Group and Optimal4', 'price': '100', 'currency': 'EUR', 'website': 'https://go.perlur.cloud/odoo-packages/', - 'depends': ['base_iban', 'base_vat', 'l10n_multilang'], + 'depends': ['account', 'base_iban', 'base_vat', 'l10n_multilang', 'contacts'], 'data': [ 'partner_view.xml', 'data/account_type.xml', 'data/account_template_entrepreneurs.xml', 'data/account_tax_code.xml', 'data/account_chart.xml', - 'data/account_tax.xml', + 'data/account_tax_data.xml', 'data/account_fiscal_templates.xml', 'wizard/l10n_cs_wizard.xml', ], diff --git a/l10n_cs/data/account_tax.xml b/l10n_cs/data/account_tax_data.xml similarity index 100% rename from l10n_cs/data/account_tax.xml rename to l10n_cs/data/account_tax_data.xml diff --git a/l10n_cs/models/models.py b/l10n_cs/models/models.py index e720793..b10eb3a 100644 --- a/l10n_cs/models/models.py +++ b/l10n_cs/models/models.py @@ -1,7 +1,8 @@ # -*- encoding: utf-8 -*- ############################################################################## # -# Copyright (C) 2012 STOPKA Consulting s.r.o. (). +# Copyright (C) 2012 - 2018 PERLUR Group (). +# Copyright (C) 2018 Optimal 4 s.r.o. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -18,14 +19,5 @@ # ############################################################################## -from openerp.osv import fields, osv - -class res_partner(osv.osv): - _inherit = 'res.partner' - - _columns = { - 'company_registry': fields.char('Company Registry', size=64), - } - -res_partner() - + from odoo import models, fields, api + \ No newline at end of file diff --git a/l10n_cs/models/res_partner.py b/l10n_cs/models/res_partner.py index a6938f6..ca88401 100644 --- a/l10n_cs/models/res_partner.py +++ b/l10n_cs/models/res_partner.py @@ -18,14 +18,11 @@ # ############################################################################## -from openerp.osv import fields, osv +from odoo import models, fields, api -class res_partner(osv.osv): - _name = 'res.partner' - _inherit = 'res.partner' - - _columns = { - 'company_registry': fields.char('Company Registry', size=64), - } - -res_partner() +class ResPartner(models.Model): + _inherit = 'res.partner' + company_registry = fields.Char('Company Registry') + @api.model + def _company_registry(self): + return super(ResPartner, self)._company_registry() + ['company_registry']