diff --git a/company_country/__manifest__.py b/company_country/__manifest__.py index a767139d1..efc46afa7 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": "12.0.1.0.1", + "version": "12.0.1.0.2", "category": "base", "website": "https://github.com/OCA/server-tools/tree/12.0/company_country", "maintainers": ['moylop260', 'luisg123v'], diff --git a/company_country/migrations/12.0.1.0.2/pre-migration.py b/company_country/migrations/12.0.1.0.2/pre-migration.py new file mode 100644 index 000000000..4ee127089 --- /dev/null +++ b/company_country/migrations/12.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 18970e5a4..235ee26d5 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 230f2b69b..a1d3375c2 100644 --- a/company_country/readme/CONTRIBUTORS.rst +++ b/company_country/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Moisés López +* Luis González