odoo/ext/custom-addons/cam_reports/report/sale.order.rml

200 lines
6.7 KiB
XML

<?xml version="1.0"?>
<!--
<reports>
<report>sale.report_saleorder</report>
</reports>
-->
<document filename="Sales Order.pdf">
<template pageSize="(595.0,842.0)" title="Sale Order" author="Andreas Brückl" allowSplitting="20">
<pageTemplate id="first">
<frame id="first" x1="15.0" y1="42.0" width="539" height="758"/>
</pageTemplate>
</template>
<story>
<para>
<seqReset id="L1"/>
</para>
<para>[[repeatIn(objects,'o')]] [[ setLang(o.partner_id.commercial_partner_id.lang)]]</para>
<para style="fett">[[ o.partner_id.commercial_partner_id.name ]]</para>
<para style="normal">[[ (o.partner_id.commercial_partner_id.id != o.partner_id.id and o.partner_id.name) or '' ]] </para>
<para style="normal">[[ (o.partner_id.street ) or '']]</para>
<para style="normal">[[ (o.partner_id.street2) or removeParentNode('para') ]]</para>
<para style="normal">[[ (o.partner_id.zip) or '' ]] [[ (o.partner_id and o.partner_id.city) or '' ]]</para>
<para style="normal">[[ (o.partner_id.state_id and o.partner_id.state_id.name) or removeParentNode('para')]]</para>
<para style="normal">[[ (o.partner_id.country_id and o.partner_id.country_id.name) or '' ]]</para>
<blockTable colWidths="100,110" style="Struktur" hAlign="RIGHT">
<tr>
<td>
<para style="normal">Ihre Referenz:</para>
</td>
<td>
<para style="normal">[[ o.client_order_ref ]]</para>
</td>
</tr>
<tr>
<td>
<para style="normal">Ansprechpartner:</para>
</td>
<td>
<para style="normal">[[ (o.user_id and o.user_id.name) or '' ]]</para>
</td>
</tr>
<tr> [[ o.user_id and o.user_id.phone or removeParentNode('tr') ]]
<td>
<para style="normal">Tel.:</para>
</td>
<td>
<para style="normal">[[ (o.user_id and o.user_id.phone) or '' ]]</para>
</td>
</tr>
<tr>
<td>
<para style="normal">Ihre UID:</para>
</td>
<td>
<para style="normal">[[ o.partner_id.commercial_partner_id and o.partner_id.commercial_partner_id.vat or '' ]]</para>
</td>
</tr>
<tr>
<td>
<para style="normal">Angebotsdatum:[[ o.state not in ['draft','sent'] and removeParentNode('para') ]]</para>
<para style="normal">Bestelldatum:[[ o.state in ['draft','sent'] and removeParentNode('para') ]]</para>
</td>
<td>
<para style="normal">[[ formatLang(o.date_order,date = True) ]]</para>
</td>
</tr>
</blockTable>
<section>
<para style="ueberschrift"><b>[[ o.state not in ['draft','sent'] and removeParentNode('para') ]] Angebot [[ o.name ]]</b></para>
<para style="ueberschrift"><b>[[ o.state in ['draft','sent'] and removeParentNode('para') ]] Bestellbestätigung [[ o.name ]]</b></para>
</section>
<spacer length="0.5cm"/>
<blockTable colWidths="30,57,213,45,50,40,75" repeatRows="1" style="TabelleHaupt" hAlign="LEFT">
<tr>
<td>
<para style="tabelle_header">Pos</para>
</td>
<td>
<para style="tabelle_header">Art.nr.</para>
</td>
<td>
<para style="tabelle_header_links">Bezeichnung</para>
</td>
<td>
<para style="tabelle_header">Menge</para>
</td>
<td>
<para style="tabelle_header_rechts">E-Preis</para>
</td>
<td>
<para style="tabelle_header"></para>
</td>
<td>
<para style="tabelle_header_rechts">Gesamtpreis</para>
</td>
</tr>
<tr>[[repeatIn(o.order_line,'line')]]
<td>
<para style="tabelle_daten_center" leftIndent="0" bulletIndent="0" size="8.0">
<seq id="L1"/>
</para>
</td>
<td>
<para style="tabelle_daten_center">[[ line.product_id and line.product_id.default_code or '']]</para>
</td>
<td>
<para style="tabelle_daten_links">[[ (line.name or '').split('\n\n')[0] ]]</para>
<section>[[ repeatIn((line.name or '').split('\n\n')[1:],'paragraphs') ]]
<spacer length="0.4cm"/>
<para style="tabelle_daten_links">[[ paragraphs ]]</para>
</section>
</td>
<td>
<para style="tabelle_daten_center">[[ formatLang(line.product_uos and line.product_uos_qty or line.product_uom_qty, digits=0) ]]</para>
</td>
<td>
<para style="tabelle_daten_rechts">[[ formatLang(line.price_unit,digits=2) ]]</para>
</td>
<td>
<para style="tabelle_daten_rechts">[[ line.discount &lt;&gt; 0 and (formatLang(line.discount) + '%') or '' ]]</para>
</td>
<td>
<para style="tabelle_daten_rechts">[[ formatLang(line.price_subtotal,digits=2 ) ]]</para>
</td>
</tr>
</blockTable>
<blockTable colWidths="210,200,100" style="TabelleSchlussrechnung">
<tr>
<td>
<para></para>
</td>
<td>
<para style="schlussrechnung">Zwischensumme in €</para>
</td>
<td>
<para style="schlussrechnung">[[ formatLang(o.amount_untaxed,digits=2 )]]</para>
</td>
</tr>
<tr>
<td>
<para></para>
</td>
<td>
<para style="schlussrechnung">MwSt. in €</para>
</td>
<td>
<para style="schlussrechnung">[[ formatLang(o.amount_tax,digits=2 ) ]]</para>
</td>
</tr>
<tr>
<td>
<para></para>
</td>
<td>
<para style="schlussrechnung_fett">Rechnungsbetrag in €</para>
</td>
<td>
<para style="schlussrechnung_fett">[[ formatLang(o.amount_total,digits=2 ) ]]</para>
</td>
</tr>
</blockTable>
<spacer length="0.5cm"/>
<para style="normal">[[ (o.note or '').split('\n\n')[0] ]]</para>
<section>[[ repeatIn((o.note or '').split('\n\n')[1:],'paragraphs') ]]
<spacer length="0.4cm"/>
<para style="normal">[[ paragraphs ]]</para>
</section>
<spacer length="0.5cm"/>
<blockTable colWidths="110,300" style="Struktur" hAlign="LEFT">
<tr>
<td>
<para style="normal">Zahlungsziele:</para>
</td>
<td>
<para style="normal">[[ (o.payment_term and o.payment_term.note) or removeParentNode('blockTable') ]]</para>
</td>
</tr>
</blockTable>
<spacer length="0.5cm"/>
</story>
</document>