mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[WIP] l10n_es
This commit is contained in:
@@ -15,3 +15,10 @@ class ResCompany(models.Model):
|
||||
calculated.")
|
||||
default_cancel_policy_days = fields.Integer('Cancelation Days')
|
||||
default_cancel_policy_percent = fields.Integer('Percent to pay')
|
||||
cardex_warning = fields.Text(
|
||||
'Warning in Cardex',
|
||||
default="Time to access rooms: 14: 00h. Departure time: \
|
||||
12: 00h. If the accommodation is not left at that time, \
|
||||
the establishment will charge a day's stay according to \
|
||||
current rate that day",
|
||||
help="Notice under the signature on the traveler's ticket.")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Copyright 2017 Alexandre Díaz
|
||||
# Copyright 2017 Dario Lodeiros
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from openerp import models, fields
|
||||
from openerp import models, fields, api
|
||||
from odoo.osv.expression import get_unaccent_wrapper
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
@@ -22,3 +23,49 @@ class ResPartner(models.Model):
|
||||
|
||||
reservations_count = fields.Integer('Reservations', compute='_compute_reservations_count')
|
||||
folios_count = fields.Integer('Folios', compute='_compute_folios_count')
|
||||
|
||||
@api.model
|
||||
def name_search(self, name, args=None, operator='ilike', limit=100):
|
||||
result = super(ResPartner, self).name_search(name, args=None,
|
||||
operator='ilike',
|
||||
limit=100)
|
||||
if args is None:
|
||||
args = []
|
||||
if name and operator in ('=', 'ilike', '=ilike', 'like', '=like'):
|
||||
self.check_access_rights('read')
|
||||
where_query = self._where_calc(args)
|
||||
self._apply_ir_rules(where_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = where_query.get_sql()
|
||||
where_str = where_clause and (" WHERE %s AND " % where_clause) or ' WHERE '
|
||||
|
||||
# search on the name of the contacts and of its company
|
||||
search_name = name
|
||||
if operator in ('ilike', 'like'):
|
||||
search_name = '%%%s%%' % name
|
||||
if operator in ('=ilike', '=like'):
|
||||
operator = operator[1:]
|
||||
|
||||
unaccent = get_unaccent_wrapper(self.env.cr)
|
||||
|
||||
query = """SELECT id
|
||||
FROM res_partner
|
||||
{where} ({phone} {operator} {percent}
|
||||
OR {mobile} {operator} {percent})
|
||||
ORDER BY {display_name} {operator} {percent} desc,
|
||||
{display_name}
|
||||
""".format(where=where_str,
|
||||
operator=operator,
|
||||
phone=unaccent('phone'),
|
||||
display_name=unaccent('display_name'),
|
||||
mobile=unaccent('mobile'),
|
||||
percent=unaccent('%s'),)
|
||||
|
||||
where_clause_params += [search_name]*3
|
||||
if limit:
|
||||
query += ' limit %s'
|
||||
where_clause_params.append(limit)
|
||||
self.env.cr.execute(query, where_clause_params)
|
||||
partner_ids = [row[0] for row in self.env.cr.fetchall()]
|
||||
if partner_ids:
|
||||
result += self.browse(partner_ids).name_get()
|
||||
return result
|
||||
|
||||
@@ -7,11 +7,13 @@
|
||||
name="Action checkin"
|
||||
res_model='hotel.checkin.partner'
|
||||
view_mode="tree,form" />
|
||||
|
||||
<act_window
|
||||
id="action_checkin_partner_download"
|
||||
name="Action checkin download"
|
||||
res_model='hotel.checkin.partner'
|
||||
view_mode="form" /> <!-- Menu item to open INE Codes list -->
|
||||
view_mode="form" />
|
||||
|
||||
<menuitem
|
||||
id="menu_hotel_checkin_partner"
|
||||
name="Checkins"
|
||||
@@ -49,7 +51,6 @@
|
||||
<field name="enter_date"/>
|
||||
<field name="exit_date"/>
|
||||
<field name="reservation_id"/>
|
||||
<!-- button type="action" class="oe_stat_button" id="checkin_partner_smart_button" icon="fa-bed" /-->
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
22
hotel_l10n_es/README.rst
Normal file
22
hotel_l10n_es/README.rst
Normal file
@@ -0,0 +1,22 @@
|
||||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
|
||||
:alt: License: AGPL-3
|
||||
|
||||
Alda Hotels PMS-Checkin
|
||||
=============
|
||||
Checkin for Alda Hostels
|
||||
|
||||
|
||||
Use
|
||||
===
|
||||
Instal in Odoo and checkin
|
||||
|
||||
Remember to complete the "hotel settings" configuration fields in the company file.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Creator
|
||||
------------
|
||||
|
||||
* Jose Luis Algara
|
||||
* Darío Lodeiros
|
||||
24
hotel_l10n_es/__init__.py
Normal file
24
hotel_l10n_es/__init__.py
Normal file
@@ -0,0 +1,24 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import models
|
||||
from . import wizard
|
||||
64
hotel_l10n_es/__manifest__.py
Normal file
64
hotel_l10n_es/__manifest__.py
Normal file
@@ -0,0 +1,64 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
|
||||
{
|
||||
'name': 'Hotel l10n_es',
|
||||
'version': '9.0.0.3',
|
||||
'author': "Jose Luis Algara",
|
||||
'website': "http://www.aldahotels.com",
|
||||
'category': 'Hotel',
|
||||
'summary': "",
|
||||
'description': "",
|
||||
'depends': [
|
||||
'hotel',
|
||||
'partner_contact_gender',
|
||||
'partner_contact_birthdate',
|
||||
'partner_firstname',
|
||||
],
|
||||
'data': [
|
||||
'data/code_ine.csv',
|
||||
'data/category_tourism.csv',
|
||||
'data/report_viajero_paperformat.xml',
|
||||
'report/report_parte_viajero.xml',
|
||||
'views/report_viajero.xml',
|
||||
'wizard/police_wizard.xml',
|
||||
'wizard/ine_wizard.xml',
|
||||
'wizard/inherit_checkin_wizard.xml',
|
||||
'views/category_tourism.xml',
|
||||
'views/code_ine.xml',
|
||||
'views/inherit_res_company.xml',
|
||||
'views/inherit_hotel_checkin_partner_views.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'views/inherit_res_partner.xml',
|
||||
'views/report_viajero_document.xml',
|
||||
'views/report_viajero.xml',
|
||||
'static/src/xml/hotel_l10n_es_templates.xml'
|
||||
],
|
||||
'test': [
|
||||
],
|
||||
'css': ['static/src/css/hotel_l10n_es.css'],
|
||||
'installable': True,
|
||||
'auto_install': False,
|
||||
'application': False,
|
||||
'license': 'AGPL-3',
|
||||
}
|
||||
54
hotel_l10n_es/data/category_tourism.csv
Normal file
54
hotel_l10n_es/data/category_tourism.csv
Normal file
@@ -0,0 +1,54 @@
|
||||
"id","name","category_type"
|
||||
"__export__.category_1","H1","Hoteles"
|
||||
"__export__.category_2","H2","Hoteles"
|
||||
"__export__.category_3","H3","Hoteles"
|
||||
"__export__.category_4","H4","Hoteles"
|
||||
"__export__.category_5","H5","Hoteles"
|
||||
"__export__.category_6","AP","Hoteles-apartamentos"
|
||||
"__export__.category_7","HA","Hoteles-apartamentos"
|
||||
"__export__.category_8","HA1","Hoteles-apartamentos"
|
||||
"__export__.category_9","HA2","Hoteles-apartamentos"
|
||||
"__export__.category_10","HA3","Hoteles-apartamentos"
|
||||
"__export__.category_11","HA4","Hoteles-apartamentos"
|
||||
"__export__.category_12","HA5","Hoteles-apartamentos"
|
||||
"__export__.category_13","HR","Hoteles-residencias"
|
||||
"__export__.category_14","HR1","Hoteles-residencias"
|
||||
"__export__.category_15","HR2","Hoteles-residencias"
|
||||
"__export__.category_16","HR3","Hoteles-residencias"
|
||||
"__export__.category_17","HR4","Hoteles-residencias"
|
||||
"__export__.category_18","HR5","Hoteles-residencias"
|
||||
"__export__.category_19","M1","Moteles"
|
||||
"__export__.category_20","M2","Moteles"
|
||||
"__export__.category_21","M3","Moteles"
|
||||
"__export__.category_22","PN3","Paradores Nacionales"
|
||||
"__export__.category_23","PN4","Paradores Nacionales"
|
||||
"__export__.category_24","PN5","Paradores Nacionales"
|
||||
"__export__.category_25","CV1","Ciudades de vacaciones"
|
||||
"__export__.category_26","CV2","Ciudades de vacaciones"
|
||||
"__export__.category_27","CV3","Ciudades de vacaciones"
|
||||
"__export__.category_28","RA1","Residencias-apartamentos"
|
||||
"__export__.category_29","RA2","Residencias-apartamentos"
|
||||
"__export__.category_30","RA3","Residencias-apartamentos"
|
||||
"__export__.category_31","RA4","Residencias-apartamentos"
|
||||
"__export__.category_32","HS","Hostales"
|
||||
"__export__.category_33","HS1","Hostales"
|
||||
"__export__.category_34","HS2","Hostales"
|
||||
"__export__.category_35","HS3","Hostales"
|
||||
"__export__.category_36","HSR","Hostales"
|
||||
"__export__.category_37","HSR1","Hostales"
|
||||
"__export__.category_38","HSR2","Hostales"
|
||||
"__export__.category_39","HSR3","Hostales"
|
||||
"__export__.category_40","HSE","Hostales generales"
|
||||
"__export__.category_41","HSG","Hostales especiales"
|
||||
"__export__.category_42","CH","Casas de Huéspedes"
|
||||
"__export__.category_43","CH1","Casas de Huéspedes"
|
||||
"__export__.category_44","F1","Fondas"
|
||||
"__export__.category_45","F2","Fondas"
|
||||
"__export__.category_46","F3","Fondas"
|
||||
"__export__.category_47","P","Pensiones"
|
||||
"__export__.category_48","P1","Pensiones"
|
||||
"__export__.category_49","P2","Pensiones"
|
||||
"__export__.category_50","P3","Pensiones"
|
||||
"__export__.category_51","PA","Pensiones"
|
||||
"__export__.category_52","PT","Pensiones"
|
||||
"__export__.category_53","Otras","Otros"
|
||||
|
309
hotel_l10n_es/data/code_ine.csv
Normal file
309
hotel_l10n_es/data/code_ine.csv
Normal file
@@ -0,0 +1,309 @@
|
||||
"id","code","name"
|
||||
"__export__.code_ine_1","AFG","Afganistán"
|
||||
"__export__.code_ine_2","ALB","Albania"
|
||||
"__export__.code_ine_3","DEU","Alemania"
|
||||
"__export__.code_ine_4","AND","Andorra"
|
||||
"__export__.code_ine_5","AGO","Angola"
|
||||
"__export__.code_ine_6","AIA","Anguila"
|
||||
"__export__.code_ine_7","ATG","Antigua y Barbuda"
|
||||
"__export__.code_ine_8","ANT","Antillas Neerlandesas"
|
||||
"__export__.code_ine_9","ATA","Antártida"
|
||||
"__export__.code_ine_10","SAU","Arabia Saudita"
|
||||
"__export__.code_ine_11","DZA","Argelia"
|
||||
"__export__.code_ine_12","ARG","Argentina"
|
||||
"__export__.code_ine_13","ARM","Armenia"
|
||||
"__export__.code_ine_14","ABW","Aruba"
|
||||
"__export__.code_ine_15","AUS","Australia"
|
||||
"__export__.code_ine_16","AUT","Austria"
|
||||
"__export__.code_ine_17","AZE","Azerbaiyán"
|
||||
"__export__.code_ine_18","BHS","Bahamas"
|
||||
"__export__.code_ine_19","BHR","Bahrein"
|
||||
"__export__.code_ine_20","BGD","Bangladesh"
|
||||
"__export__.code_ine_21","BRB","Barbados"
|
||||
"__export__.code_ine_22","BLZ","Belice"
|
||||
"__export__.code_ine_23","BEN","Benin"
|
||||
"__export__.code_ine_24","BMU","Bermudas"
|
||||
"__export__.code_ine_25","BTN","Bhután"
|
||||
"__export__.code_ine_26","BLR","Bielorrusia"
|
||||
"__export__.code_ine_27","BOL","Bolivia"
|
||||
"__export__.code_ine_28","BIH","Bosnia-Herzegovina"
|
||||
"__export__.code_ine_29","BWA","Botswana"
|
||||
"__export__.code_ine_30","BRA","Brasil"
|
||||
"__export__.code_ine_31","BRN","Brunéi"
|
||||
"__export__.code_ine_32","BGR","Bulgaria"
|
||||
"__export__.code_ine_33","BFA","Burkina Fasso"
|
||||
"__export__.code_ine_34","BDI","Burundi"
|
||||
"__export__.code_ine_35","BEL","Bélgica"
|
||||
"__export__.code_ine_36","CPV","Cabo Verde"
|
||||
"__export__.code_ine_37","KHM","Camboya"
|
||||
"__export__.code_ine_38","CMR","Camerún"
|
||||
"__export__.code_ine_39","CAN","Canadá"
|
||||
"__export__.code_ine_40","TCD","Chad"
|
||||
"__export__.code_ine_41","CHL","Chile"
|
||||
"__export__.code_ine_42","CHN","China"
|
||||
"__export__.code_ine_43","CYP","Chipre"
|
||||
"__export__.code_ine_44","COL","Colombia"
|
||||
"__export__.code_ine_45","COM","Comoras"
|
||||
"__export__.code_ine_46","COG","Congo, República del"
|
||||
"__export__.code_ine_47","COD","Congo, República Democrática del"
|
||||
"__export__.code_ine_48","PRK","Corea, Rep. Popular Democrática"
|
||||
"__export__.code_ine_49","KOR","Corea, República de"
|
||||
"__export__.code_ine_50","CIV","Costa de Marfil"
|
||||
"__export__.code_ine_51","CRI","Costa Rica"
|
||||
"__export__.code_ine_52","HRV","Croacia"
|
||||
"__export__.code_ine_53","CUB","Cuba"
|
||||
"__export__.code_ine_54","DNK","Dinamarca"
|
||||
"__export__.code_ine_55","DMA","Dominica"
|
||||
"__export__.code_ine_56","ECU","Ecuador"
|
||||
"__export__.code_ine_57","EGY","Egipto"
|
||||
"__export__.code_ine_58","SLV","El Salvador"
|
||||
"__export__.code_ine_59","ARE","Emiratos Arabes Unidos"
|
||||
"__export__.code_ine_60","ERI","Eritrea"
|
||||
"__export__.code_ine_61","SVK","Eslovaquia"
|
||||
"__export__.code_ine_62","SVN","Eslovenia"
|
||||
"__export__.code_ine_63","USA","Estados Unidos de América"
|
||||
"__export__.code_ine_64","EST","Estonia"
|
||||
"__export__.code_ine_65","ETH","Etiopía"
|
||||
"__export__.code_ine_66","PHL","Filipinas"
|
||||
"__export__.code_ine_67","FIN","Finlandia"
|
||||
"__export__.code_ine_68","FRA","Francia"
|
||||
"__export__.code_ine_69","GAB","Gabón"
|
||||
"__export__.code_ine_70","GMB","Gambia"
|
||||
"__export__.code_ine_71","GEO","Georgia"
|
||||
"__export__.code_ine_72","GHA","Ghana"
|
||||
"__export__.code_ine_73","GIB","Gibraltar"
|
||||
"__export__.code_ine_74","GRD","Granada"
|
||||
"__export__.code_ine_75","GRC","Grecia"
|
||||
"__export__.code_ine_76","GRL","Groenlandia"
|
||||
"__export__.code_ine_77","GLP","Guadalupe"
|
||||
"__export__.code_ine_78","GUM","Guam"
|
||||
"__export__.code_ine_79","GTM","Guatemala"
|
||||
"__export__.code_ine_80","GUF","Guayana Francesa"
|
||||
"__export__.code_ine_81","GIN","Guinea"
|
||||
"__export__.code_ine_82","GNQ","Guinea Ecuatorial"
|
||||
"__export__.code_ine_83","GNB","Guinea-Bissau"
|
||||
"__export__.code_ine_84","GUY","Guyana"
|
||||
"__export__.code_ine_85","HTI","Haití"
|
||||
"__export__.code_ine_86","HND","Honduras"
|
||||
"__export__.code_ine_87","HKG","Hong-Kong"
|
||||
"__export__.code_ine_88","HUN","Hungría"
|
||||
"__export__.code_ine_89","IND","India"
|
||||
"__export__.code_ine_90","IDN","Indonesia"
|
||||
"__export__.code_ine_91","IRQ","Irak"
|
||||
"__export__.code_ine_92","IRL","Irlanda"
|
||||
"__export__.code_ine_93","IRN","Irán"
|
||||
"__export__.code_ine_94","BVT","Isla Bouvert"
|
||||
"__export__.code_ine_95","GGY","Isla de Guernesey"
|
||||
"__export__.code_ine_96","JEY","Isla de Jersey"
|
||||
"__export__.code_ine_97","IMN","Isla de Man"
|
||||
"__export__.code_ine_98","CXR","Isla de Navidad"
|
||||
"__export__.code_ine_99","ISL","Islandia"
|
||||
"__export__.code_ine_100","CYM","Islas Caimán"
|
||||
"__export__.code_ine_101","CCK","Islas Cocos"
|
||||
"__export__.code_ine_102","COK","Islas Cook"
|
||||
"__export__.code_ine_103","FLK","Islas Falkland (Malvinas)"
|
||||
"__export__.code_ine_104","FRO","Islas Feroé"
|
||||
"__export__.code_ine_105","FJI","Islas Fidji"
|
||||
"__export__.code_ine_106","SGS","Islas Georgias del Sur y Sandwich"
|
||||
"__export__.code_ine_107","HMD","Islas Heard e Mcdonald"
|
||||
"__export__.code_ine_108","MNP","Islas Marianas del Norte"
|
||||
"__export__.code_ine_109","MHL","Islas Marshall"
|
||||
"__export__.code_ine_110","UMI","Islas Menores de EEUU"
|
||||
"__export__.code_ine_111","NFK","Islas Norfolk"
|
||||
"__export__.code_ine_112","PCN","Islas Pitcairn"
|
||||
"__export__.code_ine_113","SLB","Islas Salomón"
|
||||
"__export__.code_ine_114","TCA","Islas Turcas y Caicos"
|
||||
"__export__.code_ine_115","VGB","Islas Vírgenes Británicas"
|
||||
"__export__.code_ine_116","VIR","Islas Vírgenes de los EEUU"
|
||||
"__export__.code_ine_117","WLF","Islas Wallis y Futura"
|
||||
"__export__.code_ine_118","ALA","Islas Åland"
|
||||
"__export__.code_ine_119","ISR","Israel"
|
||||
"__export__.code_ine_120","ITA","Italia"
|
||||
"__export__.code_ine_121","JAM","Jamaica"
|
||||
"__export__.code_ine_122","JPN","Japón"
|
||||
"__export__.code_ine_123","JOR","Jordania"
|
||||
"__export__.code_ine_124","KAZ","Kazajstán"
|
||||
"__export__.code_ine_125","KEN","Kenia"
|
||||
"__export__.code_ine_126","KGZ","Kirguistán"
|
||||
"__export__.code_ine_127","KIR","Kiribati"
|
||||
"__export__.code_ine_128","KWT","Kuwait"
|
||||
"__export__.code_ine_129","LAO","Laos"
|
||||
"__export__.code_ine_130","LSO","Lesotho"
|
||||
"__export__.code_ine_131","LVA","Letonia"
|
||||
"__export__.code_ine_132","LBY","Libia"
|
||||
"__export__.code_ine_133","LBR","Libéria"
|
||||
"__export__.code_ine_134","LIE","Liechtenstein"
|
||||
"__export__.code_ine_135","LTU","Lituania"
|
||||
"__export__.code_ine_136","LUX","Luxemburgo"
|
||||
"__export__.code_ine_137","LBN","Líbano"
|
||||
"__export__.code_ine_138","MAC","Macao"
|
||||
"__export__.code_ine_139","MKD","Macedonia, ARY"
|
||||
"__export__.code_ine_140","MDG","Madagascar"
|
||||
"__export__.code_ine_141","MYS","Malasia"
|
||||
"__export__.code_ine_142","MWI","Malawi"
|
||||
"__export__.code_ine_143","MDV","Maldivas"
|
||||
"__export__.code_ine_144","MLT","Malta"
|
||||
"__export__.code_ine_145","MLI","Malí"
|
||||
"__export__.code_ine_146","MAR","Marruecos"
|
||||
"__export__.code_ine_147","MTQ","Martinica"
|
||||
"__export__.code_ine_148","MUS","Mauricio"
|
||||
"__export__.code_ine_149","MRT","Mauritania"
|
||||
"__export__.code_ine_150","MYT","Mayotte"
|
||||
"__export__.code_ine_151","FSM","Micronesia"
|
||||
"__export__.code_ine_152","MDA","Moldavia"
|
||||
"__export__.code_ine_153","MNG","Mongolia"
|
||||
"__export__.code_ine_154","MNE","Montenegro"
|
||||
"__export__.code_ine_155","MSR","Montserrat"
|
||||
"__export__.code_ine_156","MOZ","Mozambique"
|
||||
"__export__.code_ine_157","MMR","Myanmar"
|
||||
"__export__.code_ine_158","MEX","México"
|
||||
"__export__.code_ine_159","MCO","Mónaco"
|
||||
"__export__.code_ine_160","NAM","Namibia"
|
||||
"__export__.code_ine_161","NRU","Naurú"
|
||||
"__export__.code_ine_162","NPL","Nepal"
|
||||
"__export__.code_ine_163","NIC","Nicaragua"
|
||||
"__export__.code_ine_164","NGA","Nigeria"
|
||||
"__export__.code_ine_165","NIU","Niue"
|
||||
"__export__.code_ine_166","NOR","Noruega"
|
||||
"__export__.code_ine_167","NCL","Nueva Caledonia"
|
||||
"__export__.code_ine_168","NZL","Nueva Zelanda"
|
||||
"__export__.code_ine_169","NER","Níger"
|
||||
"__export__.code_ine_170","OMN","Omán"
|
||||
"__export__.code_ine_171","PAK","Pakistán"
|
||||
"__export__.code_ine_172","PLW","Palau"
|
||||
"__export__.code_ine_173","PSE","Palestina, Territorio ocupado"
|
||||
"__export__.code_ine_174","PAN","Panamá"
|
||||
"__export__.code_ine_175","PNG","Papua Nueva Guinea"
|
||||
"__export__.code_ine_176","PRY","Paraguay"
|
||||
"__export__.code_ine_177","NLD","Países Bajos"
|
||||
"__export__.code_ine_178","PER","Perú"
|
||||
"__export__.code_ine_179","PYF","Polinesia Francesa"
|
||||
"__export__.code_ine_180","POL","Polonia"
|
||||
"__export__.code_ine_181","PRT","Portugal"
|
||||
"__export__.code_ine_182","PRI","Puerto Rico"
|
||||
"__export__.code_ine_183","QAT","Qatar"
|
||||
"__export__.code_ine_184","GBR","Reino Unido"
|
||||
"__export__.code_ine_185","CAF","República Centroafricana"
|
||||
"__export__.code_ine_186","CZE","República Checa"
|
||||
"__export__.code_ine_187","DOM","República Dominicana"
|
||||
"__export__.code_ine_188","REU","Reunión"
|
||||
"__export__.code_ine_189","ROU","Rumania"
|
||||
"__export__.code_ine_190","RUS","Rusia"
|
||||
"__export__.code_ine_191","RWA","Rwanda"
|
||||
"__export__.code_ine_192","ESH","Sahara Occidental"
|
||||
"__export__.code_ine_193","KNA","Saint Kitts y Nevis"
|
||||
"__export__.code_ine_194","WSM","Samoa"
|
||||
"__export__.code_ine_195","ASM","Samoa Americana"
|
||||
"__export__.code_ine_196","BLM","San Bartolomé"
|
||||
"__export__.code_ine_197","SMR","San Marino"
|
||||
"__export__.code_ine_198","MAF","San Martín"
|
||||
"__export__.code_ine_199","SPM","San Pedro y Miquelón"
|
||||
"__export__.code_ine_200","VCT","San Vicente y las Granadinas"
|
||||
"__export__.code_ine_201","SHN","Santa Elena"
|
||||
"__export__.code_ine_202","LCA","Santa Lucía"
|
||||
"__export__.code_ine_203","STP","Santo Tomé y Príncipe"
|
||||
"__export__.code_ine_204","SEN","Senegal"
|
||||
"__export__.code_ine_205","SRB","Serbia"
|
||||
"__export__.code_ine_206","SYC","Seychelles"
|
||||
"__export__.code_ine_207","SLE","Sierra Leona"
|
||||
"__export__.code_ine_208","SGP","Singapur"
|
||||
"__export__.code_ine_209","SYR","Siria"
|
||||
"__export__.code_ine_210","SOM","Somalia"
|
||||
"__export__.code_ine_211","LKA","Sri Lanka"
|
||||
"__export__.code_ine_212","SWZ","Suazilandia"
|
||||
"__export__.code_ine_213","ZAF","Sudáfrica"
|
||||
"__export__.code_ine_214","SDN","Sudán"
|
||||
"__export__.code_ine_215","SWE","Suecia"
|
||||
"__export__.code_ine_216","CHE","Suiza"
|
||||
"__export__.code_ine_217","SUR","Suriname"
|
||||
"__export__.code_ine_218","SJM","Svalbard e Islas de Jan Mayen"
|
||||
"__export__.code_ine_219","THA","Tailandia"
|
||||
"__export__.code_ine_220","TWN","Taiwán"
|
||||
"__export__.code_ine_221","TZA","Tanzania"
|
||||
"__export__.code_ine_222","TJK","Tayikistan"
|
||||
"__export__.code_ine_223","IOT","Terr. Británico del Oc. Indico"
|
||||
"__export__.code_ine_224","ATF","Tierras Australes Francesas"
|
||||
"__export__.code_ine_225","TLS","Timor Oriental"
|
||||
"__export__.code_ine_226","TGO","Togo"
|
||||
"__export__.code_ine_227","TKL","Tokelau"
|
||||
"__export__.code_ine_228","TON","Tonga"
|
||||
"__export__.code_ine_229","TTO","Trinidad y Tobago"
|
||||
"__export__.code_ine_230","TKM","Turkmenistán"
|
||||
"__export__.code_ine_231","TUR","Turquía"
|
||||
"__export__.code_ine_232","TUV","Tuvalu"
|
||||
"__export__.code_ine_233","TUN","Túnez"
|
||||
"__export__.code_ine_234","UKR","Ucrania"
|
||||
"__export__.code_ine_235","UGA","Uganda"
|
||||
"__export__.code_ine_236","URY","Uruguay"
|
||||
"__export__.code_ine_237","UZB","Uzbekistán"
|
||||
"__export__.code_ine_238","VUT","Vanuatu"
|
||||
"__export__.code_ine_239","VAT","Vaticano, Santa Sede"
|
||||
"__export__.code_ine_240","VEN","Venezuela"
|
||||
"__export__.code_ine_241","VNM","Vietnam"
|
||||
"__export__.code_ine_242","YEM","Yemen"
|
||||
"__export__.code_ine_243","DJI","Yibuti"
|
||||
"__export__.code_ine_244","ZMB","Zambia"
|
||||
"__export__.code_ine_245","ZWE","Zimbabwe"
|
||||
"__export__.code_ine_246","KOS","Kosovo"
|
||||
"__export__.code_ine_247","ES111","A Coruña"
|
||||
"__export__.code_ine_248","ES112","Lugo"
|
||||
"__export__.code_ine_249","ES113","Ourense"
|
||||
"__export__.code_ine_250","ES114","Pontevedra"
|
||||
"__export__.code_ine_251","ES120","Asturias"
|
||||
"__export__.code_ine_252","ES130","Cantabria"
|
||||
"__export__.code_ine_253","ES211","Araba/Álava"
|
||||
"__export__.code_ine_254","ES212","Gipuzkoa"
|
||||
"__export__.code_ine_255","ES213","Bizkaia"
|
||||
"__export__.code_ine_256","ES220","Navarra"
|
||||
"__export__.code_ine_257","ES230","La Rioja"
|
||||
"__export__.code_ine_258","ES241","Huesca"
|
||||
"__export__.code_ine_259","ES242","Teruel"
|
||||
"__export__.code_ine_260","ES243","Zaragoza"
|
||||
"__export__.code_ine_261","ES300","Madrid"
|
||||
"__export__.code_ine_262","ES411","Ávila"
|
||||
"__export__.code_ine_263","ES412","Burgos"
|
||||
"__export__.code_ine_264","ES413","León"
|
||||
"__export__.code_ine_265","ES414","Palencia"
|
||||
"__export__.code_ine_266","ES415","Salamanca"
|
||||
"__export__.code_ine_267","ES416","Segovia"
|
||||
"__export__.code_ine_268","ES417","Soria"
|
||||
"__export__.code_ine_269","ES418","Valladolid"
|
||||
"__export__.code_ine_270","ES419","Zamora"
|
||||
"__export__.code_ine_271","ES421","Albacete"
|
||||
"__export__.code_ine_272","ES422","Ciudad Real"
|
||||
"__export__.code_ine_273","ES423","Cuenca"
|
||||
"__export__.code_ine_274","ES424","Guadalajara"
|
||||
"__export__.code_ine_275","ES425","Toledo"
|
||||
"__export__.code_ine_276","ES431","Badajoz"
|
||||
"__export__.code_ine_277","ES432","Cáceres"
|
||||
"__export__.code_ine_278","ES511","Barcelona"
|
||||
"__export__.code_ine_279","ES512","Girona"
|
||||
"__export__.code_ine_280","ES513","Lleida"
|
||||
"__export__.code_ine_281","ES514","Tarragona"
|
||||
"__export__.code_ine_282","ES521","Alicante / Alacant"
|
||||
"__export__.code_ine_283","ES522","Castellón / Castelló"
|
||||
"__export__.code_ine_284","ES523","Valencia / València"
|
||||
"__export__.code_ine_285","ES530","Illes Balears"
|
||||
"__export__.code_ine_286","ES531","Eivissa y Formentera"
|
||||
"__export__.code_ine_287","ES532","Mallorca"
|
||||
"__export__.code_ine_288","ES533","Menorca"
|
||||
"__export__.code_ine_289","ES611","Almería"
|
||||
"__export__.code_ine_290","ES612","Cádiz"
|
||||
"__export__.code_ine_291","ES613","Córdoba"
|
||||
"__export__.code_ine_292","ES614","Granada"
|
||||
"__export__.code_ine_293","ES615","Huelva"
|
||||
"__export__.code_ine_294","ES616","Jaén"
|
||||
"__export__.code_ine_295","ES617","Málaga"
|
||||
"__export__.code_ine_296","ES618","Sevilla"
|
||||
"__export__.code_ine_297","ES620","Murcia"
|
||||
"__export__.code_ine_298","ES630","Ceuta"
|
||||
"__export__.code_ine_299","ES640","Melilla"
|
||||
"__export__.code_ine_300","ES701","Las Palmas"
|
||||
"__export__.code_ine_301","ES702","Santa Cruz de Tenerife"
|
||||
"__export__.code_ine_302","ES703","El Hierro"
|
||||
"__export__.code_ine_303","ES704","Fuerteventura"
|
||||
"__export__.code_ine_304","ES705","Gran Canaria"
|
||||
"__export__.code_ine_305","ES706","La Gomera"
|
||||
"__export__.code_ine_306","ES707","La Palma"
|
||||
"__export__.code_ine_307","ES708","Lanzarote"
|
||||
"__export__.code_ine_308","ES709","Tenerife"
|
||||
|
22
hotel_l10n_es/data/report_viajero_paperformat.xml
Normal file
22
hotel_l10n_es/data/report_viajero_paperformat.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="report_viajero_paperformat" model="report.paperformat">
|
||||
<field name="name">Parte de Viajero</field>
|
||||
<field name="default" eval="True"/>
|
||||
<field name="format">custom</field>
|
||||
<field name="page_height">160</field>
|
||||
<field name="page_width">60</field>
|
||||
<field name="orientation">Portrait</field>
|
||||
<field name="margin_top">1</field>
|
||||
<field name="margin_bottom">3</field>
|
||||
<field name="margin_left">1</field>
|
||||
<field name="margin_right">1</field>
|
||||
<field name="header_line" eval="False"/>
|
||||
<field name="header_spacing">1</field>
|
||||
<field name="dpi">201</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
831
hotel_l10n_es/i18n/es.po
Normal file
831
hotel_l10n_es/i18n/es.po
Normal file
@@ -0,0 +1,831 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * hotel_l10n_es
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 10.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-04-15 07:46+0000\n"
|
||||
"PO-Revision-Date: 2018-04-15 09:54+0200\n"
|
||||
"Last-Translator: <>\n"
|
||||
"Language-Team: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: \n"
|
||||
"Language: es\n"
|
||||
"X-Generator: Poedit 1.8.7.1\n"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid ", at"
|
||||
msgstr ", a"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_year:0
|
||||
msgid "2017"
|
||||
msgstr "2017"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_year:0
|
||||
msgid "2018"
|
||||
msgstr "2018"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "<strong>COPY TO THE USER</strong>"
|
||||
msgstr "<strong>COPIA PARA EL USUARIO</strong>"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inewizard.py:328
|
||||
#, python-format
|
||||
msgid "ADR in the month of the survey: "
|
||||
msgstr "ADR en el mes de la encuesta: "
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_ine_download
|
||||
msgid "ADR y RevPar"
|
||||
msgstr "ADR y RevPar"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Abrir web de la Guardia Civil para entregar el fichero generado:"
|
||||
msgstr "Abrir web de la Guardia Civil para entregar el fichero generado:"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Abrir web de la Polícia para entregar el fichero generado:"
|
||||
msgstr "Abrir web de la Polícia para entregar el fichero generado:"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.actions.act_window,name:hotel_l10n_es.action_ine_download
|
||||
msgid "Action INE File Download"
|
||||
msgstr "Action INE File Download"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.actions.act_window,name:hotel_l10n_es.action_police_download
|
||||
msgid "Action Police File Download"
|
||||
msgstr "Action Police File Download"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Address"
|
||||
msgstr "Dirección"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_adr_screen
|
||||
msgid "Adr screen"
|
||||
msgstr "Adr screen"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "April"
|
||||
msgstr "Abril"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "August"
|
||||
msgstr "Agosto"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_seats
|
||||
msgid "Beds available"
|
||||
msgstr "Beds available"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Birth date"
|
||||
msgstr "Fecha de nacimiento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_birthdate_date_cardex
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Birthdate"
|
||||
msgstr "F. de nacimiento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "CIF:"
|
||||
msgstr "CIF:"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "Carta o Doc. de Identidad"
|
||||
msgstr "Carta o Doc. de Identidad"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_name
|
||||
msgid "Category"
|
||||
msgstr "Categoría"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.actions.act_window,name:hotel_l10n_es.action_category
|
||||
#: model:ir.ui.menu,name:hotel_l10n_es.menu_category
|
||||
msgid "Category Codes"
|
||||
msgstr "Cód. Categoría"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_category_id
|
||||
msgid "Category id"
|
||||
msgstr "Category id"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_category_id_cardex
|
||||
msgid "Category id cardex"
|
||||
msgstr "Category id cardex"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_tipo
|
||||
msgid "Category type"
|
||||
msgstr "Category type"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "City"
|
||||
msgstr "Ciudad"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_code
|
||||
msgid "Code"
|
||||
msgstr "Código"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.checkin_wizard_form_2
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Code in INE"
|
||||
msgstr "Código en el INE"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_partner_code_ine
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_users_code_ine
|
||||
msgid "Code ine"
|
||||
msgstr "Code ine"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_code_ine_cardex
|
||||
msgid "Code ine cardex"
|
||||
msgstr "Code ine cardex"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Comment"
|
||||
msgstr "Comentario"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_res_company
|
||||
msgid "Companies"
|
||||
msgstr "Compañías"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_download_num
|
||||
msgid "Correlative number"
|
||||
msgstr "Núm Correlativo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Country"
|
||||
msgstr "País"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/models/inherit_res_partner.py:47
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_checkin_wizard_code_ine_cardex
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_partner_code_ine
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_users_code_ine
|
||||
#, python-format
|
||||
msgid "Country or province of origin. Used for INE statistics."
|
||||
msgstr "País o provincia de origen. Usado para estadísticas INE."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_create_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_create_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_create_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_create_uid
|
||||
msgid "Created by"
|
||||
msgstr "Creado por"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_create_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_create_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_create_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_create_date
|
||||
msgid "Created on"
|
||||
msgstr "Creado en"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "DNI"
|
||||
msgstr "DNI"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:72
|
||||
#, python-format
|
||||
msgid "DNI/NIE/DRIVE LICENSE erroneous length, the correct format is: (12345678A or X1234567A)"
|
||||
msgstr "DNI / NIE / CARNET DE CONDUCIR longitud errónea, el formato correcto es: (12345678A o X1234567A)"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_download_date
|
||||
msgid "Date"
|
||||
msgstr "Fecha"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:44
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:51
|
||||
#, python-format
|
||||
msgid "Date of document shipment, prior to birth date"
|
||||
msgstr "Fecha de expedición del documento, anterior a la fecha de nacimiento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "December"
|
||||
msgstr "Diciembre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_display_name
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_display_name
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_display_name
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_display_name
|
||||
msgid "Display Name"
|
||||
msgstr "Mostrar Nombre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_poldocument_cardex
|
||||
msgid "Doc. number"
|
||||
msgstr "Núm. Documento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/models/inherit_res_partner.py:40
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_documenttype_cardex
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_partner_documenttype
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_users_documenttype
|
||||
#, python-format
|
||||
msgid "Doc. type"
|
||||
msgstr "Tipo de Documento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Document"
|
||||
msgstr "Documento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_partner_polexpedition
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_users_polexpedition
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Document expedition date"
|
||||
msgstr "Fecha de expedición"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_partner_poldocument
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_users_poldocument
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Document number"
|
||||
msgstr "Nº de documento:"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Document number (DNI: 123456789A)"
|
||||
msgstr "Nº de documento (DNI: 123456789A)"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Document number:"
|
||||
msgstr "Nº de documento:"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:41
|
||||
#, python-format
|
||||
msgid "Does the client have less than 16 years?. Data collection is not performed for those born before %s."
|
||||
msgstr "¿El cliente tiene menos de 16 años? La recopilación de datos no se realiza para aquellos nacidos antes de %s."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "E-Mail"
|
||||
msgstr "E-Mail"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Ej.: name@domain.com"
|
||||
msgstr "Ej.: nombre@dominio.com"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Entry date"
|
||||
msgstr "Fecha de entrada"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:41
|
||||
#, python-format
|
||||
msgid "Error in Birthdate"
|
||||
msgstr "Error en fecha de nacimiento"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:51
|
||||
#, python-format
|
||||
msgid "Error in Birthdate or Expedition date"
|
||||
msgstr "Error in fecha de nacimiento o expedición"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:70
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:72
|
||||
#, python-format
|
||||
msgid "Error in DNI/NIE/DRIVE LICENSE"
|
||||
msgstr "Error en DNI/NIE/CARNET DE CONDUCIR"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_eventualstaff
|
||||
msgid "Eventual Staff"
|
||||
msgstr "Eventual Staff"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Exit date"
|
||||
msgstr "Fecha Salida"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_polexpedition_cardex
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Expedition date"
|
||||
msgstr "Fecha expedición"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "February"
|
||||
msgstr "Febrero"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,gender_cardex:0
|
||||
msgid "Female"
|
||||
msgstr "Mujer"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/policewizard.py:89
|
||||
#, python-format
|
||||
msgid "File not generated by configuration error."
|
||||
msgstr "Archivo no generado por error de configuración."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_firstname_cardex
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Firstname"
|
||||
msgstr "Nombre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Gender"
|
||||
msgstr "Sexo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_gender_cardex
|
||||
msgid "Gender cardex"
|
||||
msgstr "Género"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_ine_download
|
||||
msgid "Generar estadistica para el I.N.E."
|
||||
msgstr "Generar estadistica para el I.N.E."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Generar fichero diario para la Policía"
|
||||
msgstr "Generar fichero diario para la Policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Generate Police file"
|
||||
msgstr "Generar fichero para la Policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_ine_download
|
||||
msgid "Generate file"
|
||||
msgstr "Generar Archivo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/policewizard.py:85
|
||||
#, python-format
|
||||
msgid "Generated file. Download it and give it to the police."
|
||||
msgstr "Archivo generado. Descárguelo y entrégueselo a la policía."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Guardia Civil <i class=\"fa fa-tree\"/>"
|
||||
msgstr "Guardia Civil <i class=\"fa fa-tree\"/>"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.alda_view_company_form
|
||||
msgid "Hotel Settings"
|
||||
msgstr "Configuración del Hotel"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_category_id
|
||||
msgid "Hotel category in the Ministry of Tourism. Used for INE statistics."
|
||||
msgstr "Categoría de hotel en el Ministerio de Turismo. Usado para las est. del INE."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_id
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_id
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_id
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_id
|
||||
msgid "ID"
|
||||
msgstr "ID"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "INE Code"
|
||||
msgstr "Código INE"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.actions.act_window,name:hotel_l10n_es.action_code_ine
|
||||
#: model:ir.ui.menu,name:hotel_l10n_es.menu_code_ine
|
||||
msgid "INE Codes"
|
||||
msgstr "INE Codes"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.menu,name:hotel_l10n_es.menu_ine_download
|
||||
msgid "INE File Download"
|
||||
msgstr "INE File Download"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.alda_view_company_form
|
||||
msgid "INE and Police data"
|
||||
msgstr "Datos del INE y Policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "January"
|
||||
msgstr "Enero"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "July"
|
||||
msgstr "Julio"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "June"
|
||||
msgstr "Junio"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category___last_update
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine___last_update
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard___last_update
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard___last_update
|
||||
msgid "Last Modified on"
|
||||
msgstr "Última modificación en"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_write_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_write_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_write_uid
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_write_uid
|
||||
msgid "Last Updated by"
|
||||
msgstr "Última actualización por"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_category_write_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_write_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_write_date
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_write_date
|
||||
msgid "Last Updated on"
|
||||
msgstr "Última actualización en"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_checkin_wizard_lastname_cardex
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Lastname"
|
||||
msgstr "Apellidos"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,gender_cardex:0
|
||||
msgid "Male"
|
||||
msgstr "Hombre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "March"
|
||||
msgstr "Marzo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "May"
|
||||
msgstr "Mayo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Mobile"
|
||||
msgstr "Móvil"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_ine_month
|
||||
msgid "Month"
|
||||
msgstr "Mes"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Name"
|
||||
msgstr "Nombre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_property_name
|
||||
msgid "Name of the Hotel/Property."
|
||||
msgstr "Nombre del Hotel/Propiedad."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inewizard.py:334
|
||||
#, python-format
|
||||
msgid "No data in this month"
|
||||
msgstr "No hay datos en este mes"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_cardex_warning
|
||||
msgid "Notice under the signature on the traveler's ticket."
|
||||
msgstr "Aviso debajo de la firma en el ticket del viajero."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "November"
|
||||
msgstr "Noviembre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_police_wizard_download_num
|
||||
msgid "Number provided by the police"
|
||||
msgstr "Núm. provisto por la policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "October"
|
||||
msgstr "Octubre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Origin"
|
||||
msgstr "Origen"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "PART OF TRAVELERS ENTRY"
|
||||
msgstr "PARTE DE ENTRADA DE VIAJEROS"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.actions.report.xml,name:hotel_l10n_es.action_report_viajero
|
||||
msgid "Parte de Viajero"
|
||||
msgstr "Parte de Viajero"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_res_partner
|
||||
msgid "Partner"
|
||||
msgstr "Empresa"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Partners"
|
||||
msgstr "Empresas"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "Pasaporte"
|
||||
msgstr "Pasaporte"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_permanentstaff
|
||||
msgid "Permanent Staff"
|
||||
msgstr "Permanent Staff"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "Permiso Residencia Español"
|
||||
msgstr "Permiso Residencia Español"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "Permiso Residencia Europeo"
|
||||
msgstr "Permiso Residencia Europeo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:checkin.wizard,documenttype_cardex:0
|
||||
#: selection:res.partner,documenttype:0
|
||||
msgid "Permiso de Conducir"
|
||||
msgstr "Permiso de Conducir"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Phone"
|
||||
msgstr "Teléfono"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Phones"
|
||||
msgstr "Teléfonos"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_code_ine_name
|
||||
msgid "Place"
|
||||
msgstr "Place"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.menu,name:hotel_l10n_es.menu_police_download
|
||||
msgid "Police File Download"
|
||||
msgstr "Desacargar Archivo Policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_police
|
||||
msgid "Police number"
|
||||
msgstr "Núm. Policía"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.view_police_download
|
||||
msgid "Policia <i class=\"fa fa-flag\"/>"
|
||||
msgstr "Policia <i class=\"fa fa-flag\"/>"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/policewizard.py:79
|
||||
#, python-format
|
||||
msgid "Problem generating the file. Checkin without data, or incorrect data."
|
||||
msgstr "Problema generando el fichero. Checkin sin datos, o datos incorrectos."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_property_name
|
||||
msgid "Property name"
|
||||
msgstr "Nombre propiedad"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_tourism
|
||||
msgid "Registration number in the Ministry of Tourism. Used for INE statistics."
|
||||
msgstr "Categoría de hotel en el Ministerio de Turismo. Usado para las est. del INE."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_rev_screen
|
||||
msgid "Rev screen"
|
||||
msgstr "Rev screen"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_rooms
|
||||
msgid "Rooms Available"
|
||||
msgstr "Habitaciones Disponibles"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.checkin_wizard_form_2
|
||||
msgid "Save Checkin and Print"
|
||||
msgstr "Guardar registro e imprimir"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/models/inherit_res_partner.py:38
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_checkin_wizard_documenttype_cardex
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_partner_documenttype
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_users_documenttype
|
||||
#, python-format
|
||||
msgid "Select a valid document type"
|
||||
msgstr "Seleccione un tipo de documento válido"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Select one..."
|
||||
msgstr "Seleccione uno..."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: selection:ine.wizard,ine_month:0
|
||||
msgid "September"
|
||||
msgstr "Septiembre"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "State"
|
||||
msgstr "Estado"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Street..."
|
||||
msgstr "Calle..."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Surnames"
|
||||
msgstr "Apellidos"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "TRAVELER'S DOCUMENT"
|
||||
msgstr "DOCUMENTO DEL VIAJERO"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Tags"
|
||||
msgstr "Etiquetas"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.checkin_wizard_form_2
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "Tags..."
|
||||
msgstr "Etiquetas..."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "The collection and treatment will be done in accordance with the Organic Law 15/1999, of December 13. of protection of personal data and under the provisions of art. 12.1 of the Organic Law 1/1992, of February 21, on the protection of citizen security."
|
||||
msgstr "La recogida y tratamiento se hará de acuerdo con la Ley Orgánica 15/1999, de 13 de dic. de protección de datos de carácter personal y al amparo de lo dispuesto en el art. 12.1 de la Ley Orgánica 1/1992, de 21 de febrero, sobre protección de la seguridad ciudadana."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Total amount (Reservation Card):"
|
||||
msgstr "Importe total (Ficha de Reserva):"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_tourism
|
||||
msgid "Tourism number"
|
||||
msgstr "Núm. Turismo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Traveler's signature"
|
||||
msgstr "Firma del viajero"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_txt_binary
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_txt_binary
|
||||
msgid "Txt binary"
|
||||
msgstr "Txt binary"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_txt_filename
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_txt_filename
|
||||
msgid "Txt filename"
|
||||
msgstr "Txt filename"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_police_wizard_txt_message
|
||||
msgid "Txt message"
|
||||
msgstr "Txt message"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.report_viajero_document
|
||||
msgid "Type"
|
||||
msgstr "Tipo"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_eventualstaff
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_permanentstaff
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_rooms
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_seats
|
||||
msgid "Used for INE statistics."
|
||||
msgstr "Usado para estadísticas del INE."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,help:hotel_l10n_es.field_res_company_police
|
||||
msgid "Used to generate the name of the file that will be given to the police. 10 Caracters"
|
||||
msgstr "Usado para generar el nombre del archivo que será entregado a la policía. 10 Caracteres."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_res_company_cardex_warning
|
||||
msgid "Warning in Cardex"
|
||||
msgstr "Alerta en Cardex"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inherit_checkinwizard.py:70
|
||||
#, python-format
|
||||
msgid "Wrong DNI/NIE/DRIVE LICENSE, check it."
|
||||
msgstr "DNI/NIE/CARNET DE CONDUCIR incorrecto, compruébelo."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model.fields,field_description:hotel_l10n_es.field_ine_wizard_ine_year
|
||||
msgid "Year"
|
||||
msgstr "Año"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.ui.view,arch_db:hotel_l10n_es.partners_form_cardex
|
||||
msgid "ZIP"
|
||||
msgstr "C.P."
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_category
|
||||
msgid "category"
|
||||
msgstr "categoría"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_checkin_wizard
|
||||
msgid "checkin.wizard"
|
||||
msgstr "checkin.wizard"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_code_ine
|
||||
msgid "code_ine"
|
||||
msgstr "code_ine"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_ine_wizard
|
||||
msgid "ine.wizard"
|
||||
msgstr "ine.wizard"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: model:ir.model,name:hotel_l10n_es.model_police_wizard
|
||||
msgid "police.wizard"
|
||||
msgstr "police.wizard"
|
||||
|
||||
#. module: hotel_l10n_es
|
||||
#: code:addons/hotel_l10n_es/wizard/inewizard.py:328
|
||||
#, python-format
|
||||
msgid "€ and "
|
||||
msgstr "€ y "
|
||||
26
hotel_l10n_es/models/__init__.py
Normal file
26
hotel_l10n_es/models/__init__.py
Normal file
@@ -0,0 +1,26 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import category_type
|
||||
from . import code_ine
|
||||
from . import inherit_res_company
|
||||
from . import inherit_res_partner
|
||||
37
hotel_l10n_es/models/category_type.py
Normal file
37
hotel_l10n_es/models/category_type.py
Normal file
@@ -0,0 +1,37 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from odoo import models, fields, api
|
||||
|
||||
|
||||
class TourismCategory(models.Model):
|
||||
_name = 'tourism.category'
|
||||
|
||||
name = fields.Char('Category', required=True)
|
||||
category_type = fields.Char('Category type', required=True)
|
||||
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
data = []
|
||||
for record in self:
|
||||
display_value = record.category_type + " (" + record.name + ") "
|
||||
data.append((record.id, display_value))
|
||||
return data
|
||||
41
hotel_l10n_es/models/code_ine.py
Normal file
41
hotel_l10n_es/models/code_ine.py
Normal file
@@ -0,0 +1,41 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class CodeIne(models.Model):
|
||||
_name = 'code.ine'
|
||||
|
||||
name = fields.Char('Place', required=True)
|
||||
code = fields.Char('Code', required=True)
|
||||
|
||||
@api.multi
|
||||
def name_get(self):
|
||||
data = []
|
||||
for record in self:
|
||||
subcode = record.code
|
||||
if len(record.code) > 3:
|
||||
subcode = 'ESP'
|
||||
display_value = record.name + " (" + subcode + ")"
|
||||
data.append((record.id, display_value))
|
||||
return data
|
||||
46
hotel_l10n_es/models/inherit_res_company.py
Normal file
46
hotel_l10n_es/models/inherit_res_company.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields, api
|
||||
|
||||
|
||||
class Inherit_res_company(models.Model):
|
||||
_inherit = 'res.company'
|
||||
|
||||
property_name = fields.Char('Property name',
|
||||
help='Name of the Hotel/Property.')
|
||||
ine_tourism = fields.Char('Tourism number',
|
||||
help='Registration number in the Ministry of \
|
||||
Tourism. Used for INE statistics.')
|
||||
ine_rooms = fields.Integer('Rooms Available', default=0,
|
||||
help='Used for INE statistics.')
|
||||
ine_seats = fields.Integer('Beds available', default=0,
|
||||
help='Used for INE statistics.')
|
||||
ine_permanent_staff = fields.Integer('Permanent Staff', default=0,
|
||||
help='Used for INE statistics.')
|
||||
ine_eventual_staff = fields.Integer('Eventual Staff', default=0,
|
||||
help='Used for INE statistics.')
|
||||
police_number = fields.Char('Police number', size=10,
|
||||
help='Used to generate the name of the file that \
|
||||
will be given to the police. 10 Caracters')
|
||||
ine_category_id = fields.Many2one('category.tourism',
|
||||
help='Hotel category in the Ministry of \
|
||||
Tourism. Used for INE statistics.')
|
||||
100
hotel_l10n_es/models/inherit_res_partner.py
Normal file
100
hotel_l10n_es/models/inherit_res_partner.py
Normal file
@@ -0,0 +1,100 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
from openerp import models, fields, api, _
|
||||
from odoo.osv.expression import get_unaccent_wrapper
|
||||
|
||||
|
||||
class ResPartner(models.Model):
|
||||
_inherit = 'res.partner'
|
||||
|
||||
document_type = fields.Selection([
|
||||
('D', 'DNI'),
|
||||
('P', 'Pasaporte'),
|
||||
('C', 'Permiso de Conducir'),
|
||||
('I', 'Carta o Doc. de Identidad'),
|
||||
('N', 'Permiso Residencia Español'),
|
||||
('X', 'Permiso Residencia Europeo')],
|
||||
help=_('Select a valid document type'),
|
||||
default='D',
|
||||
string='Doc. type',
|
||||
)
|
||||
document_number = fields.Char('Document number')
|
||||
document_expedition_date = fields.Date('Document expedition date')
|
||||
|
||||
code_ine_id = fields.Many2one('code.ine',
|
||||
help=_('Country or province of origin. Used for INE statistics.'))
|
||||
|
||||
@api.model
|
||||
def name_search(self, name, args=None, operator='ilike', limit=100):
|
||||
result = super(ResPartner, self).name_search(name, args=None,
|
||||
operator='ilike',
|
||||
limit=100)
|
||||
if args is None:
|
||||
args = []
|
||||
if name and operator in ('=', 'ilike', '=ilike', 'like', '=like'):
|
||||
self.check_access_rights('read')
|
||||
where_query = self._where_calc(args)
|
||||
self._apply_ir_rules(where_query, 'read')
|
||||
from_clause, where_clause, where_clause_params = where_query.get_sql()
|
||||
where_str = where_clause and (" WHERE %s AND " % where_clause) or ' WHERE '
|
||||
|
||||
# search on the name of the contacts and of its company
|
||||
search_name = name
|
||||
if operator in ('ilike', 'like'):
|
||||
search_name = '%%%s%%' % name
|
||||
if operator in ('=ilike', '=like'):
|
||||
operator = operator[1:]
|
||||
|
||||
unaccent = get_unaccent_wrapper(self.env.cr)
|
||||
|
||||
query = """SELECT id
|
||||
FROM res_partner
|
||||
{where} ({poldocument} {operator} {percent})
|
||||
ORDER BY {display_name} {operator} {percent} desc,
|
||||
{display_name}
|
||||
""".format(where=where_str,
|
||||
operator=operator,
|
||||
poldocument=unaccent('poldocument'),
|
||||
display_name=unaccent('display_name'),
|
||||
percent=unaccent('%s'),)
|
||||
|
||||
where_clause_params += [search_name]*2
|
||||
if limit:
|
||||
query += ' limit %s'
|
||||
where_clause_params.append(limit)
|
||||
self.env.cr.execute(query, where_clause_params)
|
||||
partner_ids = [row[0] for row in self.env.cr.fetchall()]
|
||||
if partner_ids:
|
||||
result += self.browse(partner_ids).name_get()
|
||||
return result
|
||||
|
||||
#TMP_FIX VAT Validation
|
||||
@api.constrains("vat")
|
||||
def check_vat(self):
|
||||
return
|
||||
|
||||
#TODO: Review better VAT & DocumentNumber integration
|
||||
@api.onchange('document_number')
|
||||
def onchange_poldocument(self):
|
||||
for partner in self:
|
||||
if partner.document_number and partner.document_type == 'D':
|
||||
partner.vat = 'ES' + partner.poldocument
|
||||
18
hotel_l10n_es/report/report_parte_viajero.xml
Normal file
18
hotel_l10n_es/report/report_parte_viajero.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<report
|
||||
id="action_report_viajero"
|
||||
model="cardex"
|
||||
string="Parte de Viajero"
|
||||
report_type="qweb-pdf"
|
||||
name="report.viajero"
|
||||
file="report.viajero"
|
||||
/>
|
||||
<record id="action_report_viajero" model="ir.actions.report.xml">
|
||||
<field name="paperformat_id" ref="report_viajero_paperformat"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
1
hotel_l10n_es/security/ir.model.access.csv
Normal file
1
hotel_l10n_es/security/ir.model.access.csv
Normal file
@@ -0,0 +1 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
|
BIN
hotel_l10n_es/static/src/img/logo_alda_bn.png
Executable file
BIN
hotel_l10n_es/static/src/img/logo_alda_bn.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
hotel_l10n_es/static/src/img/watermark.jpg
Executable file
BIN
hotel_l10n_es/static/src/img/watermark.jpg
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
13
hotel_l10n_es/static/src/xml/hotel_l10n_es_templates.xml
Normal file
13
hotel_l10n_es/static/src/xml/hotel_l10n_es_templates.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<template id="hotelname_bootstrap"
|
||||
inherit_id="web.menu_secondary"
|
||||
name="Hotel Name - Web Client"
|
||||
>
|
||||
<xpath expr="//div[@class='o_sub_menu_content']/t" position="after">
|
||||
<div class="title-hotel-name">
|
||||
<t t-esc="request.env.user.company_id.property_name"/>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
51
hotel_l10n_es/views/category_tourism.xml
Normal file
51
hotel_l10n_es/views/category_tourism.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<act_window
|
||||
id="action_category_tourism"
|
||||
name="Category Codes"
|
||||
res_model="category"
|
||||
view_mode="tree,form"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_category_tourism"
|
||||
name="Category Codes"
|
||||
parent="hotel.configuration_others"
|
||||
sequence="30"
|
||||
action="action_category"
|
||||
/>
|
||||
|
||||
<record id="category_tourism_view_form" model="ir.ui.view">
|
||||
<field name="name">category.tourism.view.form</field>
|
||||
<field name="model">category.tourism</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group name="group_top">
|
||||
<group name="group_left">
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<group name="group_left">
|
||||
<field name="display_name"/>
|
||||
</group>
|
||||
<group name="group_right">
|
||||
<field name="category_type"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="category_tourism_view_tree" model="ir.ui.view">
|
||||
<field name="name">category.tourism.view.tree</field>
|
||||
<field name="model">category.tourism</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="display_name"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
53
hotel_l10n_es/views/code_ine.xml
Normal file
53
hotel_l10n_es/views/code_ine.xml
Normal file
@@ -0,0 +1,53 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
|
||||
<act_window
|
||||
id="action_code_ine"
|
||||
name="action.code.ine"
|
||||
res_model="code.ine"
|
||||
view_mode="tree,form"
|
||||
/>
|
||||
|
||||
<menuitem
|
||||
id="menu_code_ine"
|
||||
name="menu.code.ine"
|
||||
parent="hotel.configuration_others"
|
||||
sequence="25"
|
||||
action="action_code_ine"
|
||||
/>
|
||||
|
||||
<record id="code_ine_view_form" model="ir.ui.view">
|
||||
<field name="name">code.ine.view.form</field>
|
||||
<field name="model">code.ine</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group name="group_top">
|
||||
<group name="group_left">
|
||||
<field name="name"/>
|
||||
</group>
|
||||
<group name="group_left">
|
||||
<field name="display_name"/>
|
||||
</group>
|
||||
<group name="group_right">
|
||||
<field name="code"/>
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<record id="code_ine_view_tree" model="ir.ui.view">
|
||||
<field name="name">code.ine.view.tree</field>
|
||||
<field name="model">code.ine</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree>
|
||||
<field name="display_name"/>
|
||||
<field name="code"/>
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
21
hotel_l10n_es/views/inherit_hotel_checkin_partner_views.xml
Normal file
21
hotel_l10n_es/views/inherit_hotel_checkin_partner_views.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="hotel_checkin_partner_view_form" model="ir.ui.view">
|
||||
<field name="name">hotel.checkin.partner.view.form</field>
|
||||
<field name="model">hotel.checkin.partner</field>
|
||||
<field name="inherit_id" ref="hotel.hotel_checkin_partner_view_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='reservation_id']" position="after">
|
||||
<button type="action" class="oe_stat_button"
|
||||
id="cardex_smart_button_2"
|
||||
icon="fa-file-pdf-o"
|
||||
name="%(action_report_viajero)d"
|
||||
context="{'partner_id': partner_id,'enter_date': enter_date,
|
||||
'exit_date': exit_date,'reservation_ids': reservation_id,
|
||||
'hidden_cardex': True, 'edit_cardex': True }"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
28
hotel_l10n_es/views/inherit_res_company.xml
Normal file
28
hotel_l10n_es/views/inherit_res_company.xml
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<record id="view_company_form" model="ir.ui.view">
|
||||
<field name="name">view.company.form</field>
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page" position="after">
|
||||
<page string="Hotel Settings">
|
||||
<group>
|
||||
<group name="aldahotels_grp" string="INE and Police data">
|
||||
<field name="property_name" />
|
||||
<field name="ine_tourism" />
|
||||
<field name="ine_category_id" widget="selection"/>
|
||||
<field name="ine_seats" />
|
||||
<field name="ine_permanent_staff" />
|
||||
<field name="ine_eventual_staff" />
|
||||
<field name="police_number" />
|
||||
<field name="cardex_warning" />
|
||||
</group>
|
||||
</group>
|
||||
</page>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
26
hotel_l10n_es/views/inherit_res_partner.xml
Normal file
26
hotel_l10n_es/views/inherit_res_partner.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_partner_form" model="ir.ui.view">
|
||||
<field name="name"> hotel.view.partner.form </field>
|
||||
<field name="model">res.partner</field>
|
||||
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//page[@name='personal_information_page']" position='inside'>
|
||||
<group colspan="4">
|
||||
<group>
|
||||
<field name="documenttype"/>
|
||||
<field name="poldocument"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="code_ine_id" placeholder="Code in INE" options="{'no_create': True,'no_open': True}"/>
|
||||
<field name="polexpedition"/>
|
||||
</group>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
35
hotel_l10n_es/views/report_viajero.xml
Normal file
35
hotel_l10n_es/views/report_viajero.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report.viajero">
|
||||
<style type="text/css">
|
||||
.titulo {font-size:0.93em;}
|
||||
.titulo2 {font-size:1.93em;}
|
||||
.page {margin: 0 auto; font-family:kiro, Verdana, Geneva, sans-serif;}
|
||||
img {max-width:100%;}
|
||||
.cabezera{width:100%; margin:0 auto;}
|
||||
.cabezera h3 {font-size:0.93em;}
|
||||
#datos{ text-align: center; padding:0 15px; font-size:0.85em;}
|
||||
.bloque {margin:5px 0;}
|
||||
td {font-size:1.5em;}
|
||||
.fecha {font-weight:bold;font-size:0.85em;}
|
||||
.firma {width: 80%; border:dotted 1px; height: 80px; margin:0 auto;}
|
||||
.legal p {font-size:0.6em;}
|
||||
h3, #pie, .legal, #cabezera {text-align:center;}
|
||||
h3, #cabezera, td {font-family:kiro, Verdana, Geneva, sans-serif;}
|
||||
h3 {font-size:1.15em;}
|
||||
.numerocheck {font-size:0.9em;}
|
||||
.container-fluid, row, col-md-12 {padding-left: 0 !important; padding-right: 0 !important;}
|
||||
</style>
|
||||
<t>
|
||||
.titulo {font-size:0.93em;}
|
||||
.titulo2 {font-size:1.93em;}
|
||||
</t>
|
||||
<t t-call="report.html_container">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<t t-call="hotel_l10n_es.report_viajero_document" t-lang="o.partner_id.lang"/>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
248
hotel_l10n_es/views/report_viajero_document.xml
Normal file
248
hotel_l10n_es/views/report_viajero_document.xml
Normal file
@@ -0,0 +1,248 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<template id="report_viajero_document">
|
||||
<t t-set="company" t-value="res_company"></t>
|
||||
<div class="page" style="font-size:xx-small; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="container-fluid" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="row cabezera" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<img src='/hotel_l10n_es/static/src/img/logo_alda_bn.png'
|
||||
style="width:100%; max-heigth:50px; margin:0 0 1em 0;"/>
|
||||
<p style="font-size:1.16em;">PART OF TRAVELERS ENTRY</p>
|
||||
<p class="numerocheck">Document number: <strong><span t-field="o.id"/></strong>/
|
||||
<span t-if="o.reservation_id.product_id.description_sale"><span t-field="o.reservation_id.folio_id"/> ( <span t-field="o.reservation_id.product_id.description_sale"/>)</span>
|
||||
<span t-if="not o.reservation_id.product_id.description_sale"><span t-field="o.reservation_id"/></span>
|
||||
</p>
|
||||
<p style="font-size:0.65em;"> Total amount (Reservation Card): <strong><span t-field="o.reservation_id.folio_id.amount_total"/></strong></p>
|
||||
<p><strong>CIF: <span t-field="company.vat"/></strong><br/>
|
||||
<strong><span t-field="company.display_name"/></strong><br/>
|
||||
<strong><span t-field="company.street"/> <span t-field="company.street2"/></strong><br/>
|
||||
<strong><span t-field="company.zip"/> <span t-field="company.city"/></strong><br/></p>
|
||||
<p class="titulo">TRAVELER'S DOCUMENT</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Document number</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.poldocument"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Type</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong>
|
||||
<t t-esc="dict(o.partner_id.fields_get(allfields=['documenttype'])['documenttype']['selection'])[o.partner_id.documenttype]"/>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Expedition date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.polexpedition" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Name</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.firstname"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Surnames</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.lastname"/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Gender</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.gender"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Birthdate</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.birthdate_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Origin</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.code_ine"/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Entry date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.enter_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Exit date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong><span t-field="o.exit_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<p class="text-center">
|
||||
<span t-field="company.city"/>, at <span t-esc="time.strftime('%Y-%m-%d')" t-options="{"widget": "date"}"/>
|
||||
</p>
|
||||
<div class="firma" style="width: 85%; border:dotted 1px; height: 60px; margin:0 auto;">
|
||||
</div><br/>
|
||||
<p class="text-center">Traveler's signature</p>
|
||||
<p class="text-center" style="font-size:0.8em;"><span t-field="company.cardex_warning"/></p>
|
||||
<p class="text-justify" style="font-size:0.7em;">En nombre de la empresa <strong>GRUPO ALDA HOTELS</strong> compuesto por Alda Rías Baixas SL, Alda Compostela SL, Alda Castilla SL, Hoteles Rías Altas SL, Comphostel Gestión Patrimonial SL y Consultores Hoteleros Integrales SL, tratamos la información que nos facilita, con el fin de prestarle el servicio solicitado y realizar la facturación del mismo. Se conservarán mientras se mantenga la relación comercial o durante los años necesarios para cumplir con las obligaciones legales. No se cederán a terceros salvo en los casos en que exista una obligación legal. Usted tiene derecho a obtener información sobre el tratamiento de sus datos personales, acceder, rectificar los inexactos o solicitar su supresión cuando ya no sean necesarios, en la dirección <strong>protecciondatos@aldahotels.com</strong> Asimismo solicito confirme esta autorización para ofrecerle nuestros servicios y poder fidelizarle como cliente.<br/>Si ___ No ___</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page" style="font-size:xx-small; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="container-fluid" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="row cabezera" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<img src='/hotel_l10n_es/static/src/img/logo_alda_bn.png'
|
||||
style="width:100%; max-heigth:50px; margin:0 0 1em 0;"/>
|
||||
<p style="font-size:1.16em;">PART OF TRAVELERS ENTRY</p>
|
||||
<p class="numerocheck">Document number: <strong><span t-field="o.id"/></strong>/<span t-field="o.reservation_id"/></p>
|
||||
<p style="font-size:0.65em;"> Total amount (Reservation Card): <strong><span t-field="o.reservation_id.folio_id.amount_total"/></strong></p>
|
||||
<p><strong>CIF: <span t-field="company.vat"/></strong><br/>
|
||||
<strong><span t-field="company.display_name"/></strong><br/>
|
||||
<strong><span t-field="company.street"/> <span t-field="company.street2"/></strong><br/>
|
||||
<strong><span t-field="company.zip"/> <span t-field="company.city"/></strong><br/></p>
|
||||
<p class="titulo">TRAVELER'S DOCUMENT</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Document number</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.poldocument"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Type</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong>
|
||||
<t t-esc="dict(o.partner_id.fields_get(allfields=['documenttype'])['documenttype']['selection'])[o.partner_id.documenttype]"/>
|
||||
</strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Expedition date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.polexpedition" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Name</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.firstname"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Surnames</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.lastname"/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%" border="1" style="border-style: double;">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Gender</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.gender"/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Birthdate</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.birthdate_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Origin</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.partner_id.code_ine"/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12 text-center" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Entry date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong> <span t-field="o.enter_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="40%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
Exit date</td>
|
||||
<td width="100%" style="padding-left:3px;border:double; border-width: 1px">
|
||||
<strong><span t-field="o.exit_date" t-options='{"format": "d MMMM y"}'/></strong></td>
|
||||
</tr>
|
||||
</table><br/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<div class="col-md-12" style="margin:0 0 0 0 !important; padding-left: 0 !important; padding-right: 0 !important;">
|
||||
<p class="text-center">
|
||||
<span t-field="company.city"/>, at <span t-esc="time.strftime('%Y-%m-%d')" t-options="{"widget": "date"}"/>
|
||||
</p><br/>
|
||||
<!-- <t t-esc="company.city"/>, <span t-esc="time.strftime('%A, %d de %B de %Y')"/> -->
|
||||
<p class="text-center">
|
||||
<strong>COPY TO THE USER</strong></p>
|
||||
<p class="text-center" style="font-size:0.8em;"><span t-field="company.cardex_warning"/></p>
|
||||
<p class="text-justify" style="font-size:0.7em;">En nombre de la empresa <strong>GRUPO ALDA HOTELS</strong> compuesto por Alda Rías Baixas SL, Alda Compostela SL, Alda Castilla SL, Hoteles Rías Altas SL, Comphostel Gestión Patrimonial SL y Consultores Hoteleros Integrales SL, tratamos la información que nos facilita, con el fin de prestarle el servicio solicitado y realizar la facturación del mismo. Se conservarán mientras se mantenga la relación comercial o durante los años necesarios para cumplir con las obligaciones legales. No se cederán a terceros salvo en los casos en que exista una obligación legal. Usted tiene derecho a obtener información sobre el tratamiento de sus datos personales, acceder, rectificar los inexactos o solicitar su supresión cuando ya no sean necesarios, en la dirección <strong>protecciondatos@aldahotels.com</strong> Asimismo hemos solicitado que confirme esta autorización para ofrecerle nuestros servicios y poder fidelizarle como cliente.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class='final'>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</data>
|
||||
</openerp>
|
||||
25
hotel_l10n_es/wizard/__init__.py
Normal file
25
hotel_l10n_es/wizard/__init__.py
Normal file
@@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from . import police_wizard
|
||||
from . import inherit_checkin_wizard
|
||||
from . import ine_wizard
|
||||
451
hotel_l10n_es/wizard/ine_wizard.py
Normal file
451
hotel_l10n_es/wizard/ine_wizard.py
Normal file
@@ -0,0 +1,451 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2017 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from odoo import models, fields, api, _
|
||||
import base64
|
||||
import datetime
|
||||
import calendar
|
||||
import xml.etree.cElementTree as ET
|
||||
from openerp.exceptions import UserError
|
||||
|
||||
|
||||
|
||||
def get_years():
|
||||
year_list = []
|
||||
for i in range(2017, get_year()+1):
|
||||
year_list.append((i, str(i)))
|
||||
return year_list
|
||||
|
||||
|
||||
def get_year():
|
||||
now = datetime.datetime.now()
|
||||
return int(now.year)
|
||||
|
||||
|
||||
def get_month():
|
||||
now = datetime.datetime.now()
|
||||
month = int(now.month)-1
|
||||
if month <= 0:
|
||||
month = 12
|
||||
return month
|
||||
|
||||
|
||||
class IneWizard(models.TransientModel):
|
||||
_name = 'ine.wizard'
|
||||
|
||||
txt_filename = fields.Char()
|
||||
txt_binary = fields.Binary()
|
||||
ine_month = fields.Selection([(1, 'January'), (2, 'February'),
|
||||
(3, 'March'), (4, 'April'),
|
||||
(5, 'May'), (6, 'June'), (7, 'July'),
|
||||
(8, 'August'), (9, 'September'),
|
||||
(10, 'October'), (11, 'November'),
|
||||
(12, 'December'), ],
|
||||
string='Month', default=get_month())
|
||||
ine_year = fields.Selection(get_years(), default=get_year(), string='Year')
|
||||
adr_screen = fields.Char()
|
||||
rev_screen = fields.Char()
|
||||
|
||||
@api.one
|
||||
def generate_file(self):
|
||||
month_first_date = datetime.datetime(self.ine_year, self.ine_month, 1)
|
||||
last_day = calendar.monthrange(self.ine_year, self.ine_month)[1] - 1
|
||||
month_end_date = month_first_date + datetime.timedelta(days=last_day)
|
||||
m_f_d_search = datetime.date(self.ine_year, self.ine_month, 1)
|
||||
m_e_d_search = m_f_d_search + datetime.timedelta(days=last_day)
|
||||
last_day += 1
|
||||
|
||||
# Seleccionamos los que tienen Entrada en el mes + salida en el mes +
|
||||
# entrada antes y salida despues. Ordenandolos.
|
||||
lines = self.env['hotel.checkin.partner'].search(
|
||||
['|', '|', '&', ('exit_date', '>=', m_f_d_search),
|
||||
('exit_date', '<=', m_e_d_search), '&',
|
||||
('enter_date', '>=', m_f_d_search),
|
||||
('enter_date', '<=', m_e_d_search), '&',
|
||||
('enter_date', '<=', m_f_d_search),
|
||||
('exit_date', '>=', m_e_d_search)], order="enter_date")
|
||||
lines = lines.sorted(
|
||||
key=lambda r: str(r.partner_id.code_ine)+r.enter_date)
|
||||
|
||||
if len(lines) > 0:
|
||||
|
||||
company = self.env.user.company_id
|
||||
|
||||
encuesta = ET.Element("ENCUESTA")
|
||||
cabezera = ET.SubElement(encuesta, "CABECERA")
|
||||
fecha = ET.SubElement(cabezera, "FECHA_REFERENCIA")
|
||||
ET.SubElement(fecha, "MES").text = '{:02d}'.format(self.ine_month)
|
||||
ET.SubElement(fecha, "ANYO").text = str(self.ine_year)
|
||||
month_end_date = (
|
||||
datetime.datetime(self.ine_year, self.ine_month, 1) +
|
||||
datetime.timedelta(days=calendar.monthrange(
|
||||
self.ine_year, self.ine_month)[1] - 1))
|
||||
ET.SubElement(cabezera, "DIAS_ABIERTO_MES_REFERENCIA").text = (
|
||||
str(month_end_date.day))
|
||||
ET.SubElement(cabezera, "RAZON_SOCIAL").text = company.name
|
||||
ET.SubElement(cabezera, "NOMBRE_ESTABLECIMIENTO").text = (
|
||||
company.property_name)
|
||||
ET.SubElement(cabezera, "CIF_NIF").text = company.vat[2:]
|
||||
ET.SubElement(cabezera, "NUMERO_REGISTRO").text = company.ine_tourism
|
||||
ET.SubElement(cabezera, "DIRECCION").text = company.street
|
||||
ET.SubElement(cabezera, "CODIGO_POSTAL").text = company.zip
|
||||
ET.SubElement(cabezera, "LOCALIDAD").text = company.city
|
||||
ET.SubElement(cabezera, "MUNICIPIO").text = company.city
|
||||
ET.SubElement(cabezera, "PROVINCIA"
|
||||
).text = company.state_id.display_name
|
||||
ET.SubElement(cabezera, "TELEFONO_1").text = (
|
||||
company.phone.replace(' ', '')[0:12])
|
||||
ET.SubElement(cabezera, "TIPO").text = company.ine_category_id.category_type
|
||||
ET.SubElement(cabezera, "CATEGORIA").text = company.ine_category_id.name
|
||||
active_room = self.env['hotel.room'].search_count(
|
||||
[('capacity', '>', 0)])
|
||||
ET.SubElement(cabezera, "HABITACIONES").text = str(active_room)
|
||||
ET.SubElement(cabezera, "PLAZAS_DISPONIBLES_SIN_SUPLETORIAS"
|
||||
).text = str(company.seats)
|
||||
ET.SubElement(cabezera, "URL").text = company.website
|
||||
alojamiento = ET.SubElement(encuesta, "ALOJAMIENTO")
|
||||
# Bucle de RESIDENCIA
|
||||
|
||||
# Init Variables
|
||||
ine_entrada = []
|
||||
ine_salidas = []
|
||||
ine_pernoct = []
|
||||
ine_pernoct_total = []
|
||||
for x in range(last_day+1):
|
||||
ine_entrada.append(0)
|
||||
ine_salidas.append(0)
|
||||
ine_pernoct.append(0)
|
||||
ine_pernoct_total.append(0)
|
||||
|
||||
# Cabezera
|
||||
code_control = lines[0].partner_id.code_ine_id.code
|
||||
|
||||
if code_control is False:
|
||||
_logger.error('Usuario sin codigo de INE: ' +
|
||||
lines[0].partner_id.name)
|
||||
raise UserError(_('ERROR: Usuario sin codigo de INE: '
|
||||
+ lines[0].partner_id.name))
|
||||
|
||||
for line in lines:
|
||||
# Si ha cambiado el codigo
|
||||
if code_control != line.partner_id.code_ine_id.code:
|
||||
residencia = ET.SubElement(alojamiento, "RESIDENCIA")
|
||||
if len(code_control) > 3:
|
||||
ET.SubElement(residencia, "ID_PROVINCIA_ISLA"
|
||||
).text = str(code_control)
|
||||
else:
|
||||
ET.SubElement(residencia, "ID_PAIS"
|
||||
).text = str(code_control)
|
||||
|
||||
for x in range(1, last_day+1):
|
||||
if ine_entrada[x]+ine_salidas[x]+ine_pernoct[x] > 0:
|
||||
movimiento = ET.SubElement(residencia,
|
||||
"MOVIMIENTO")
|
||||
ET.SubElement(movimiento, "N_DIA"
|
||||
).text = "%02d" % (x)
|
||||
ET.SubElement(movimiento, "ENTRADAS"
|
||||
).text = str(ine_entrada[x])
|
||||
ET.SubElement(movimiento, "SALIDAS"
|
||||
).text = str(ine_salidas[x])
|
||||
ET.SubElement(movimiento, "PERNOCTACIONES"
|
||||
).text = str(ine_pernoct[x])
|
||||
# Guardamos el total de pernoctaciones/dia
|
||||
ine_pernoct_total[x] += ine_pernoct[x]
|
||||
|
||||
# Reset Variables
|
||||
ine_entrada = []
|
||||
ine_salidas = []
|
||||
ine_pernoct = []
|
||||
for x in xrange(last_day+1):
|
||||
ine_entrada.append(0)
|
||||
ine_salidas.append(0)
|
||||
ine_pernoct.append(0)
|
||||
|
||||
code_control = line.partner_id.code_ine_id.code
|
||||
|
||||
# Hacemos las sumas
|
||||
f_entrada = line.enter_date.split('-')
|
||||
f_salida = line.exit_date.split('-')
|
||||
# Ha entrado este mes
|
||||
if int(f_entrada[1]) == self.ine_month:
|
||||
ine_entrada[int(f_entrada[2])] += 1
|
||||
cuenta_entrada = int(f_entrada[2])
|
||||
else:
|
||||
# No marco entrada y cuento desde el dia 1
|
||||
cuenta_entrada = 1
|
||||
# Ha salido este mes
|
||||
if int(f_salida[1]) == self.ine_month:
|
||||
ine_salidas[int(f_salida[2])] += 1
|
||||
cuenta_salida = int(f_salida[2])
|
||||
else:
|
||||
# No marco entrada y cuento desde el dia 1
|
||||
cuenta_salida = last_day+1
|
||||
# Contando pernoctaciones
|
||||
for i in range(cuenta_salida-cuenta_entrada):
|
||||
ine_pernoct[cuenta_entrada+i] += 1
|
||||
# Fin de cuenta desde Cardex
|
||||
|
||||
habitaciones = ET.SubElement(encuesta, "HABITACIONES")
|
||||
# Bucle de HABITACIONES_MOVIMIENTO
|
||||
|
||||
month_adr_sum = 0
|
||||
month_adr_rooms = 0
|
||||
month_revpar_staff_rooms = 0
|
||||
movimientos = []
|
||||
|
||||
# Reset Variables
|
||||
ine_entrada = []
|
||||
ine_salidas = []
|
||||
for x in range(last_day+1):
|
||||
ine_entrada.append(0)
|
||||
ine_salidas.append(0)
|
||||
|
||||
for x in range(last_day+1):
|
||||
movimientos.append([0, 0, 0, 0, 0, 0, active_room])
|
||||
# movimientos.append(['suple','doble','indi','otra','adr_sum',
|
||||
# 'adr_rum','adr_staff'])
|
||||
|
||||
lines_res = self.env['hotel.reservation'].search(
|
||||
['|', '|', '&', ('checkout', '>=', str(m_f_d_search)),
|
||||
('checkout', '<=', str(m_e_d_search)), '&',
|
||||
('checkin', '>=', str(m_f_d_search)),
|
||||
('checkin', '<=', str(m_e_d_search)), '&',
|
||||
('checkin', '<=', str(m_f_d_search)),
|
||||
('checkout', '>=', str(m_e_d_search))], order="checkin")
|
||||
for line_res in lines_res:
|
||||
room = self.env['hotel.room'].search([(
|
||||
'product_id', '=', line_res.product_id.id)])
|
||||
# No es Staff o Out y esta booking
|
||||
if (line_res.reservation_type == 'normal') and (
|
||||
(line_res.state == 'booking') or (
|
||||
line_res.state == 'done')):
|
||||
|
||||
# calculamos capacidad de habitacion
|
||||
# !!!!! ATENCION !!!!
|
||||
# pendiente de añadir un campo con las supletorias.
|
||||
# asumimos de momento que por defecto supletorias sera
|
||||
# 0 por ejemplo para todas......
|
||||
# cambiar/calcular la siguiente linea.
|
||||
suple_room = 0
|
||||
|
||||
capacidad = room.capacity + suple_room
|
||||
|
||||
# Cuadramos adultos con los checkin realizados.
|
||||
if line_res.adults > line_res.cardex_count:
|
||||
adultos = line_res.cardex_count
|
||||
else:
|
||||
adultos = line_res.adults
|
||||
|
||||
f_entrada = line_res.checkin.split('-')
|
||||
f_salida = line_res.checkout.split('-')
|
||||
f_entrada[2] = f_entrada[2].split()[0]
|
||||
f_salida[2] = f_salida[2].split()[0]
|
||||
|
||||
# Ha entrado este mes
|
||||
if int(f_entrada[1]) == self.ine_month:
|
||||
ine_entrada[int(f_entrada[2])] += 1
|
||||
cuenta_entrada = int(f_entrada[2])
|
||||
else:
|
||||
# No marco entrada y cuento desde el dia 1
|
||||
cuenta_entrada = 1
|
||||
# Ha salido este mes?
|
||||
if int(f_salida[1]) == self.ine_month:
|
||||
ine_salidas[int(f_salida[2])] += 1
|
||||
cuenta_salida = int(f_salida[2])
|
||||
else:
|
||||
# No marco salida y cuento hasta el dia last_day
|
||||
cuenta_salida = last_day + 1
|
||||
|
||||
# para las noches que ha estado
|
||||
for dia_x in range(cuenta_entrada, cuenta_salida+1):
|
||||
# si no supera el numero de habitaciones ni de
|
||||
# pernoctaciones totales del dia...
|
||||
if ((movimientos[dia_x-1][1]+movimientos[dia_x-1][2] +
|
||||
movimientos[dia_x-1][3]) < active_room and (
|
||||
((movimientos[dia_x-1][1]*2) +
|
||||
movimientos[dia_x-1][2] +
|
||||
movimientos[dia_x-1][3]) <
|
||||
ine_pernoct_total[dia_x-1])):
|
||||
if capacidad == 1:
|
||||
# Habitacion Individual
|
||||
movimientos[dia_x-1][3] += 1
|
||||
if adultos > 1:
|
||||
# Supletorias
|
||||
movimientos[dia_x-1][0] += 1
|
||||
elif capacidad == 2:
|
||||
# Habitacion Doble
|
||||
if adultos == 1:
|
||||
# Uso individual
|
||||
movimientos[dia_x-1][2] += 1
|
||||
else:
|
||||
# Doble
|
||||
movimientos[dia_x-1][1] += 1
|
||||
if adultos > 2:
|
||||
# Doble + supletorias
|
||||
movimientos[dia_x-1][0] += (adultos-2)
|
||||
elif capacidad > 2:
|
||||
# Otras Habitaciones
|
||||
movimientos[dia_x-1][3] += 1
|
||||
else:
|
||||
_logger.info(str(dia_x) +
|
||||
'Exceso de habitaciones ' +
|
||||
str(line_res) + ' ' + line_res.name +
|
||||
' ' + line_res.partner_id.name +
|
||||
' PERNOCT.: ' +
|
||||
str(ine_pernoct_total[dia_x-1]))
|
||||
|
||||
# ADR y RevPar
|
||||
for xx_lines in line_res.reservation_lines:
|
||||
# ADR calculo
|
||||
xx_dia = xx_lines.date.split('-')
|
||||
if int(xx_dia[1]) == self.ine_month:
|
||||
movimientos[int(xx_dia[2])][4] += xx_lines.price
|
||||
movimientos[int(xx_dia[2])][5] += 1
|
||||
|
||||
else:
|
||||
# Staff o Out
|
||||
for xx_lines in line_res.reservation_lines:
|
||||
xx_dia = xx_lines.date.split('-')
|
||||
if int(xx_dia[1]) == self.ine_month:
|
||||
# Restamos una Habitacion no valida para RevPar
|
||||
movimientos[int(xx_dia[2])][6] -= 1
|
||||
|
||||
for dia_x in xrange(1, last_day+1):
|
||||
# Si la suma de los durmiendo es superior a pernoctaciones INE
|
||||
suma_durmiendo = ((movimientos[dia_x][1]*2)
|
||||
+ movimientos[dia_x][2]
|
||||
+ movimientos[dia_x][3])
|
||||
if suma_durmiendo > ine_pernoct_total[dia_x]:
|
||||
suma_durmiendo = (suma_durmiendo -
|
||||
ine_pernoct_total[dia_x])
|
||||
if suma_durmiendo == 1:
|
||||
if movimientos[dia_x][2] > 0:
|
||||
# quitamos una individual
|
||||
movimientos[dia_x][2] -= 1
|
||||
elif movimientos[dia_x][3] > 0:
|
||||
# quitamos una otras
|
||||
movimientos[dia_x][3] -= 1
|
||||
elif suma_durmiendo == 2:
|
||||
if movimientos[dia_x][1] > 0:
|
||||
# quitamos una doble
|
||||
movimientos[dia_x][1] -= 1
|
||||
elif movimientos[dia_x][3] > 0:
|
||||
# quitamos una otras
|
||||
movimientos[dia_x][3] -= 1
|
||||
habitaciones_m = ET.SubElement(habitaciones,
|
||||
"HABITACIONES_MOVIMIENTO")
|
||||
ET.SubElement(habitaciones_m,
|
||||
"HABITACIONES_N_DIA").text = "%02d" % (dia_x)
|
||||
if ine_pernoct_total[dia_x] > company.seats:
|
||||
# Añadimos Supletorias por si excedemos plazas
|
||||
movimientos[dia_x][0] = (ine_pernoct_total[dia_x]
|
||||
- company.seats)
|
||||
_logger.info(' Dia: ' + str(dia_x) +
|
||||
' [ADD] Supletorias a : ' +
|
||||
str(movimientos[dia_x][0]))
|
||||
ET.SubElement(habitaciones_m,
|
||||
"PLAZAS_SUPLETORIAS").text = str(
|
||||
movimientos[dia_x][0])
|
||||
ET.SubElement(habitaciones_m,
|
||||
"HABITACIONES_DOBLES_USO_DOBLE").text = str(
|
||||
movimientos[dia_x][1])
|
||||
ET.SubElement(habitaciones_m,
|
||||
"HABITACIONES_DOBLES_USO_INDIVIDUAL").text = str(
|
||||
movimientos[dia_x][2])
|
||||
ET.SubElement(habitaciones_m,
|
||||
"HABITACIONES_OTRAS").text = str(
|
||||
movimientos[dia_x][3])
|
||||
|
||||
# calculo ADR
|
||||
month_adr_sum += movimientos[dia_x][4]
|
||||
month_adr_rooms += movimientos[dia_x][5]
|
||||
month_revpar_staff_rooms += movimientos[dia_x][6]
|
||||
|
||||
precios = ET.SubElement(encuesta, "PRECIOS")
|
||||
ET.SubElement(precios,
|
||||
"REVPAR_MENSUAL").text = str(
|
||||
round(month_adr_sum/month_revpar_staff_rooms, 2))
|
||||
ET.SubElement(precios,
|
||||
"ADR_MENSUAL").text = str(
|
||||
round(month_adr_sum/month_adr_rooms, 2))
|
||||
ET.SubElement(precios, "ADR_TOUROPERADOR_TRADICIONAL").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_TOUROPERADOR_TRADICIONAL"
|
||||
).text = '0'
|
||||
ET.SubElement(precios,
|
||||
"ADR_TOUROPERADOR_ONLINE").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_TOUROPERADOR_ONLINE"
|
||||
).text = '0'
|
||||
ET.SubElement(precios,
|
||||
"ADR_EMPRESAS").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_EMPRESAS").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"ADR_AGENCIA_DE_VIAJE_TRADICIONAL").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_AGENCIA_TRADICIONAL"
|
||||
).text = '0'
|
||||
ET.SubElement(precios, "ADR_AGENCIA_DE_VIAJE_ONLINE").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_AGENCIA_ONLINE"
|
||||
).text = '0'
|
||||
ET.SubElement(precios, "ADR_PARTICULARES").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_PARTICULARES").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"ADR_GRUPOS").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_GRUPOS").text = '0'
|
||||
ET.SubElement(precios, "ADR_INTERNET").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_INTERNET").text = '0'
|
||||
ET.SubElement(precios, "ADR_OTROS").text = '0'
|
||||
ET.SubElement(precios,
|
||||
"PCTN_HABITACIONES_OCUPADAS_OTROS").text = '0'
|
||||
|
||||
personal = ET.SubElement(encuesta, "PERSONAL_OCUPADO")
|
||||
ET.SubElement(personal, "PERSONAL_NO_REMUNERADO").text = '0'
|
||||
ET.SubElement(personal,
|
||||
"PERSONAL_REMUNERADO_FIJO").text = str(
|
||||
company.permanentstaff)
|
||||
ET.SubElement(personal,
|
||||
"PERSONAL_REMUNERADO_EVENTUAL").text = str(
|
||||
company.eventualstaff)
|
||||
|
||||
xmlstr = '<?xml version="1.0" encoding="ISO-8859-1"?>'
|
||||
xmlstr += ET.tostring(encuesta)
|
||||
# file=base64.encodestring( xmlstr )
|
||||
return self.write({
|
||||
'txt_filename': 'INE_'+str(self.ine_month)+'_'+str(
|
||||
self.ine_year) + '.' + 'xml',
|
||||
'adr_screen': _('ADR in the month of the survey: ')+str(
|
||||
round(month_adr_sum/month_adr_rooms, 2))+_('€ and '),
|
||||
'rev_screen': ' RevPar : '+str(round(
|
||||
month_adr_sum/month_revpar_staff_rooms, 2))+'€',
|
||||
'txt_binary': base64.encodestring(xmlstr)
|
||||
})
|
||||
else:
|
||||
return self.write({
|
||||
'rev_screen': _('No data in this month')
|
||||
})
|
||||
|
||||
51
hotel_l10n_es/wizard/ine_wizard.xml
Normal file
51
hotel_l10n_es/wizard/ine_wizard.xml
Normal file
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<act_window
|
||||
id="action_ine_download"
|
||||
name="Action INE File Download"
|
||||
res_model="ine.wizard"
|
||||
view_mode="form"
|
||||
/>
|
||||
|
||||
<record id="ine_wizard_form" model="ir.ui.view">
|
||||
<field name="name">ine.wizard.form</field>
|
||||
<field name="model">ine.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group string="Generar estadistica para el I.N.E." colspan="1">
|
||||
<field name="ine_year" style="width:110px;"/>
|
||||
<field name="ine_month" style="width:110px"/>
|
||||
</group>
|
||||
<div>
|
||||
<button name="generate_file" class="oe_form_button_save btn btn-primary btn-sm" type="object" string="Generate file"/>
|
||||
<field name="txt_filename" invisible="1"/>
|
||||
<field name="txt_binary" filename="txt_filename" readonly="1" style="margin-left: 20px;"/>
|
||||
</div>
|
||||
<separator string="ADR y RevPar"/>
|
||||
<group>
|
||||
<div>
|
||||
<field name="adr_screen" readonly="1"/>
|
||||
<field name="rev_screen" readonly="1"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<div><!-- site-exportine -->
|
||||
<p>Abrir web del I.N.E.: <a href="https://arce.ine.es/ARCE/jsp/encuestaXml.jsp" target="_blank">Presentar encuesta I.N.E. <i class="fa fa-signal"></i></a></p>
|
||||
</div>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_ine_download"
|
||||
name="INE File Download"
|
||||
parent="hotel.hotel_reports_menu"
|
||||
sequence="37"
|
||||
action="action_ine_download"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
172
hotel_l10n_es/wizard/inherit_checkin_wizard.py
Normal file
172
hotel_l10n_es/wizard/inherit_checkin_wizard.py
Normal file
@@ -0,0 +1,172 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2018 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from openerp import models, fields, api
|
||||
from openerp.exceptions import UserError
|
||||
from openerp.tools.translate import _
|
||||
from datetime import datetime, timedelta
|
||||
|
||||
class CheckinWizard(models.TransientModel):
|
||||
_inherit = 'checkin.wizard'
|
||||
|
||||
def validation_under_age(self):
|
||||
if self.birthdate_date_cardex != False:
|
||||
years = str(datetime.now().date() - timedelta(days=365*16+4))
|
||||
limit_date = datetime.strptime(years, "%Y-%m-%d")
|
||||
birth_date = datetime.strptime(self.birthdate_date_cardex, '%Y-%m-%d')
|
||||
limit = str(limit_date.day)+ ' de ' + str(limit_date.month)+ ' de ' + str(limit_date.year)
|
||||
if limit_date < birth_date:
|
||||
return {'warning': {'title': _('Error in Birthdate'), 'message': _('Does the client have less than 16 years?. Data collection is not performed for those born before %s.' % (limit)),},}
|
||||
if self.polexpedition_cardex != False:
|
||||
if self.birthdate_date_cardex > self.polexpedition_cardex:
|
||||
raise ValidationError(_('Date of document shipment, prior to birth date'))
|
||||
|
||||
@api.onchange('polexpedition_cardex')
|
||||
def validation_polexpedition(self):
|
||||
if self.birthdate_date_cardex != False and self.polexpedition_cardex != False:
|
||||
if self.birthdate_date_cardex > self.polexpedition_cardex:
|
||||
return {'warning': {'title': _('Error in Birthdate or Expedition date'), 'message': _('Date of document shipment, prior to birth date'),},}
|
||||
|
||||
# Validation for DNI/Permiso conducir erroneo
|
||||
@api.onchange('poldocument_cardex', 'documenttype_cardex')
|
||||
def validation_poldocument_dni(self):
|
||||
if self.poldocument_cardex != False:
|
||||
if self.documenttype_cardex in ['D','C']:
|
||||
validcaracter = "TRWAGMYFPDXBNJZSQVHLCKE"
|
||||
dig_ext = "XYZ"
|
||||
reemp_dig_ext = {'X':'0', 'Y':'1', 'Z':'2'}
|
||||
numeros = "1234567890"
|
||||
dni = self.poldocument_cardex.upper()
|
||||
if len(dni) == 9:
|
||||
dig_control = dni[8]
|
||||
dni = dni[:8]
|
||||
# 'extranjero empieza por XYZ'
|
||||
if dni[0] in dig_ext:
|
||||
dni = dni.replace(dni[0], reemp_dig_ext[dni[0]])
|
||||
if not ((len(dni) == len([n for n in dni if n in numeros])) and (validcaracter[int(dni)%23] == dig_control)):
|
||||
return {'warning': {'title': _('Error in DNI/NIE/DRIVE LICENSE'), 'message': _('Wrong DNI/NIE/DRIVE LICENSE, check it.'),},}
|
||||
else:
|
||||
return {'warning': {'title': _('Error in DNI/NIE/DRIVE LICENSE'), 'message': _('DNI/NIE/DRIVE LICENSE erroneous length, the correct format is: (12345678A or X1234567A)'),},}
|
||||
|
||||
# Validation for Tipo de documento no valido para Extranjero
|
||||
# @api.onchange('x')
|
||||
# Pendiente
|
||||
|
||||
# Validation for Nacionalidad erronea
|
||||
# @api.onchange('x')
|
||||
# Pendiente
|
||||
|
||||
# NOTE: All the fields are required but they are set required=True in the .xml
|
||||
# The reason is found in the bt_select_partner and bt_create_partner buttons to bypass the ORM null constraint
|
||||
# when the buttons are clicked to show the hidden fields
|
||||
|
||||
documenttype_cardex = fields.Selection([
|
||||
('D', 'DNI'),
|
||||
('P', 'Pasaporte'),
|
||||
('C', 'Permiso de Conducir'),
|
||||
('I', 'Carta o Doc. de Identidad'),
|
||||
('N', 'Permiso Residencia Español'),
|
||||
('X', 'Permiso Residencia Europeo')],
|
||||
help='Select a valid document type',
|
||||
default='D',
|
||||
string='Doc. type')
|
||||
|
||||
poldocument_cardex = fields.Char('Doc. number')
|
||||
|
||||
polexpedition_cardex = fields.Date('Expedition date')
|
||||
|
||||
gender_cardex = fields.Selection([('male', 'Male'), ('female', 'Female')])
|
||||
|
||||
birthdate_date_cardex = fields.Date("Birthdate")
|
||||
|
||||
code_ine_cardex = fields.Many2one('code_ine',
|
||||
help='Country or province of origin. Used for INE statistics.')
|
||||
|
||||
# TODO: Add tags in the cardex not in the partner anb move this field to out of localization
|
||||
#category_id_cardex = fields.Many2many('res.partner.category', 'id', required=True)
|
||||
|
||||
@api.multi
|
||||
def pdf_viajero(self, cardex_id):
|
||||
cardex = self.env['cardex'].search([('id', '=', cardex_id)])
|
||||
return self.env['report'].get_action(cardex, 'report.viajero')
|
||||
|
||||
@api.multi
|
||||
def action_save_check(self):
|
||||
# Check dates
|
||||
self.validation_under_age()
|
||||
# take a 'snapshot' of the current cardexes in this reservation
|
||||
record_id = self.env['hotel.reservation'].browse(self.reservation_id.id)
|
||||
old_cardex = self.env['cardex'].search([('reservation_id', '=', record_id.id)])
|
||||
|
||||
# the above lines must be executed before call the super().action_save_check()
|
||||
|
||||
# call the super action_save_check() for checkin
|
||||
super(Wizard, self).action_save_check()
|
||||
|
||||
# prepare category in partner from category_id
|
||||
the_list = self.segmentation_id - self.partner_id.category_id
|
||||
the_list = self.partner_id.category_id + the_list
|
||||
|
||||
# prepare localization partner values
|
||||
partner_vals = {
|
||||
'documenttype': self.documenttype_cardex,
|
||||
'poldocument': self.poldocument_cardex,
|
||||
'polexpedition': self.polexpedition_cardex,
|
||||
'gender': self.gender_cardex,
|
||||
'birthdate_date': self.birthdate_date_cardex,
|
||||
# (4, ID) link to existing record with id = ID (adds a relationship) ...
|
||||
'code_ine': self.code_ine_cardex.id,
|
||||
# (6, 0, [IDs]) replace the list of linked IDs ...
|
||||
'category_id': [(6, False, [x.id for x in the_list])],
|
||||
}
|
||||
|
||||
# Update Accounting VAT number on customer
|
||||
if self.documenttype_cardex in ('D','C'):
|
||||
partner_vat = 'ES' + self.poldocument_cardex
|
||||
partner_vals.update({
|
||||
'vat': partner_vat
|
||||
})
|
||||
|
||||
# Are you templed to merge the following write with the super() ?
|
||||
# Be warned: Premature optimization is the root of all evil -- DonaldKnuth
|
||||
# This TransientModel inherit from checkin.wizard and it is intended for localization
|
||||
# So, if you need to write something here must be _after_ the super()
|
||||
|
||||
# update the localization partner values for this reservation
|
||||
self.partner_id.sudo().write(partner_vals);
|
||||
|
||||
# get the last cardex in this reservation (set difference theory)
|
||||
cardex = self.env['cardex'].search([('reservation_id', '=', record_id.id)]) - old_cardex
|
||||
return self.pdf_viajero(cardex.id)
|
||||
|
||||
@api.onchange('partner_id')
|
||||
def onchange_partner_id(self):
|
||||
# call the super update_partner_fields
|
||||
super(Wizard, self).onchange_partner_id()
|
||||
# update local fields
|
||||
self.documenttype_cardex = self.partner_id.documenttype;
|
||||
self.poldocument_cardex = self.partner_id.poldocument;
|
||||
self.polexpedition_cardex = self.partner_id.polexpedition;
|
||||
self.gender_cardex = self.partner_id.gender;
|
||||
self.birthdate_date_cardex = self.partner_id.birthdate_date;
|
||||
self.code_ine_cardex = self.partner_id.code_ine;
|
||||
#self.category_id_cardex = self.partner_id.category_id;
|
||||
37
hotel_l10n_es/wizard/inherit_checkin_wizard.xml
Normal file
37
hotel_l10n_es/wizard/inherit_checkin_wizard.xml
Normal file
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<record id="checkin_wizard_form_2" model="ir.ui.view">
|
||||
<field name="name">wizard.form2</field>
|
||||
<field name="model">checkin.wizard</field>
|
||||
<field name="inherit_id" ref="hotel.checkin_wizard_form_2" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//footer" position="before">
|
||||
<group col="4" attrs="{'invisible':[('checkin_mode', '=', 0)]}" >
|
||||
<field name="documenttype_cardex" colspan="2" required="True"/>
|
||||
<newline/>
|
||||
<field name="poldocument_cardex" colspan="2" required="True"/>
|
||||
<field name="polexpedition_cardex" colspan="2" required="True"/>
|
||||
</group>
|
||||
<group col="4" attrs="{'invisible':[('checkin_mode', '=', 0)]}" >
|
||||
<field name="gender_cardex" colspan="2" required="True"/>
|
||||
<field name="birthdate_date_cardex" colspan="2" required="True"/>
|
||||
</group>
|
||||
<group col="4" attrs="{'invisible':[('checkin_mode', '=', 0)]}" >
|
||||
<field name="code_ine_cardex" placeholder="Code in INE"
|
||||
options="{'no_create': True,'no_open': True}" required="True"/>
|
||||
|
||||
<!-- <field name="category_id_cardex" widget="many2many_tags" placeholder="Tags..."
|
||||
options="{'no_create': True,'no_open': True}" /> -->
|
||||
<field name="segmentation_id" widget="many2many_tags" placeholder="Segmentation..."
|
||||
options="{'no_create': True,'no_open': True}" required="True"/>
|
||||
</group>
|
||||
</xpath>
|
||||
<xpath expr="//button[@name='action_save_check']" position="replace">
|
||||
<button name="action_save_check" string="Save Checkin and Print" type="object"
|
||||
attrs="{'invisible':[('checkin_mode', '=', 0)]}"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
108
hotel_l10n_es/wizard/police_wizard.py
Normal file
108
hotel_l10n_es/wizard/police_wizard.py
Normal file
@@ -0,0 +1,108 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
##############################################################################
|
||||
#
|
||||
# OpenERP, Open Source Management Solution
|
||||
# Copyright (C) 2018 Alda Hotels <informatica@aldahotels.com>
|
||||
# Jose Luis Algara <osotranquilo@gmail.com>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
from odoo import models, fields, api
|
||||
import base64
|
||||
import datetime
|
||||
from odoo.tools.translate import _
|
||||
|
||||
|
||||
|
||||
class PoliceWizard(models.TransientModel):
|
||||
_name = 'police.wizard'
|
||||
|
||||
download_date = fields.Date('Date', required=True)
|
||||
download_num = fields.Char('Correlative number', required=True, size=3,
|
||||
help='Number provided by the police')
|
||||
txt_filename = fields.Char()
|
||||
txt_binary = fields.Binary()
|
||||
txt_message = fields.Char()
|
||||
|
||||
@api.one
|
||||
def generate_file(self):
|
||||
company = self.env.user.company_id
|
||||
if company.police_number is not False and company.property_name is not False:
|
||||
lines = self.env['cardex'].search([('enter_date', '=',
|
||||
self.download_date)])
|
||||
content = "1|"+company.police_number+"|"+compa.property_name.upper()[0:40]
|
||||
content += "|"
|
||||
content += datetime.datetime.now().strftime("%Y%m%d|%H%M")
|
||||
content += "|"+str(len(lines)) + """
|
||||
"""
|
||||
|
||||
for line in lines:
|
||||
if ((line.partner_id.document_type is not False)
|
||||
and (line.partner_id.document_number is not False)
|
||||
and (line.partner_id.firstname is not False)
|
||||
and (line.partner_id.lastname is not False)):
|
||||
|
||||
if len(line.partner_id.code_ine.code) == 5:
|
||||
content += "2|"+line.partner_id.document_number.upper(
|
||||
) + "||"
|
||||
else:
|
||||
content += "2||"+line.partner_id.document_number.upper(
|
||||
) + "|"
|
||||
content += line.partner_id.document_type + "|"
|
||||
content += datetime.datetime.strptime(
|
||||
line.partner_id.document_expedition_date,
|
||||
"%Y-%m-%d").date().strftime("%Y%m%d") + "|"
|
||||
lastname = line.partner_id.lastname.split()
|
||||
if len(lastname) >= 2:
|
||||
content += lastname[0].upper() + "|"
|
||||
lastname.pop(0)
|
||||
for string in lastname:
|
||||
content += string.upper() + " "
|
||||
content = content[:len(content) - 1]
|
||||
else:
|
||||
content += lastname[0].upper() + "|"
|
||||
content += "|"
|
||||
content += line.partner_id.firstname.upper() + "|"
|
||||
content += line.partner_id.gender.upper()[0] + "|"
|
||||
content += datetime.datetime.strptime(
|
||||
line.partner_id.birthdate_date,
|
||||
"%Y-%m-%d").date().strftime("%Y%m%d") + "|"
|
||||
if len(line.partner_id.code_ine.code) == 5:
|
||||
content += u'ESPAÑA|'
|
||||
else:
|
||||
content += line.partner_id.code_ine.name.upper()[0:21]
|
||||
content += "|"
|
||||
content += datetime.datetime.strptime(
|
||||
line.enter_date,
|
||||
"%Y-%m-%d").date().strftime("%Y%m%d") + "|"
|
||||
content += """
|
||||
"""
|
||||
else:
|
||||
return self.write({
|
||||
'txt_message': _('Problem generating the file. \
|
||||
Checkin without data, \
|
||||
or incorrect data: - ' +
|
||||
line.partner_id.name)})
|
||||
|
||||
return self.write({
|
||||
'txt_filename': company.police_number + '.' + self.download_num,
|
||||
'txt_message': _(
|
||||
'Generated file. Download it and give it to the police.'),
|
||||
'txt_binary': base64.encodestring(content.encode("iso-8859-1"))
|
||||
})
|
||||
return self.write({
|
||||
'txt_message': _('File not generated by configuration error.')
|
||||
})
|
||||
50
hotel_l10n_es/wizard/police_wizard.xml
Normal file
50
hotel_l10n_es/wizard/police_wizard.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0"?>
|
||||
<odoo>
|
||||
|
||||
<act_window
|
||||
id="action_police_download"
|
||||
name="Action Police File Download"
|
||||
res_model="police.wizard"
|
||||
view_mode="form"
|
||||
/>
|
||||
|
||||
<record id="view_police_download" model="ir.ui.view">
|
||||
<field name="name">Police File Download</field>
|
||||
<field name="model">police.wizard</field>
|
||||
<field name="arch" type="xml">
|
||||
<form>
|
||||
<sheet>
|
||||
<group string="Create Police File" colspan="1">
|
||||
<field name="download_date"/>
|
||||
<field name="download_num" style="max-width:3em"/>
|
||||
</group>
|
||||
<div>
|
||||
<button name="generate_file" class="oe_form_button_save btn btn-primary btn-sm" type="object" string="Generate Police file"/>
|
||||
<field name="txt_filename" invisible="1"/>
|
||||
<field name="txt_binary" filename="txt_filename" readonly="1" style="margin-left: 20px;"/>
|
||||
</div>
|
||||
<group>
|
||||
<div>
|
||||
<field name="txt_message" readonly="1"/>
|
||||
</div>
|
||||
</group>
|
||||
<group>
|
||||
<div>
|
||||
<p>Abrir web de la Polícia para entregar el fichero generado: <a href="https://webpol.policia.es/e-hotel" target="_blank">Policia <i class="fa fa-flag"></i></a></p>
|
||||
<p>Abrir web de la Guardia Civil para entregar el fichero generado: <a href="https://hospederias.guardiacivil.es" target="_blank">Guardia Civil <i class="fa fa-tree"></i></a></p>
|
||||
</div>
|
||||
</group>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem
|
||||
id="menu_police_download"
|
||||
name="Police File Download"
|
||||
parent="hotel.hotel_reports_menu"
|
||||
sequence="36"
|
||||
action="action_police_download"
|
||||
/>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user