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 @@ ...@@ -5,7 +5,7 @@
'author': 'LE FILAMENT', 'author': 'LE FILAMENT',
'version': '14.0.0.0.1', 'version': '14.0.0.0.1',
'license': "AGPL-3", 'license': "AGPL-3",
'depends': ['web','sale'], 'depends': ['web','sale','stock'],
'qweb': [], 'qweb': [],
'data': [ 'data': [
'data/paperformat_data.xml', 'data/paperformat_data.xml',
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
'data/report_layout.xml', 'data/report_layout.xml',
'views/report_compositions.xml', 'views/report_compositions.xml',
'views/report_composition_templates.xml', 'views/report_composition_templates.xml',
'views/report_delivery_ap.xml',
'views/report_delivery_ap_template.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 @@ ...@@ -2,30 +2,21 @@
<odoo> <odoo>
<data> <data>
<template id="report_delivery_ap"> <template id="report_picking" inherit_id="stock.report_picking">
<t t-call="web.html_container"> <div class="page" position="replace">
<t t-foreach="docs" t-as="o"> <h1 class="mt0 text-center">Bon de préparation</h1>
<t t-call="web.external_layout">
<h1 class="mt0 text-center">Bon de livraison</h1>
<div class="page"> <div class="page">
<div class="row"> <div class="row">
<div class="col-6" name="div_outgoing_address"> <div class="col-9" name="div_outgoing_address">
<h2> <h2>
<t t-if="not (env.context.get('proforma', False) or is_pro_forma)"> <span>Devis N° </span><span t-field="o.origin"/>
<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"/>
</h2> </h2>
<div class="mw-100 mb-3"> <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">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> <!-- <p class="m-0">Référent projet: <span t-field="o.user_id"/></p>-->
</div> </div>
</div> </div>
<div class="col-6" name="div_outgoing_address"> <div class="col-3" name="div_outgoing_address">
<div> <div>
<div t-field="o.partner_id" <div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/> t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
...@@ -33,67 +24,39 @@ ...@@ -33,67 +24,39 @@
</div> </div>
</div> </div>
<br/> <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> <thead>
<tr> <tr>
<th></th>
<th name="th_product"> <th name="th_product">
<strong>Produit</strong> <strong>Produit</strong>
</th> </th>
<th> <th>
<strong>Quantité</strong> <strong>Quantité</strong>
</th> </th>
<th>
<strong>Etat</strong>
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<!-- <t t-set="product_template" t-value="[]"/>--> <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">
<!-- <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">-->
<tr> <tr>
<td></td>
<td> <td>
<span t-field="stock.product_id.display_name"/><br/> <span t-field="ml.product_id.display_name"/><br/>
<span t-field="stock.product_id.description_picking"/> <span t-field="ml.product_id.description_picking"/>
</td> </td>
<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></td>
</tr> </tr>
<!-- </t>--> </t>
</t> </t>
</tbody> </tbody>
</table> </table>
</div> </div>
</t> </div>
</t>
</t>
</template> </template>
</data> </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