new snippets

This commit is contained in:
Janik von Rotz committed 2021-12-07 10:39:11 +01:00
1 parent 9645d7679e
commit a67441006d
5 files changed
+24 -11

No files matched your search

@@ -1,22 +1,30 @@
<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document">
<xpath expr="//t[@t-foreach='lines']" position="replace">
<xpath expr="//h2" position="before">
<t t-set="pickings" t-value="[]"/>
<t t-foreach="o.invoice_line_ids" t-as="line">
<t t-set="pickings" t-value="pickings+[line.picking_ids]"/>
<t t-if="'picking_ids' in line.fields_get()" t-set="pickings" t-value="pickings+[line.picking_ids]"/>
</t>
<t t-set="has_multiple_pickings" t-value="len(pickings) > 1"/>
</xpath>
<xpath expr="//h2/span[1]" position="replace">
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and not has_multiple_pickings">Rechnung</span>
<span t-if="o.move_type == 'out_invoice' and o.state == 'posted' and has_multiple_pickings">Sammelrechnung</span>
</xpath>
<xpath expr="//t[@t-foreach='lines']" position="replace">
<t t-foreach="set(pickings)" t-as="picking">
<tr t-if="picking.name">
<td colspan="5">
<tr t-if="has_multiple_pickings and picking">
<td colspan="99" style="padding-top: 1rem;" >
<strong t-esc="'Lieferung ' + picking.name.replace('WH/OUT/','')"/>
<span> vom </span>
<span t-esc="picking.scheduled_date" t-options="{'widget': 'date'}"/>
<span>:</span>
<span t-esc="picking.scheduled_date" t-options="{'widget': 'date'}"/><span>:</span>
</td>
</tr>
<t t-foreach="lines" t-as="line">
<t t-if="picking in line.picking_ids">
<t t-if="not has_multiple_pickings or (picking in line.picking_ids)">
<t t-set="current_subtotal" t-value="current_subtotal + line.price_subtotal" groups="account.group_show_line_subtotals_tax_excluded"/>
<t t-set="current_subtotal" t-value="current_subtotal + line.price_total" groups="account.group_show_line_subtotals_tax_included"/>
@@ -2,7 +2,12 @@
<data inherit_id="account.report_invoice_document" priority="50">
<xpath expr="//*[@id='informations']" position="replace">
<style>
table#informations{
font-size: 0.8rem;
white-space: nowrap;
}
</style>
<table id='informations' class="table table-borderless table-sm">
<tr>
<td class="text-right"><strong>Rechnungsdatum:</strong></td>
@@ -11,7 +11,7 @@
<t t-set="index" t-value="1"/>
</xpath>
<xpath expr="//table/tbody/t[4]/tr/t[1]/td[1]" position="before">
<xpath expr="//table/tbody//tr/t[1]/td[1]" position="before">
<td>
<span t-esc="index"/><t t-set="index" t-value="index+1"/>
</td>