changes
This commit is contained in:
399
fusion_rental/report/report_rental_agreement.xml
Normal file
399
fusion_rental/report/report_rental_agreement.xml
Normal file
@@ -0,0 +1,399 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Fusion Rental Enhancement
|
||||
License OPL-1 (Odoo Proprietary License v1.0)
|
||||
Rental Agreement Document - Compact 2-Page Layout
|
||||
-->
|
||||
<odoo>
|
||||
<template id="report_rental_agreement">
|
||||
<t t-call="web.html_container">
|
||||
<t t-foreach="docs" t-as="doc">
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="doc" t-value="doc.with_context(lang=doc.partner_id.lang)"/>
|
||||
<t t-set="company" t-value="doc.company_id"/>
|
||||
|
||||
<style>
|
||||
.fc-rental { font-family: Arial, sans-serif; font-size: 8pt; line-height: 1.3; }
|
||||
.fc-rental h1 { color: #0066a1; font-size: 14pt; text-align: center; margin: 5px 0 10px 0; }
|
||||
.fc-rental h2 { color: #0066a1; font-size: 9pt; margin: 6px 0 3px 0; font-weight: bold; }
|
||||
.fc-rental p { margin: 2px 0; text-align: justify; }
|
||||
.fc-rental .parties { font-size: 8pt; margin-bottom: 8px; }
|
||||
.fc-rental .intro { margin-bottom: 8px; font-size: 8pt; }
|
||||
.fc-rental table { width: 100%; border-collapse: collapse; }
|
||||
.fc-rental table.bordered, .fc-rental table.bordered th, .fc-rental table.bordered td { border: 1px solid #000; }
|
||||
.fc-rental th { background-color: #0066a1; color: white; padding: 4px 6px; font-weight: bold; font-size: 8pt; }
|
||||
.fc-rental td { padding: 3px 5px; vertical-align: top; font-size: 8pt; }
|
||||
.fc-rental .text-center { text-align: center; }
|
||||
.fc-rental .text-right { text-align: right; }
|
||||
.fc-rental .info-header { background-color: #f5f5f5; color: #333; font-weight: bold; }
|
||||
|
||||
/* Two-column layout for terms */
|
||||
.fc-rental .terms-container { column-count: 2; column-gap: 20px; margin-top: 10px; }
|
||||
.fc-rental .term-section { break-inside: avoid; margin-bottom: 8px; }
|
||||
|
||||
/* Credit card section - 15% taller */
|
||||
.fc-rental .cc-section { margin-top: 12px; padding: 12px; border: 2px solid #0066a1; background-color: #f8f9fa; }
|
||||
.fc-rental .cc-title { font-size: 10pt; font-weight: bold; color: #0066a1; margin-bottom: 10px; text-align: center; }
|
||||
.fc-rental .cc-box { border: 1px solid #000; display: inline-block; width: 21px; height: 21px; text-align: center; background: white; }
|
||||
.fc-rental .authorization-text { font-size: 7pt; margin-top: 10px; font-style: italic; }
|
||||
|
||||
/* Signature - 40% taller */
|
||||
.fc-rental .signature-section { margin-top: 15px; }
|
||||
.fc-rental .signature-box { border: 1px solid #000; padding: 12px; }
|
||||
.fc-rental .signature-line { border-bottom: 1px solid #000; min-height: 35px; margin-bottom: 5px; }
|
||||
.fc-rental .signature-label { font-size: 7pt; color: #666; }
|
||||
|
||||
.fc-rental .text-end { text-align: right; }
|
||||
</style>
|
||||
|
||||
<div class="fc-rental">
|
||||
<div class="page">
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- PAGE 1: TERMS AND CONDITIONS -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<h1>RENTAL AGREEMENT</h1>
|
||||
|
||||
<!-- Parties - Compact -->
|
||||
<div class="parties">
|
||||
<strong>BETWEEN:</strong> <t t-esc="company.name"/> ("Company")
|
||||
<strong style="margin-left: 20px;">AND:</strong> <t t-esc="doc.partner_id.name"/> ("Renter")
|
||||
</div>
|
||||
|
||||
<!-- Introduction -->
|
||||
<div class="intro">
|
||||
<p><t t-esc="company.name"/> rents to the Renter medical equipment (hospital beds, patient lifts, trapeze, over-bed tables, mobility scooters, electric wheelchairs, manual wheelchairs, stairlifts, ceiling lifts and lift chairs) subject to the terms and conditions set forth in this Rental Agreement.</p>
|
||||
</div>
|
||||
|
||||
<!-- Terms and Conditions in Two Columns -->
|
||||
<div class="terms-container">
|
||||
|
||||
<div class="term-section">
|
||||
<h2>1. Ownership and Condition of Equipment</h2>
|
||||
<p>The medical equipment is the property of <t t-esc="company.name"/> and is provided in good condition. The Renter shall return the equipment in the same condition as when received, subject to normal wear and tear. <t t-esc="company.name"/> reserves the right to inspect the equipment upon its return and may repossess it without prior notice if it is being used in violation of this agreement.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>2. Cancellation Policy</h2>
|
||||
<p>The Renter may cancel the order before delivery and will be charged twenty-five percent (25%) of the total rental cost. If the order is canceled during the rental period after delivery, no refund will be provided.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>3. Security Deposit</h2>
|
||||
<p>The security deposit will be returned after an inspection of the equipment. If the equipment has any damage, the cost of repairs will be deducted from the security deposit. If the security deposit is insufficient to cover the damages, the credit card on file will be charged for the remaining amount. Security deposit refunds may take 4 to 15 business days to process. <t t-esc="company.name"/> is not responsible for delays caused by the Renter's financial institution.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>4. Liability for Loss or Damage</h2>
|
||||
<p><t t-esc="company.name"/> shall not be liable for any loss of or damage to property left, lost, damaged, stolen, stored, or transported by the Renter or any other person using the medical equipment. The Renter assumes all risks associated with such loss or damage and waives any claims against <t t-esc="company.name"/>. The Renter agrees to defend, indemnify, and hold <t t-esc="company.name"/> harmless against all claims arising from such loss or damage.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>5. Risk and Liability</h2>
|
||||
<p>The Renter assumes all risk and liability for any loss, damage, injury, or death resulting from the use or operation of the medical equipment. <t t-esc="company.name"/> is not responsible for any acts or omissions of the Renter or the Renter's agents, servants, or employees.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>6. Renter Responsibilities</h2>
|
||||
<p>The Renter is responsible for the full cost of replacement for any damage, loss, theft, or destruction of the medical equipment. <t t-esc="company.name"/> may charge the Renter's credit card for repair or replacement costs as deemed necessary. The equipment must not be used by individuals under the age of 18, under the influence of intoxicants or narcotics, or in an unsafe manner.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>7. Indemnification</h2>
|
||||
<p>The Renter shall indemnify, defend, and hold harmless <t t-esc="company.name"/>, its agents, officers, and employees, from any claims, demands, actions, or causes of action arising from the use or operation of the medical equipment, except where caused by <t t-esc="company.name"/>'s gross negligence or willful misconduct.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>8. Accident Notification</h2>
|
||||
<p>The Renter must immediately notify <t t-esc="company.name"/> of any accidents, damages, or incidents involving the medical equipment.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>9. Costs and Expenses</h2>
|
||||
<p>The Renter agrees to cover all costs, expenses, and attorney's fees incurred by <t t-esc="company.name"/> in collecting overdue payments, recovering possession of the equipment, or enforcing claims for damage or loss.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>10. Independent Status</h2>
|
||||
<p>The Renter or any driver of the equipment shall not be considered an agent or employee of <t t-esc="company.name"/>.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>11. Binding Obligations</h2>
|
||||
<p>Any individual signing this agreement on behalf of a corporation or other entity shall be personally liable for all obligations under this agreement. This agreement is binding upon the heirs, executors, administrators, and assigns of the Renter.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>12. Refusal of Service</h2>
|
||||
<p><t t-esc="company.name"/> reserves the right to refuse rental to any individual or entity at its sole discretion.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>13. Governing Law</h2>
|
||||
<p>This Agreement shall be governed by and construed in accordance with the laws of the jurisdiction in which <t t-esc="company.name"/> operates.</p>
|
||||
</div>
|
||||
|
||||
<div class="term-section">
|
||||
<h2>14. Entire Agreement</h2>
|
||||
<p>This Agreement constitutes the entire understanding between the parties concerning the rental of medical equipment and supersedes all prior agreements, representations, or understandings, whether written or oral.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ============================================================ -->
|
||||
<!-- PAGE 2: RENTAL DETAILS, PAYMENT, AND SIGNATURE -->
|
||||
<!-- ============================================================ -->
|
||||
|
||||
<div style="page-break-before: always;"></div>
|
||||
|
||||
<h1>RENTAL DETAILS</h1>
|
||||
|
||||
<!-- Customer Info and Rental Period Side by Side -->
|
||||
<table style="width: 100%; margin-bottom: 10px;">
|
||||
<tr>
|
||||
<td style="width: 50%; vertical-align: top; padding-right: 10px;">
|
||||
<table class="bordered" style="width: 100%;">
|
||||
<tr>
|
||||
<th colspan="2" class="info-header" style="background-color: #0066a1; color: white;">RENTER INFORMATION</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 35%; font-weight: bold; background-color: #f5f5f5;">Name</td>
|
||||
<td><t t-esc="doc.partner_id.name"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Address</td>
|
||||
<td>
|
||||
<div t-field="doc.partner_shipping_id"
|
||||
t-options="{'widget': 'contact', 'fields': ['address'], 'no_marker': True}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Phone</td>
|
||||
<td><t t-esc="doc.partner_id.phone or doc.partner_id.mobile or ''"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Order Ref</td>
|
||||
<td><t t-esc="doc.name"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td style="width: 50%; vertical-align: top; padding-left: 10px;">
|
||||
<table class="bordered" style="width: 100%;">
|
||||
<tr>
|
||||
<th colspan="2" class="info-header" style="background-color: #0066a1; color: white;">RENTAL PERIOD</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 40%; font-weight: bold; background-color: #f5f5f5;">Start Date</td>
|
||||
<td>
|
||||
<t t-if="doc.rental_start_date">
|
||||
<span t-field="doc.rental_start_date" t-options="{'widget': 'date'}"/>
|
||||
</t>
|
||||
<t t-else=""><span style="color: #999;">Not specified</span></t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Return Date</td>
|
||||
<td>
|
||||
<t t-if="doc.rental_return_date">
|
||||
<span t-field="doc.rental_return_date" t-options="{'widget': 'date'}"/>
|
||||
</t>
|
||||
<t t-else=""><span style="color: #999;">Not specified</span></t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Duration</td>
|
||||
<td>
|
||||
<t t-if="doc.duration_days">
|
||||
<span t-esc="doc.duration_days"/> Day<t t-if="doc.duration_days != 1">s</t>
|
||||
<t t-if="doc.remaining_hours and doc.remaining_hours > 0">
|
||||
, <t t-esc="doc.remaining_hours"/> Hr<t t-if="doc.remaining_hours != 1">s</t>
|
||||
</t>
|
||||
</t>
|
||||
<t t-elif="doc.rental_start_date and doc.rental_return_date"><span>Less than 1 day</span></t>
|
||||
<t t-else=""><span style="color: #999;">Not specified</span></t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-weight: bold; background-color: #f5f5f5;">Total Amount</td>
|
||||
<td><strong><span t-field="doc.amount_total" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Equipment / Order Lines Table -->
|
||||
<table class="bordered" style="margin-bottom: 10px;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 35%;">DESCRIPTION</th>
|
||||
<th class="text-center" style="width: 8%;">QTY</th>
|
||||
<th class="text-right" style="width: 17%;">UNIT PRICE</th>
|
||||
<th class="text-right" style="width: 20%;">TAXES</th>
|
||||
<th class="text-right" style="width: 20%;">TOTAL</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="has_taxes" t-value="False"/>
|
||||
<t t-foreach="doc.order_line" t-as="line">
|
||||
<t t-if="not line.display_type">
|
||||
<t t-if="line.tax_ids" t-set="has_taxes" t-value="True"/>
|
||||
<tr>
|
||||
<td>
|
||||
<t t-esc="line.product_id.name"/>
|
||||
<t t-if="line.is_security_deposit">
|
||||
<br/><small style="color: #666; font-size: 7pt;">REFUNDABLE UPON RETURN IN GOOD & CLEAN CONDITION</small>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<span t-esc="int(line.product_uom_qty) if line.product_uom_qty == int(line.product_uom_qty) else line.product_uom_qty"/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.price_unit" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<t t-if="line.tax_ids">
|
||||
<t t-esc="', '.join(line.tax_ids.mapped('name'))"/>
|
||||
</t>
|
||||
</td>
|
||||
<td class="text-right">
|
||||
<span t-field="line.price_total" t-options='{"widget": "monetary", "display_currency": doc.currency_id}'/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<!-- Totals - right-aligned bordered table (matching ADP style) -->
|
||||
<div style="text-align: right; margin-bottom: 10px;">
|
||||
<table class="bordered" style="width: auto; margin-left: auto;">
|
||||
<tr>
|
||||
<td style="min-width: 140px; padding: 4px 8px;">Subtotal</td>
|
||||
<td class="text-right" style="min-width: 100px; padding: 4px 8px;"><span t-field="doc.amount_untaxed"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 4px 8px;">Taxes</td>
|
||||
<td class="text-right" style="padding: 4px 8px;"><span t-field="doc.amount_tax"/></td>
|
||||
</tr>
|
||||
<tr style="background-color: #0066a1; color: white;">
|
||||
<td style="padding: 4px 8px;"><strong>Total</strong></td>
|
||||
<td class="text-right" style="padding: 4px 8px;"><strong><span t-field="doc.amount_total"/></strong></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<!-- Credit Card Authorization - Compact -->
|
||||
<div class="cc-section">
|
||||
<div class="cc-title">CREDIT CARD PAYMENT AUTHORIZATION</div>
|
||||
|
||||
<table style="width: 100%; border: none;">
|
||||
<tr>
|
||||
<td style="width: 20%; padding: 5px 4px; border: none;"><strong>Card #:</strong></td>
|
||||
<td style="padding: 5px 4px; border: none;">
|
||||
<t t-if="doc.rental_payment_token_id">
|
||||
<span style="font-size: 14px;">**** **** **** <t t-out="doc._get_card_last_four() or '****'">1234</t></span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
|
||||
<span style="margin: 0 3px;">-</span>
|
||||
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
|
||||
<span style="margin: 0 3px;">-</span>
|
||||
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
|
||||
<span style="margin: 0 3px;">-</span>
|
||||
<span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span><span class="cc-box"></span>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 4px; border: none;"><strong>Exp Date:</strong></td>
|
||||
<td style="padding: 5px 4px; border: none;">
|
||||
<span class="cc-box"></span><span class="cc-box"></span>
|
||||
<span style="margin: 0 2px;">/</span>
|
||||
<span class="cc-box"></span><span class="cc-box"></span>
|
||||
<span style="margin-left: 20px;"><strong>CVV:</strong></span>
|
||||
<span>***</span>
|
||||
<t t-set="deposit_lines" t-value="doc.order_line.filtered(lambda l: l.is_security_deposit)"/>
|
||||
<span style="margin-left: 20px;"><strong>Security Deposit:</strong>
|
||||
<t t-if="deposit_lines">
|
||||
$<t t-out="'%.2f' % sum(deposit_lines.mapped('price_unit'))">0.00</t>
|
||||
</t>
|
||||
<t t-else="">$___________</t>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="padding: 5px 4px; border: none;"><strong>Cardholder:</strong></td>
|
||||
<td style="padding: 5px 4px; border: none;">
|
||||
<t t-if="doc.rental_agreement_signer_name">
|
||||
<span t-out="doc.rental_agreement_signer_name">Name</span>
|
||||
</t>
|
||||
<t t-else="">
|
||||
<div style="border-bottom: 1px solid #000; min-height: 18px; width: 100%;"></div>
|
||||
</t>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="padding: 5px 4px; border: none;">
|
||||
<strong>Billing Address (if different):</strong>
|
||||
<div style="border-bottom: 1px solid #000; min-height: 18px; width: 100%; margin-top: 4px;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="authorization-text">
|
||||
<p>I authorize <t t-esc="company.name"/> to charge the credit card indicated in this authorization form according to the terms outlined above. I certify that I am an authorized user of this credit card and will not dispute the payment. By signing this form, I acknowledge that I have read the rental agreement and understand the terms and conditions. I understand that if the rented item is not returned on the agreed return date, additional charges will be incurred. *Payments for monthly rental items will be charged on the re-rental date until the item is returned.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Signature Section - Compact -->
|
||||
<div class="signature-section">
|
||||
<div class="signature-box">
|
||||
<table style="width: 100%; border: none;">
|
||||
<tr>
|
||||
<td style="width: 40%; padding: 5px; border: none;">
|
||||
<div class="signature-label">FULL NAME (PRINT)</div>
|
||||
<t t-if="doc.rental_agreement_signer_name">
|
||||
<div style="min-height: 18px; font-size: 14px;" t-out="doc.rental_agreement_signer_name">Name</div>
|
||||
</t>
|
||||
<t t-else=""><div class="signature-line"></div></t>
|
||||
</td>
|
||||
<td style="width: 40%; padding: 5px; border: none;">
|
||||
<div class="signature-label">SIGNATURE</div>
|
||||
<t t-if="doc.rental_agreement_signature">
|
||||
<img t-att-src="'data:image/png;base64,' + doc.rental_agreement_signature.decode('utf-8') if doc.rental_agreement_signature else ''" style="max-height: 50px; max-width: 100%;"/>
|
||||
</t>
|
||||
<t t-else=""><div class="signature-line"></div></t>
|
||||
</td>
|
||||
<td style="width: 20%; padding: 5px; border: none;">
|
||||
<div class="signature-label">DATE</div>
|
||||
<t t-if="doc.rental_agreement_signed_date">
|
||||
<div style="min-height: 18px; font-size: 14px;" t-out="doc.rental_agreement_signed_date.strftime('%m/%d/%Y')">Date</div>
|
||||
</t>
|
||||
<t t-else=""><div class="signature-line"></div></t>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
<!-- Report Action -->
|
||||
<record id="action_report_rental_agreement" model="ir.actions.report">
|
||||
<field name="name">Rental Agreement</field>
|
||||
<field name="model">sale.order</field>
|
||||
<field name="report_type">qweb-pdf</field>
|
||||
<field name="report_name">fusion_rental.report_rental_agreement</field>
|
||||
<field name="report_file">fusion_rental.report_rental_agreement</field>
|
||||
<field name="print_report_name">'Rental Agreement - %s' % object.name</field>
|
||||
<field name="binding_model_id" ref="sale.model_sale_order"/>
|
||||
<field name="binding_type">report</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user