[NEW] Addons creation - product_rental_inspection

This commit is contained in:
Stéphan Sainléger
2022-04-19 11:57:33 +02:00
parent 62059b6676
commit 15429f38dc
14 changed files with 720 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record id="report_inspection_pass" model="ir.actions.report">
<field name="name">Inspection Report</field>
<field name="model">rental.product.inspection</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">product_rental_bookings.inspection_report_template</field>
<field name="report_file">product_rental_bookings.inspection_report_template</field>
<field name="print_report_name">'Inspection Report'</field>
<field name="binding_model_id" ref="model_rental_product_inspection" />
<field name="binding_type">report</field>
</record>
</data>
</odoo>

View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_inspection_document">
<t t-set="doc" t-value="doc.with_context({'lang':doc.partner_id.lang})" />
<t t-call="web.external_layout"></t>
</template>
<template id="inspection_report_template">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<h1>
#No.
<span t-field="o.ref_number" />
</h1>
<h2>
Product:
<span t-field="o.product_id.name" />
</h2>
<div class="row">
<div class="col-3">
<strong>Inspection Date:</strong>
<br />
<span t-field="o.date" />
</div>
<div class="col-4">
<strong>Source Document:</strong>
<br />
<span t-field="o.source_document" />
</div>
<div class="col-4">
<strong>Responsible:</strong>
<br />
<span t-field="o.responsible_person_id.name" />
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>