[WIP] report parte viajero

This commit is contained in:
Dario Lodeiros
2019-02-11 13:23:56 +01:00
parent 6f682074eb
commit bf3e75c24b
5 changed files with 19 additions and 19 deletions

View File

@@ -1,12 +1,12 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<odoo> <odoo>
<report <report
id="action_report_viajero" id="action_report_viajero"
string="Parte de Viajero" string="Parte de Viajero"
model="checkin.partner" model="hotel.checkin.partner"
report_type="qweb-pdf" report_type="qweb-pdf"
name="report.viajero" name="hotel_l10n_es.report_viajero"
file="report.viajero" file="hotel_l10n_es.report_viajero"
/> />
</odoo> </odoo>

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record id="hotel_checkin_partner_view_form" model="ir.ui.view"> <record id="hotel_checkin_partner_view_form" model="ir.ui.view">
<field name="name">hotel.checkin.partner.view.form</field> <field name="name">hotel.checkin.partner.view.form</field>
<field name="model">hotel.checkin.partner</field> <field name="model">hotel.checkin.partner</field>
@@ -62,5 +62,5 @@
</xpath> </xpath>
</field> </field>
</record> </record>
</odoo> </odoo>

View File

@@ -24,7 +24,7 @@
.titulo {font-size:0.93em;} .titulo {font-size:0.93em;}
.titulo2 {font-size:1.93em;} .titulo2 {font-size:1.93em;}
</t> </t>
<t t-call="report.html_container"> <t t-call="web.html_container">
<t t-foreach="docs" t-as="o"> <t t-foreach="docs" t-as="o">
<t t-call="hotel_l10n_es.report_viajero_document" t-lang="o.partner_id.lang"/> <t t-call="hotel_l10n_es.report_viajero_document" t-lang="o.partner_id.lang"/>
</t> </t>

View File

@@ -11,8 +11,8 @@
style="width:100%; max-heigth:50px; margin:0 0 1em 0;"/> style="width:100%; max-heigth:50px; margin:0 0 1em 0;"/>
<p style="font-size:1.16em;">PART OF TRAVELERS ENTRY</p> <p style="font-size:1.16em;">PART OF TRAVELERS ENTRY</p>
<p class="numerocheck">Document number: <strong><span t-field="o.id"/></strong>/ <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="o.reservation_id.room_id.description_sale"><span t-field="o.reservation_id.folio_id"/> ( <span t-field="o.reservation_id.room_id.description_sale"/>)</span>
<span t-if="not o.reservation_id.product_id.description_sale"><span t-field="o.reservation_id"/></span> <span t-if="not o.reservation_id.room_id.description_sale"><span t-field="o.reservation_id"/></span>
</p> </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 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/> <p><strong>CIF: <span t-field="company.vat"/></strong><br/>
@@ -30,21 +30,21 @@
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Document number</td> Document number</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <span t-field="o.partner_id.poldocument"/></strong></td> <strong> <span t-field="o.document_number"/></strong></td>
</tr> </tr>
<tr> <tr>
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Type</td> Type</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <strong>
<t t-esc="dict(o.partner_id.fields_get(allfields=['documenttype'])['documenttype']['selection'])[o.partner_id.documenttype]"/> <t t-esc="dict(o.partner_id.fields_get(allfields=['document_type'])['document_type']['selection'])[o.partner_id.document_type]"/>
</strong></td> </strong></td>
</tr> </tr>
<tr> <tr>
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Expedition date</td> Expedition date</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <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> <strong> <span t-field="o.partner_id.document_expedition_date" t-options='{"format": "d MMMM y"}'/></strong></td>
</tr> </tr>
</table><br/> </table><br/>
</div> </div>
@@ -86,7 +86,7 @@
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Origin</td> Origin</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <span t-field="o.partner_id.code_ine"/></strong></td> <strong> <span t-field="o.partner_id.code_ine_id"/></strong></td>
</tr> </tr>
</table><br/> </table><br/>
</div> </div>
@@ -148,21 +148,21 @@
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Document number</td> Document number</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <span t-field="o.partner_id.poldocument"/></strong></td> <strong> <span t-field="o.partner_id.document_number"/></strong></td>
</tr> </tr>
<tr> <tr>
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Type</td> Type</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <strong>
<t t-esc="dict(o.partner_id.fields_get(allfields=['documenttype'])['documenttype']['selection'])[o.partner_id.documenttype]"/> <t t-esc="dict(o.partner_id.fields_get(allfields=['document_type'])['document_type']['selection'])[o.partner_id.document_type]"/>
</strong></td> </strong></td>
</tr> </tr>
<tr> <tr>
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Expedition date</td> Expedition date</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <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> <strong> <span t-field="o.partner_id.document_expedition_date" t-options='{"format": "d MMMM y"}'/></strong></td>
</tr> </tr>
</table><br/> </table><br/>
</div> </div>
@@ -204,7 +204,7 @@
<td width="40%" style="padding-left:3px;border:double; border-width: 1px"> <td width="40%" style="padding-left:3px;border:double; border-width: 1px">
Origin</td> Origin</td>
<td width="100%" style="padding-left:3px;border:double; border-width: 1px"> <td width="100%" style="padding-left:3px;border:double; border-width: 1px">
<strong> <span t-field="o.partner_id.code_ine"/></strong></td> <strong> <span t-field="o.partner_id.code_ine_id"/></strong></td>
</tr> </tr>
</table><br/> </table><br/>
</div> </div>

View File

@@ -107,7 +107,7 @@ class CheckinWizard(models.TransientModel):
@api.multi @api.multi
def pdf_viajero(self, cardex_id): def pdf_viajero(self, cardex_id):
cardex = self.env['cardex'].search([('id', '=', cardex_id)]) cardex = self.env['cardex'].search([('id', '=', cardex_id)])
return self.env['report'].get_action(cardex, 'report.viajero') return self.env['report'].get_action(cardex, 'action.report.viajero')
@api.multi @api.multi
def action_save_check(self): def action_save_check(self):