410 lines
22 KiB
XML
410 lines
22 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Sale Order Body -->
|
|
<template id="report_saleorder_document">
|
|
<t t-call="web.external_layout">
|
|
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
|
|
<div class="page">
|
|
<div class="row">
|
|
<div class="col-xs-3">
|
|
<t t-call="dp_reports.partner_data"/>
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<strong>Lieferadresse</strong>
|
|
<div class="partner-data">
|
|
<span t-esc="o.partner_shipping_id.name"/>
|
|
<br/>
|
|
<t t-if="o.partner_shipping_id.name2">
|
|
<span t-esc="o.partner_shipping_id.name2"/>
|
|
<br/>
|
|
</t>
|
|
<span t-esc="o.partner_shipping_id.street"/>
|
|
<br/>
|
|
<span t-esc="o.partner_shipping_id.zip"/>
|
|
<span t-esc="o.partner_shipping_id.city"/>
|
|
<br/>
|
|
<span t-esc="o.partner_shipping_id.country_id.name"/>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<strong>Rechnungsadresse</strong>
|
|
<div class="partner-data">
|
|
<span t-esc="o.partner_invoice_id.name"/>
|
|
<br/>
|
|
<t t-if="o.partner_invoice_id.name2">
|
|
<span t-esc="o.partner_invoice_id.name2"/>
|
|
<br/>
|
|
</t>
|
|
<span t-esc="o.partner_invoice_id.street"/>
|
|
<br/>
|
|
<span t-esc="o.partner_invoice_id.zip"/>
|
|
<span t-esc="o.partner_invoice_id.city"/>
|
|
<br/>
|
|
<t t-if="o.partner_invoice_id.country_id">
|
|
<span t-esc="o.partner_invoice_id.country_id.name"/>
|
|
<br/>
|
|
</t>
|
|
<t t-if="o.partner_invoice_id.email">
|
|
<span t-esc="o.partner_invoice_id.email"/>
|
|
<br/>
|
|
</t>
|
|
<t t-if="o.partner_invoice_id.phone">
|
|
<span t-esc="o.partner_invoice_id.phone"/>
|
|
<br/>
|
|
</t>
|
|
<t t-if="o.partner_invoice_id.vat">UID-Nr.:
|
|
<span t-esc="o.partner_invoice_id.vat"/>
|
|
</t>
|
|
</div>
|
|
</div>
|
|
<div class="col-xs-3">
|
|
<t t-call="dp_reports.company_data"/>
|
|
</div>
|
|
</div>
|
|
<div class="row mt32"/>
|
|
<div class="row height-20">
|
|
<div class="col-xs-3" style="padding-right: 4px">
|
|
<strong>
|
|
<span class="col-xs-8" style="padding: 0px;width: 58%;">Kundennr.:</span>
|
|
</strong>
|
|
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.partner_id.ref"/>
|
|
</div>
|
|
<strong>
|
|
<span class="col-xs-2">Auftragsbearbeiter:</span>
|
|
</strong>
|
|
<span class="col-xs-3" t-field="o.editor_id"/>
|
|
<strong>
|
|
<span class="col-xs-2">Positionen:</span>
|
|
</strong>
|
|
<span class="col-xs-2" t-field="o.positions"/>
|
|
</div>
|
|
<div class="row height-20">
|
|
<div class="col-xs-3" style="padding-right: 4px">
|
|
<strong>
|
|
<span class="col-xs-8" style="padding: 0px;width: 58%;">Angebotsdatum:</span>
|
|
</strong>
|
|
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.date_order"
|
|
t-options='{"widget": "date"}'/>
|
|
</div>
|
|
<strong>
|
|
<span class="col-xs-2">Email:</span>
|
|
</strong>
|
|
<span class="col-xs-3" t-field="res_company.email"/>
|
|
<p t-if="o.origin">
|
|
<strong>
|
|
<span class="col-xs-2">Warenkorb/Ref:</span>
|
|
</strong>
|
|
<span class="col-xs-2" t-field="o.origin"/>
|
|
</p>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-xs-3" style="padding-right: 4px">
|
|
<t t-if="o.state not in ['draft','sent']">
|
|
<strong>
|
|
<span class="col-xs-8" style="padding: 0px;width: 58%;font-size:12px;padding-top: 3px;">Lieferdatum ab Werk:</span>
|
|
</strong>
|
|
<t t-if="o.earliest_scheduled_date">
|
|
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.earliest_scheduled_date"
|
|
t-options='{"widget": "date"}'/>
|
|
</t>
|
|
<t t-else="">
|
|
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.delivery_date"
|
|
t-options='{"widget": "date"}'/>
|
|
</t>
|
|
</t>
|
|
<t t-if="o.state in ['draft','sent'] and o.validity_date">
|
|
<strong>
|
|
<span class="col-xs-8" style="padding: 0px;width: 58%;">Gültig bis:</span>
|
|
</strong>
|
|
<span class="col-xs-4" style="padding: 0px;width: 42%;" t-field="o.validity_date"
|
|
t-options='{"widget": "date"}'/>
|
|
</t>
|
|
</div>
|
|
<strong>
|
|
<span class="col-xs-2">Telefon:</span>
|
|
</strong>
|
|
<span class="col-xs-3" t-field="o.editor_id.phone"/>
|
|
<strong>
|
|
<span class="col-xs-2">Freigabe-Nr:</span>
|
|
</strong>
|
|
<span class="col-xs-2" t-field="o.confirmation_nr"/>
|
|
<!-- <strong>
|
|
<span class="col-xs-2">Bezeichnung:</span>
|
|
</strong>
|
|
<span class="col-xs-2" t-field="o.client_order_ref"/>
|
|
-->
|
|
</div>
|
|
<div class="row height-20">
|
|
<div class="col-xs-3" style="padding-right: 4px">
|
|
</div>
|
|
<p t-if="o.user_id">
|
|
<strong>
|
|
<span class="col-xs-2">Ihr Betreuer:</span>
|
|
</strong>
|
|
<span class="col-xs-6">
|
|
<span style="padding-right: 10px;" t-field="o.user_id"/>(<span style="font-size:11px;padding-top: 4px;" t-field="o.user_id.mobile"/>)
|
|
</span>
|
|
</p>
|
|
</div>
|
|
<br/>
|
|
<div class="row">
|
|
<strong>
|
|
<span class="col-xs-2">Bezeichnung:</span>
|
|
</strong>
|
|
<span class="col-xs-10" t-field="o.client_order_ref"/>
|
|
</div>
|
|
<p t-if="o.note1 != '<p><br></p>' and o.note1 != ''">
|
|
<div class="row mt32 dp_note">
|
|
<span t-field="o.note1"/>
|
|
</div>
|
|
</p>
|
|
<p t-else="">
|
|
<br/>
|
|
</p>
|
|
<table class="table table-condensed">
|
|
<t t-set="discount_is_set" t-value="field_set_in_lines(o.order_line, 'discount')"/>
|
|
<thead class="table-header">
|
|
<tr>
|
|
<th class="text-center">Pos.</th>
|
|
<th class="text-right">Anzahl</th>
|
|
<th class="text-right">Gewicht</th>
|
|
<th class="text-right"/>
|
|
<th class="text-left">Artikel</th>
|
|
<th class="text-right">EP</th>
|
|
<th class="text-right" t-if="discount_is_set">Rabatt</th>
|
|
<th class="text-right">Gesamtpreis</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="sale-tbody">
|
|
<t t-set="pos_nr" t-value="0"/>
|
|
<t t-foreach="o.order_line" t-as="order_line">
|
|
<tr>
|
|
<t t-set="pos_nr" t-value="pos_nr+1"/>
|
|
<td class="text-center">
|
|
<span t-esc="pos_nr"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<t t-if="order_line.product_uom_qty">
|
|
<span t-esc="o._formatLang(order_line.product_uom_qty, False).strip('0').strip(',').strip('.')"/>
|
|
</t>
|
|
</td>
|
|
<td class="text-right">
|
|
<t t-if="order_line.weight">
|
|
<span t-esc="round(order_line.weight,2)"/>
|
|
kg
|
|
</t>
|
|
</td>
|
|
<td class="text-right"/>
|
|
<td rowspan="2" class="text-left">
|
|
<t t-if="order_line.product_id.default_code and order_line.product_id.material_type_id.print_default_code">
|
|
<strong>
|
|
<span t-field="order_line.product_id.default_code"/>
|
|
</strong>
|
|
<br/>
|
|
</t>
|
|
<t t-if="order_line.intrastat_id">
|
|
<span>
|
|
<strong>Zolltarif Nr.:</strong>
|
|
<span t-field="order_line.intrastat_id"/>
|
|
</span>
|
|
<br/>
|
|
</t>
|
|
<span t-field="order_line.name"/>
|
|
<t t-if="order_line.delivery_date and (order_line.delivery_date != o.delivery_date)">
|
|
<br/>
|
|
<strong>Voraussichtliches Lieferdatum:</strong>
|
|
<span t-field="order_line.delivery_date"/>
|
|
</t>
|
|
<p t-if="order_line.lot_id.notes">
|
|
<span t-field="order_line.lot_id.notes"/>
|
|
</p>
|
|
<p t-if="o.note_line">
|
|
<span t-field="o.note_line"/>
|
|
</p>
|
|
</td>
|
|
<td rowspan="2" class="text-right">
|
|
<span t-if="order_line.hide_discount"
|
|
t-field="order_line.price_reduce"/>
|
|
<span t-if="not order_line.hide_discount"
|
|
t-field="order_line.price_unit"/>
|
|
</td>
|
|
<td rowspan="2" class="text-right" t-if="discount_is_set">
|
|
<t t-if="not order_line.hide_discount and order_line.discount">
|
|
<span t-esc="o._formatLang(order_line.discount, False).strip('0').strip(',').strip('.')"/>
|
|
%
|
|
</t>
|
|
</td>
|
|
<td rowspan="2" class="text-right">
|
|
<span t-field="order_line.price_subtotal"/>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="4" style="border: 0;text-align: center;">
|
|
<img t-if="order_line.lot_id.image_medium"
|
|
t-att-src="'data:image/png;base64,%s' % order_line.lot_id.image_medium.decode()" style="max-width: 120px;"/>
|
|
<img t-if="not order_line.lot_id.image_medium and order_line.product_id.image_medium"
|
|
t-att-src="'data:image/png;base64,%s' % order_line.product_id.image_medium.decode()" style="max-width: 120px;"/>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="row">
|
|
<div class="col-xs-4 pull-right">
|
|
<table class="table table-condensed">
|
|
<tbody class="totals-tbody">
|
|
<tr>
|
|
<td>
|
|
Nettobetrag
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_untaxed"
|
|
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</td>
|
|
</tr>
|
|
<t t-set="tax_groups_length" t-value="len(o._get_tax_amount_by_group())"/>
|
|
<t t-foreach="o._get_tax_amount_by_group()" t-as="amount_by_group">
|
|
<tr style="border-bottom:1px solid #dddddd;">
|
|
<t t-if="amount_by_group[1] > 0">
|
|
<t t-if="amount_by_group[3] == 1 and o.amount_untaxed == amount_by_group[2]">
|
|
<!-- <span>Loop 1</span> -->
|
|
<td>
|
|
<span t-esc="amount_by_group[0]"/>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="amount_by_group[1]"
|
|
t-options='{"widget": "monetary", "display_currency": o.pricelist_id.currency_id}'/>
|
|
</td>
|
|
</t>
|
|
<t t-else="">
|
|
<!-- <span>Loop 2</span> -->
|
|
<td>
|
|
<span t-esc="amount_by_group[0]"/>
|
|
<span>&nbsp;<span>on</span>&nbsp;
|
|
<t t-esc="amount_by_group[2]"
|
|
t-options='{"widget": "monetary", "display_currency": o.pricelist_id.currency_id}'/>
|
|
</span>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-esc="amount_by_group[1]"
|
|
t-options='{"widget": "monetary", "display_currency": o.pricelist_id.currency_id}'/>
|
|
</td>
|
|
</t>
|
|
</t>
|
|
</tr>
|
|
</t>
|
|
<!-- <tr>
|
|
<td>
|
|
<span>USt.</span>
|
|
</td>
|
|
<td class="text-right">
|
|
<span t-field="o.amount_tax"
|
|
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</td>
|
|
</tr>
|
|
-->
|
|
<tr class="amount-total">
|
|
<td>
|
|
<strong>Gesamtsumme</strong>
|
|
</td>
|
|
<td class="text-right">
|
|
<strong>
|
|
<span t-field="o.amount_total"
|
|
t-options='{"widget": "monetary", "display_currency": o.currency_id}'/>
|
|
</strong>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row dp_note" style="page-break-inside: avoid">
|
|
<p t-if="o.note2">
|
|
<span t-field="o.note2" style="page-break-inside: avoid"/>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="row dp_note">
|
|
<p class="col-xs-12">
|
|
<span t-field="o.note"/>
|
|
</p>
|
|
<p class="col-xs-12">
|
|
Gesamtgewicht:
|
|
<span t-esc="round(o.weight_total, 2)"/>
|
|
kg
|
|
<br/>
|
|
</p>
|
|
<p class="col-xs-12" t-if="o.incoterm.name">
|
|
Lieferkonditionen:
|
|
<span t-esc="o.incoterm.name"/>
|
|
<br/>
|
|
</p>
|
|
<p class="col-xs-12" t-if="o.payment_term_id and not o.partner_invoice_id.is_retailer">
|
|
Zahlungskonditionen:
|
|
<span t-esc="o.payment_term_id.name"/>
|
|
<br/>
|
|
</p>
|
|
<p class="col-xs-12" t-if="o.state not in ['draft','sent']">
|
|
Please check the packaging or goods for damage immediately upon delivery!
|
|
<br/>
|
|
If the damaged goods are accepted, there is no entitlement to reimbursement or replacement.
|
|
</p>
|
|
<t t-if="o.state in ['draft','sent']">
|
|
<t t-if="o.validity_date">
|
|
<p class="col-xs-12">
|
|
Offer valid until:
|
|
<span t-field="o.validity_date"/>
|
|
</p>
|
|
</t>
|
|
<t t-if="not o.validity_date">
|
|
<p class="col-xs-12">
|
|
Validity: 14 days from the date of issue
|
|
</p>
|
|
</t>
|
|
<p class="col-xs-12">
|
|
Auftrag erteilt am: ____________________
|
|
</p>
|
|
<p class="col-xs-12">
|
|
Unterschrift: ____________________
|
|
</p>
|
|
</t>
|
|
<t t-if="o.fiscal_position_id and o.fiscal_position_id.note">
|
|
<br/>
|
|
</t>
|
|
<p id="fiscal_position_remark" t-if="o.fiscal_position_id and o.fiscal_position_id.note">
|
|
<strong>Fiscal Position Remark:</strong>
|
|
<span t-field="o.fiscal_position_id.note"/>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="sale.report_saleorder">
|
|
<t t-call="web.html_container">
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="dp_reports_sale.report_saleorder_document" t-lang="o.partner_id.lang"/>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
<template id="sale.report_saleorder_pro_forma">
|
|
<t t-call="web.html_container">
|
|
<t t-set="is_pro_forma" t-value="True"/>
|
|
<t t-foreach="docs" t-as="o">
|
|
<t t-call="dp_reports_sale.report_saleorder_document" t-lang="o.partner_id.lang"/>
|
|
</t>
|
|
</t>
|
|
</template>
|
|
|
|
<record id="sale.action_report_saleorder" model="ir.actions.report">
|
|
<field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/>
|
|
</record>
|
|
|
|
<record id="sale.action_report_pro_forma_invoice" model="ir.actions.report">
|
|
<field name="paperformat_id" ref="dp_reports.paperformat_a4_european"/>
|
|
</record>
|
|
</odoo>
|