diff --git a/company_country/__manifest__.py b/company_country/__manifest__.py index f27d4f5cd..16f54cf3b 100644 --- a/company_country/__manifest__.py +++ b/company_country/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Company Country", "summary": "Set country to main company", - "version": "13.0.1.0.1", + "version": "13.0.1.0.2", "category": "base", "website": "https://github.com/OCA/server-tools/tree/13.0/company_country", "maintainers": ["moylop260", "luisg123v"], diff --git a/company_country/migrations/13.0.1.0.2/pre-migration.py b/company_country/migrations/13.0.1.0.2/pre-migration.py new file mode 100644 index 000000000..619d4bfce --- /dev/null +++ b/company_country/migrations/13.0.1.0.2/pre-migration.py @@ -0,0 +1,18 @@ +import logging + +from psycopg2.extensions import AsIs + +from odoo import tools + +_logger = logging.getLogger(__name__) + + +def migrate(cr, version): + drop_table_model_company_country(cr) + + +def drop_table_model_company_country(cr): + tablename = "company_country_config_settings" + if tools.table_exists(cr, tablename): + _logger.info("Dropping table %s", tablename) + cr.execute("DROP TABLE IF EXISTS %s;", (AsIs(tablename),)) diff --git a/company_country/models/res_config.py b/company_country/models/res_config.py index e5683d99f..044c85f8c 100644 --- a/company_country/models/res_config.py +++ b/company_country/models/res_config.py @@ -9,7 +9,7 @@ from odoo.exceptions import ValidationError _logger = logging.getLogger(__name__) -class CompanyCountryConfigSettings(models.TransientModel): +class CompanyCountryConfigSettings(models.AbstractModel): _name = "company.country.config.settings" _description = "Company Country Configuration Settings" diff --git a/company_country/readme/CONTRIBUTORS.rst b/company_country/readme/CONTRIBUTORS.rst index aecc7027e..35b8beda4 100644 --- a/company_country/readme/CONTRIBUTORS.rst +++ b/company_country/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Moisés López +* Luis González