New Snippets

This commit is contained in:
Kurt Gisler committed 2025-01-28 17:22:25 +01:00
1 parent 84c7df6ace
commit b4b8a814ec
12 files changed
+164 -4

No files matched your search

@@ -0,0 +1,41 @@
<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
<xpath expr="//t[@name='account_invoice_line_accountable']/.." position="after">
<tr>
<t t-set="pickings" t-value="list(set(line.sale_line_ids.move_ids))"/>
<t t-foreach="pickings" t-as="picking">
<t t-if="picking.state == 'done'">
<tr>
<td style="padding: 0px; padding-left: 4px; border-bottom-width: 1px" colspan="6">
<t t-if="picking.picking_id.x_date_done">
<span>Lieferdatum: </span>
<span t-esc="picking.picking_id.x_date_done" t-options="{'widget': 'date'}"/>
</t>
<span>LS: </span>
<t t-if="picking.picking_id.x_name">
<span t-esc="picking.picking_id.x_name"/>
</t>
<t t-else="">
<span t-esc="picking.picking_id.name"/>
</t>
<span>Menge: </span>
<t t-set="move_lines" t-value="list(set(picking.picking_id.move_line_ids))"/>
<t t-foreach="move_lines" t-as="move_line">
<t t-if="line.product_id.id == move_line.product_id.id">
<span t-esc="move_line.quantity" t-options="{'widget': 'float', 'precision': 2}"/>
<span t-esc="move_line.product_uom_id.name"/>
</t>
</t>
</td>
</tr>
</t>
</t>
</tr>
</xpath>
</data>
@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="50">
<xpath expr="//p[@name="delivery_date">']" position="replace"/>
</data>
@@ -1,6 +1,15 @@
<?xml version="1.0"?>
<data inherit_id="account.report_invoice_document" priority="60">
<xpath expr="//td[@name='td_quantity']" position="attributes">
<attribute name="style">width: 80px</attribute>
<xpath expr="//div[hasclass('page')]" position="before">
<style>
.table td {
border-bottom-width: 0;
}
</style>
</xpath>
<xpath expr="//table[@class='table table-sm o_main_table table-borderless']" position="attributes">
<attribute name="class">table table-sm o_main_table mt-4 custom-border</attribute>
</xpath>
</data>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="x_date_done" model="ir.model.fields">
<field name="field_description">Lieferdatum</field>
<field name="model">stock.picking</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="name">x_date_done</field>
<field name="store" eval="True"/>
<field name="readonly" eval="False"/>
<field name="copied" eval="False"/>
<field name="ttype">date</field>
</record>
</odoo>
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="x_name" model="ir.model.fields">
<field name="field_description">Referenz</field>
<field name="model">stock.picking</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="name">x_name</field>
<field name="store" eval="True"/>
<field name="readonly" eval="False"/>
<field name="copied" eval="False"/>
<field name="ttype">char</field>
</record>
</odoo>
@@ -1,6 +1,9 @@
<?xml version="1.0"?>
<data inherit_id="sale.report_saleorder_document" priority="50">
<xpath expr="//div[@id='informations']" position="after">
<xpath expr="//table[@id='info']" position="after">
<!--
<xpath expr="//div[@id='informations']" position="after">
-->
<t t-if="doc.note_header != '&lt;p&gt;&lt;br&gt;&lt;/p&gt;'">
<span class="note" t-field="doc.note_header"/>
</t>
@@ -11,7 +11,7 @@
</th>
</xpath>
<!-- <xpath expr="//span[@t-field='line.name']/.." position="before"> -->
<xpath expr="//t[1]/td[1]" position="before">
<xpath expr="//td[@name='td_name']" position="before">
<td id="position">
<span t-field="line.position"/>
</td>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data inherit_id="sale.report_saleorder_document" priority="60">
<xpath expr="//table[2]" position="attributes">
<attribute name="class">table table-sm o_main_table mt-4</attribute>
</xpath>
</data>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data inherit_id="stock.view_picking_form" priority="50">
<field name="date_deadline" position="before">
<field name="x_date_done"/>
</field>
</data>
@@ -0,0 +1,6 @@
<?xml version="1.0"?>
<data inherit_id="stock.view_picking_form" priority="50">
<field name="partner_id" position="before">
<field name="x_name"/>
</field>
</data>
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<data inherit_id="web.external_layout_standard" priority="50">
<xpath expr="//div[@t-attf-class='footer o_standard_footer o_company_#{company.id}_layout']" position="replace">
<div t-attf-class="footer o_standard_footer o_company_#{company.id}_layout">
<div style="border-top: 1px solid black;">
<table style="width: 100%; border: transparent">
<tr style="line-height: 1.2; ">
<td style="padding-top:7px; width: 33%; text-align: left; ">info@kunststoffsammelsack.ch</td>
<td style="width: 33%; text-align: center">wwww.kunststoffsammelsack.ch</td>
<td style="width: 33%; text-align: right">+41 41 760 33 36</td>
</tr>
<tr style="line-height: 1.2;">
<td>CHE-411.930.537 MWST</td>
</tr>
</table>
</div>
</div>
</xpath>
</data>
@@ -0,0 +1,37 @@
<?xml version="1.0"?>
<data inherit_id="web.external_layout_standard" priority="50">
<xpath expr="/t/div" position="replace">
<!--
<t t-if="report_type == 'pdf'">
-->
<div t-attf-class="header o_company_#{company.id}_layout" t-att-style="report_header_style">
<table style="width: 100%; border: transparent; ">
<tr style="line-height: 1.2;">
<td style="width: 50%; padding-top: 10px; font-weight: bold">Kunststoffsammelsack Schweiz GmbH</td>
<td style="width: 15%; vertical-align: bottom; text-align: center; padding-bottom: 17px; border-bottom: solid 1px; " rowspan="4">
<img t-if="company.logo" t-att-src="'/web/image/966'" style="height: 45px;" alt="Logo"/>
</td>
<td style="width: 15%; vertical-align: bottom; text-align: center; padding-bottom: 17px; border-bottom: solid 1px;" rowspan="4">
<img t-if="company.logo" t-att-src="'/web/image/945'" style="height: 45px;" alt="Logo"/>
</td>
<td style="width: 20%; vertical-align: bottom; text-align: right; padding-bottom: 10px; border-bottom: solid 1px;" rowspan="4">
<img t-if="company.logo" t-att-src="image_data_uri(company.logo)" style="height:90px;" alt="Logo"/>
</td>
</tr>
<tr style="line-height: 1.2;">
<td>Sammeln, Verwerten - Kreisläufe schliessen</td>
</tr>
<tr>
<td>Seedorferstrasse 13a</td>
</tr>
<tr style="line-height: 1.2; border-bottom: solid 1px; ">
<td style="padding-bottom: 10px;">6460 Altdorf</td>
</tr>
</table>
</div>
<!--
</t>
-->
</xpath>
</data>