Skip to content
Snippets Groups Projects
Commit 1cdd1db4 authored by Rémi - Le Filament's avatar Rémi - Le Filament
Browse files

[ADD] sale order preparation report

parent d459e7dd
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@
"report/report_invoice.xml",
"report/report_pricelist.xml",
"report/report_saleorder.xml",
"report/report_saleorder_preparation.xml",
"report/report_stockpicking_operations.xml",
# views menu
# wizard
......
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<data>
<template id="report_sale_order_preparation">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<div class="page">
<div class="row">
<div class="col-6" name="div_outgoing_address">
<div>
<span><strong
>Adresse du client :</strong></span>
<div
t-field="o.partner_shipping_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'
/>
</div>
</div>
</div>
<br />
<h1 t-field="o.name" class="mt0 float-left" />
<div class="row mt48 mb32">
<div class="col-auto" name="div_state">
<strong>Statut :</strong>
<p t-field="o.state" />
</div>
<div class="col-auto" name="div_commitment_date">
<strong>Date de livraison prévue :</strong>
<p t-field="o.commitment_date" />
</div>
<div class="col-auto" name="div_transporter">
<strong>Transporteur :</strong>
<p t-field="o.res_transporter_id" />
</div>
<div class="col-auto" name="div_packaging">
<strong>Emballage :</strong>
<p t-field="o.packaging_id" />
</div>
<div class="col-auto" name="div_billing">
<strong>Type de facturation :</strong>
<p t-field="o.billing_type_id" />
</div>
</div>
<div class="row mt48 mb32">
<div
t-if="o.partner_shipping_id.delivery_note"
class="col-auto"
name="div_delivery_note"
>
<strong>Note :</strong>
<p t-field="o.partner_shipping_id.delivery_note" />
</div>
</div>
<table
class="table table-sm table-prepa"
t-if="o.order_line"
>
<thead>
<tr>
<th name="th_product">
<strong>Article</strong>
</th>
<th name="th_qty">
<strong>Quantité</strong>
</th>
<th name="th_serial_number" class="text-center">
<strong>Numéro de Lot</strong>
</th>
<th name="th_expiry" class="text-center">
<strong>DLC</strong>
</th>
</tr>
</thead>
<tbody>
<t t-foreach="o.order_line" t-as="line">
<tr>
<td>
<span
t-field="line.product_id.display_name"
/><br />
<span
t-field="line.product_id.description"
/>
</td>
<td>
<span t-field="line.product_uom_qty" />
<span
t-field="line.product_uom"
groups="uom.group_uom"
/>
</td>
</tr>
</t>
</tbody>
</table>
<p t-field="o.note" />
</div>
</t>
</t>
</t>
</template>
</data>
</odoo>
/***
Preparations
***/
.table-prepa td {
border: thin solid #000;
}
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<!-- Assets for reports -->
<template id="report_assets_common" inherit_id="web.report_assets_common">
<xpath expr="." position="inside">
<link
rel="stylesheet"
type="text/scss"
href="/fumoc_sale/static/src/scss/layout_generic.scss"
/>
</xpath>
</template>
</odoo>
......@@ -46,5 +46,20 @@
</field>
</record>
<record id="action_report_sale_preparation" model="ir.actions.report">
<field name="name">Préparation Commande</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">fumoc_sale.report_sale_order_preparation</field>
<field
name="report_file"
>fumoc_sale.report_sale_order_preparation_operations</field>
<field
name="print_report_name"
>'Préparation de Commande - %s - %s' % (object.name, object.partner_id.name or '')</field>
<field name="binding_model_id" ref="model_sale_order" />
<field name="binding_type">report</field>
</record>
</data>
</odoo>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment