[WIP] l10n_es

This commit is contained in:
Dario Lodeiros
2019-01-10 17:59:36 +01:00
parent 87fc71567d
commit eeb43074e7
10 changed files with 61 additions and 69 deletions

View File

@@ -36,8 +36,8 @@
'partner_firstname',
],
'data': [
'data/code_ine.csv',
'data/category_tourism.csv',
'data/code.ine.csv',
'data/tourism.category.csv',
'data/report_viajero_paperformat.xml',
'report/report_parte_viajero.xml',
'views/report_viajero.xml',

View File

@@ -41,6 +41,6 @@ class Inherit_res_company(models.Model):
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',
ine_category_id = fields.Many2one('tourism.category',
help='Hotel category in the Ministry of \
Tourism. Used for INE statistics.')

View File

@@ -1,18 +1,12 @@
<?xml version="1.0"?>
<openerp>
<data>
<odoo>
<report
id="action_report_viajero"
string="Parte de Viajero"
model="checkin.partner"
report_type="qweb-pdf"
name="report.viajero"
file="report.viajero"
/>
<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>
</odoo>

View File

@@ -2,23 +2,23 @@
<odoo>
<act_window
id="action_category_tourism"
name="Category Codes"
res_model="category"
id="action_tourism_category"
name="action.tourism.category"
res_model="tourism.category"
view_mode="tree,form"
/>
<menuitem
id="menu_category_tourism"
name="Category Codes"
id="menu_tourism_category"
name="menu.tourism.category"
parent="hotel.configuration_others"
sequence="30"
action="action_category"
action="action_tourism_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>
<record id="tourism_category_view_form" model="ir.ui.view">
<field name="name">tourism.category.view.form</field>
<field name="model">tourism.category</field>
<field name="arch" type="xml">
<form>
<sheet>
@@ -38,9 +38,9 @@
</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>
<record id="tourism_category_view_tree" model="ir.ui.view">
<field name="name">tourism.category.view.tree</field>
<field name="model">tourism.category</field>
<field name="arch" type="xml">
<tree>
<field name="display_name"/>

View File

@@ -1,35 +1,33 @@
<?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"/>
<odoo>
<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>
</template>
</data>
</openerp>
<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>
</odoo>

View File

@@ -84,7 +84,7 @@ class IneWizard(models.TransientModel):
('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)
key=lambda r: str(r.partner_id.code_ine_id)+r.enter_date)
if len(lines) > 0:

View File

@@ -98,7 +98,7 @@ class CheckinWizard(models.TransientModel):
birthdate_date_cardex = fields.Date("Birthdate")
code_ine_cardex = fields.Many2one('code_ine',
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

View File

@@ -55,7 +55,7 @@ class PoliceWizard(models.TransientModel):
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:
if len(line.partner_id.code_ine_id.code) == 5:
content += "2|"+line.partner_id.document_number.upper(
) + "||"
else:
@@ -80,10 +80,10 @@ class PoliceWizard(models.TransientModel):
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:
if len(line.partner_id.code_ine_id.code) == 5:
content += u'ESPAÑA|'
else:
content += line.partner_id.code_ine.name.upper()[0:21]
content += line.partner_id.code_ine_id.name.upper()[0:21]
content += "|"
content += datetime.datetime.strptime(
line.enter_date,