Skip to content
Extraits de code Groupes Projets
Valider effaae82 rédigé par Juliana's avatar Juliana
Parcourir les fichiers

[UPD]Change bon de préparation stock

parent 7103c4a9
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -5,7 +5,7 @@
'author': 'LE FILAMENT',
'version': '14.0.0.0.1',
'license': "AGPL-3",
'depends': ['web','sale'],
'depends': ['web','sale','stock'],
'qweb': [],
'data': [
'data/paperformat_data.xml',
......@@ -16,7 +16,6 @@
'data/report_layout.xml',
'views/report_compositions.xml',
'views/report_composition_templates.xml',
'views/report_delivery_ap.xml',
'views/report_delivery_ap_template.xml',
],
}
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<!-- QWeb Reports -->
<record id="action_delivery_ap" model="ir.actions.report">
<field name="name">Bons de livraisons</field>
<field name="model">sale.order</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">ap_report.report_delivery_ap</field>
<field name="report_file">ap_report.report_delivery_ap</field>
<field name="print_report_name">'Bon de livraison - %s' % (object.name)</field>
<field name="binding_model_id" ref="sale.model_sale_order"/>
</record>
</data>
</odoo>
......@@ -2,30 +2,21 @@
<odoo>
<data>
<template id="report_delivery_ap">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<h1 class="mt0 text-center">Bon de livraison</h1>
<template id="report_picking" inherit_id="stock.report_picking">
<div class="page" position="replace">
<h1 class="mt0 text-center">Bon de préparation</h1>
<div class="page">
<div class="row">
<div class="col-6" name="div_outgoing_address">
<div class="col-9" name="div_outgoing_address">
<h2>
<t t-if="not (env.context.get('proforma', False) or is_pro_forma)">
<span t-if="o.state not in ['draft','sent']">Commande n° </span>
<span t-if="o.state in ['draft','sent']">Devis N° </span>
</t>
<t t-if="env.context.get('proforma', False) or is_pro_forma">
<span>Facture pro-forma n° </span>
</t>
<span t-field="o.name"/>
<span>Devis N° </span><span t-field="o.origin"/>
</h2>
<div class="mw-100 mb-3">
<p class="m-0">Du <span t-field="o.date_order" t-options='{"widget": "date"}'/></p>
<p class="m-0">Référent projet: <span t-field="o.user_id"/></p>
<p class="m-0">Du <span t-field="o.scheduled_date" t-options='{"widget": "date"}'/></p>
<!-- <p class="m-0">Référent projet: <span t-field="o.user_id"/></p>-->
</div>
</div>
<div class="col-6" name="div_outgoing_address">
<div class="col-3" name="div_outgoing_address">
<div>
<div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
......@@ -33,67 +24,39 @@
</div>
</div>
<br/>
<table class="table table-sm" t-if="o.sale_intervention_stock_ids">
<table class="table table-sm" t-if="o.move_ids_without_package">
<thead>
<tr>
<th></th>
<th name="th_product">
<strong>Produit</strong>
</th>
<th>
<strong>Quantité</strong>
</th>
<th>
<strong>Etat</strong>
</th>
</tr>
</thead>
<tbody>
<!-- <t t-set="product_template" t-value="[]"/>-->
<!-- <t t-foreach="o.sale_intervention_stock_ids" t-as="l">-->
<!-- <t t-set="product_template" t-value="product_template+[l.product_template_id]"/>-->
<!-- </t>-->
<!-- <t t-foreach="set(product_template)" t-as="tmp">-->
<!--&lt;!&ndash; <div><strong t-esc="tmp.name"/></div>&ndash;&gt;-->
<!-- <tr>-->
<!-- <td>-->
<!-- <span t-field="tmp.name"/><br/>-->
<!-- <span t-field="stock.product_id.description_picking"/>-->
<!-- </td>-->
<!-- <td>-->
<!-- <span t-field="stock.product_uom_qty"/>-->
<!-- </td>-->
<!-- <td></td>-->
<!-- </tr>-->
<!-- </t>-->
<t t-foreach="o.sale_intervention_stock_ids" t-as="stock">
<!-- In case you come across duplicated lines, ask NIM or LAP -->
<!-- <t t-foreach="move.move_line_ids.sorted(key=lambda ml: ml.location_id.id)" t-as="ml">-->
<t t-foreach="o.move_ids_without_package" t-as="move">
<t t-foreach="move.move_line_ids.sorted(key=lambda ml: ml.location_id.id)" t-as="ml">
<tr>
<td></td>
<td>
<span t-field="stock.product_id.display_name"/><br/>
<span t-field="stock.product_id.description_picking"/>
<span t-field="ml.product_id.display_name"/><br/>
<span t-field="ml.product_id.description_picking"/>
</td>
<td>
<span t-field="stock.product_uom_qty"/>
<span t-if="o.state != 'done'" t-field="ml.product_uom_qty"/>
<span t-if="o.state == 'done'" t-field="ml.qty_done"/>
<span t-field="ml.product_uom_id" groups="uom.group_uom"/>
</td>
<td></td>
</tr>
<!-- </t>-->
</t>
</t>
</tbody>
</table>
</div>
</t>
</t>
</t>
</div>
</template>
</data>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter