[NEW] Addons creation - product_rental_inspection
This commit is contained in:
15
product_rental_inspection/report/inspection_report.xml
Executable file
15
product_rental_inspection/report/inspection_report.xml
Executable 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>
|
44
product_rental_inspection/report/inspection_report_template.xml
Executable file
44
product_rental_inspection/report/inspection_report_template.xml
Executable 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>
|
Reference in New Issue
Block a user