[IMP] company_country: Don't create DB table for model (#1791)
That model is intended only to set config and has no fields, so there is no need for creating a DB table for it. This is achieved by switching the model type from transient to abstract.pull/1805/head
parent
8e0d78ea80
commit
837369b780
|
@ -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"],
|
||||
|
|
|
@ -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),))
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
* Moisés López <moylop260@vauxoo.com>
|
||||
* Luis González <lgonzalez@vauxoo.com>
|
||||
|
|
Loading…
Reference in New Issue