[IMP] : black, isort, prettier

This commit is contained in:
Pedro M. Baeza
2020-07-13 18:28:03 +02:00
committed by Christopher Rogos
parent 46e0645584
commit a425d2a431
46 changed files with 2703 additions and 2811 deletions

View File

@@ -1,12 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<report
id="report_contract"
model="contract.contract"
string="Contract"
report_type="qweb-pdf"
name="contract.report_contract_document"
file="contract.report_contract"/>
file="contract.report_contract"
/>
</odoo>

View File

@@ -1,80 +1,125 @@
<?xml version="1.0" ?>
<odoo>
<template id="report_contract_document">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context(lang=o.partner_id.lang)" />
<t t-set="address">
<p id="partner_info"><strong>Partner:</strong></p>
<div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "mobile", "fax", "email"], "no_marker": true, "phone_icons": true}'/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
<p id="partner_info">
<strong>Partner:</strong>
</p>
<div
t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "mobile", "fax", "email"], "no_marker": true, "phone_icons": true}'
/>
<p t-if="o.partner_id.vat">VAT: <span
t-field="o.partner_id.vat"
/></p>
</t>
<div class="page">
<div class="oe_structure"/>
<div class="oe_structure" />
<div class="row" id="header_info">
<div class="col-3">
<strong>Responsible: </strong><p t-field="o.user_id"/>
<strong>Contract: </strong><p t-field="o.code"/>
<strong>Responsible: </strong>
<p t-field="o.user_id" />
<strong>Contract: </strong>
<p t-field="o.code" />
</div>
</div>
<div class="row" id="invoice_info">
<t t-set="total" t-value="0"/>
<t t-set="total" t-value="0" />
<div class="col-12">
<t t-set="total" t-value="0"/>
<p id="services_info"><strong>Recurring Items</strong></p>
<t t-set="total" t-value="0" />
<p id="services_info">
<strong>Recurring Items</strong>
</p>
<table class="table table-sm">
<thead>
<tr>
<th><strong>Description</strong></th>
<th class="text-right"><strong>Quantity</strong></th>
<th class="text-right"><strong>Unit Price</strong></th>
<th class="text-right"><strong>Price</strong></th>
<th class="text-right"><strong>Date Start</strong></th>
<th>
<strong>Description</strong>
</th>
<th class="text-right">
<strong>Quantity</strong>
</th>
<th class="text-right">
<strong>Unit Price</strong>
</th>
<th class="text-right">
<strong>Price</strong>
</th>
<th class="text-right">
<strong>Date Start</strong>
</th>
</tr>
</thead>
<tbody>
<t t-set="current_subtotal" t-value="0"/>
<t t-set="current_subtotal" t-value="0" />
<t t-foreach="o.contract_line_ids" t-as="l">
<t t-set="current_subtotal" t-value="current_subtotal + l.price_subtotal"/>
<tr t-att-class="'bg-200 font-weight-bold o_line_section' if l.display_type == 'line_section' else 'font-italic o_line_note' if l.display_type == 'line_note' else ''">
<t
t-set="current_subtotal"
t-value="current_subtotal + l.price_subtotal"
/>
<tr
t-att-class="'bg-200 font-weight-bold o_line_section' if l.display_type == 'line_section' else 'font-italic o_line_note' if l.display_type == 'line_note' else ''"
>
<t t-if="not l.display_type">
<td>
<span t-field="l.name"/>
<span t-field="l.name" />
</td>
<td class="text-right">
<span t-field="l.quantity"/>
<span t-field="l.quantity" />
</td>
<td class="text-right">
<span t-field="l.price_unit" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
<span
t-field="l.price_unit"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
<td class="text-right">
<span t-field="l.price_subtotal" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
<span
t-field="l.price_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
<td class="text-right">
<span t-field="l.date_start"/>
<span t-field="l.date_start" />
</td>
<t t-set="total" t-value="total + l.price_subtotal"/>
<t
t-set="total"
t-value="total + l.price_subtotal"
/>
</t>
<t t-if="l.display_type == 'line_section'">
<t
t-if="l.display_type == 'line_section'"
>
<td colspan="99">
<span t-field="l.name"/>
<span t-field="l.name" />
</td>
<t t-set="current_section" t-value="l"/>
<t t-set="current_subtotal" t-value="0"/>
<t
t-set="current_section"
t-value="l"
/>
<t
t-set="current_subtotal"
t-value="0"
/>
</t>
<t t-if="l.display_type == 'line_note'">
<td colspan="99">
<span t-field="l.name"/>
<span t-field="l.name" />
</td>
</t>
</tr>
<t t-if="current_section and (l_last or o.contract_line_ids[l_index+1].display_type == 'line_section')">
<t
t-if="current_section and (l_last or o.contract_line_ids[l_index+1].display_type == 'line_section')"
>
<tr class="is-subtotal text-right">
<td colspan="99">
<strong class="mr16">Subtotal</strong>
<strong
class="mr16"
>Subtotal</strong>
<span
t-esc="current_subtotal"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
@@ -88,12 +133,17 @@
</div>
</div>
<div id="total" class="row" name="total">
<div class="col-4 ml-auto">
<div class="col-4 ml-auto">
<table class="table table-sm">
<tr class="border-black o_subtotal" style="">
<td><strong>Total</strong></td>
<td>
<strong>Total</strong>
</td>
<td class="text-right">
<span t-esc="total" t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
<span
t-esc="total"
t-options='{"widget": "monetary", "display_currency": o.currency_id}'
/>
</td>
</tr>
</table>
@@ -101,10 +151,12 @@
</div>
<div>
<div class="row mt-4" id="note">
<div><strong>Notes: </strong></div>
<div>
<strong>Notes: </strong>
</div>
</div>
<div class="row">
<p t-field="o.note"/>
<p t-field="o.note" />
</div>
</div>
</div>
@@ -112,5 +164,4 @@
</t>
</t>
</template>
</odoo>