[REF+ADD+FIX] pms_l10n_es: fix adr, revpar & cif, refactor model pms.ine.tourism.type.category.csv & add data for that model (csv)

This commit is contained in:
miguelpadin
2021-07-23 21:25:09 +02:00
parent 0e6cbe2374
commit a68677f703
8 changed files with 93 additions and 26 deletions

View File

@@ -3,5 +3,5 @@
from . import pms_property
from . import pms_log_institution_traveller_report
from . import res_country_state
from . import pms_ine_tourism_category
from . import pms_ine_tourism_type_category
from . import pms_room

View File

@@ -2,15 +2,15 @@ from odoo import fields, models
class PmsIneTourismCategory(models.Model):
_name = "pms.ine.tourism.category"
_name = "pms.ine.tourism.type.category"
_description = "Hotel category in the Ministry of Tourism. Used for INE statistics."
name = fields.Char("Category", required=True)
category_type = fields.Char("Category type", required=True)
type = fields.Char("Type", required=True)
category = fields.Char("Category", required=True)
def name_get(self):
data = []
for record in self:
display_value = record.category_type + " (" + record.name + ") "
display_value = record.category + " (" + record.type + ") "
data.append((record.id, display_value))
return data

View File

@@ -47,7 +47,7 @@ class PmsProperty(models.Model):
"Eventual Staff", default=0, help="Used for INE statistics."
)
ine_category_id = fields.Many2one(
"pms.ine.tourism.category",
"pms.ine.tourism.type.category",
help="Hotel category in the Ministry of Tourism. Used for INE statistics.",
)