New Snippets
This commit is contained in:
1 parent
4f2d0fb164
commit
1affc65568
5 files changed
+102
-6
No files matched your search
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="x_purchase_price" model="ir.model.fields">
|
||||
<field name="field_description">Einkaufspreis</field>
|
||||
<field name="model">product.template</field>
|
||||
<field name="model_id" ref="product.model_product_template"/>
|
||||
<field name="name">x_purchase_price</field>
|
||||
<field name="store" eval="True"/>
|
||||
<field name="readonly" eval="False"/>
|
||||
<field name="copied" eval="False"/>
|
||||
<field name="ttype">float</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<odoo>
|
||||
<record id="x_last_delivery_partner_id" model="ir.model.fields">
|
||||
<field name="field_description">Pakettyp</field>
|
||||
<field name="model">stock.quant</field>
|
||||
<field name="model_id" ref="stock.model_stock_quant"/>
|
||||
<field name="name">x_package_type</field>
|
||||
<field name="store" eval="False"/>
|
||||
<field name="readonly" eval="True"/>
|
||||
<field name="copied" eval="False"/>
|
||||
<field name="ttype">char</field>
|
||||
<field name="related">package_id.package_type_id.display_name</field>
|
||||
</record>
|
||||
</odoo>
|
||||
@@ -0,0 +1,5 @@
|
||||
<data inherit_id="product.product_template_only_form_view" priority="50">
|
||||
<field name="categ_id" position="before">
|
||||
<field name="x_purchase_price" widget="float" options="{'currency_field':'currency_id','field_digits':true,'digits':[1,3]}"/>
|
||||
</field>
|
||||
</data>
|
||||
@@ -25,19 +25,25 @@
|
||||
<t t-if="doc.date_order">
|
||||
<td width="200px">Date</td>
|
||||
<td width="500px">
|
||||
|
||||
<span id="date_order" t-field="doc.date_order" t-options="{ "widget": "date" }"/>
|
||||
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
<t t-if="doc.state != 'sale'">
|
||||
<tr>
|
||||
<t t-if="doc.validity_date">
|
||||
<td>Validity Date</td>
|
||||
<td>
|
||||
<span id="validity_date" t-field="doc.validity_date" t-options="{ "widget": "date" }"/>
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
</t>
|
||||
<tr>
|
||||
<t t-if="doc.client_order_ref">
|
||||
<td>Your Reference</td>
|
||||
<td>
|
||||
|
||||
<span t-field="doc.client_order_ref"/>
|
||||
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
@@ -87,6 +93,6 @@
|
||||
</td>
|
||||
</t>
|
||||
</tr>
|
||||
</table>
|
||||
</table>
|
||||
</xpath>
|
||||
</data>
|
||||
</data>
|
||||
@@ -0,0 +1,58 @@
|
||||
<data inherit_id="stock.report_delivery_document" priority="60">
|
||||
|
||||
<xpath expr="//table[@name='stock_move_line_table']" position="after">
|
||||
<div style="margin-top: 30px">
|
||||
|
||||
<t t-set="lines" t-value="o.move_ids.move_line_ids"/>
|
||||
<t t-set="product_weight" t-value="0.0"/>
|
||||
<t t-set="net_weight" t-value="0.0"/>
|
||||
<tr t-foreach="lines" t-as="move">
|
||||
<t t-set="product_weight" t-value="move.product_id.weight * move.quantity"/>
|
||||
<t t-set="net_weight" t-value="net_weight + product_weight"/>
|
||||
</tr>
|
||||
|
||||
<t t-set="lines" t-value="o.package_ids"/>
|
||||
<t t-set="count_packages" t-value="0"/>
|
||||
<t t-set="total_weight" t-value="0.0"/>
|
||||
<t t-set="has_shipping_weight" t-value="False"/>
|
||||
|
||||
<tr t-foreach="lines" t-as="package">
|
||||
<t t-set="count_packages" t-value="count_packages + 1"/>
|
||||
<t t-set="total_weight" t-value="total_weight + package.weight"/>
|
||||
<t t-if="package.shipping_weight">
|
||||
<t t-set="has_shipping_weight" t-value="True"/>
|
||||
</t>
|
||||
</tr>
|
||||
<div class="row" style="text-align: right;">
|
||||
<div class="col-8"/>
|
||||
<div class="col-3">
|
||||
<div class="row">
|
||||
<t t-if="count_packages">
|
||||
<strong>Anzahl Packete:</strong>
|
||||
</t>
|
||||
</div>
|
||||
<div class="row">
|
||||
<strong>Gesamtgewicht Netto:</strong>
|
||||
</div>
|
||||
<div class="row">
|
||||
<t t-if="total_weight">
|
||||
<strong>Gesamtgewicht Brutto:</strong>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-1" style="text-align: right;">
|
||||
<div class="row">
|
||||
<strong t-esc="count_packages"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<strong t-esc="net_weight"/>
|
||||
</div>
|
||||
<div class="row">
|
||||
<strong t-esc="total_weight"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
|
||||
</data>
|
||||
Reference in new issue
Block a user