Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <data>
- <xpath expr="/t[@t-name='studio_report_document']" position="replace" mode="inner">
- <div class="page">
- <div class="oe_structure">
- <!--
- Done by RHT on the 20/11/2024
- Need: new label to put on the deliveries
- Task : https://www.odoo.com/odoo/project.task/project.task/4102897/project.project/15829/tasks/4313760
- Code : https://pastebin.com/tjFURPir -->
- <br/>
- <img src="/web/image/922-c747740e/Greensea%20Logo.png" alt="" class="img img-fluid o_we_custom_image" style="width: 25%;"/>
- <span t-field="doc.name" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': 'width:60mm;height:14mm'}"/>
- <span class="h4-fs"/>
- <br/>
- <br/>
- <div class="row">
- <div class="col-6">
- <div class="oe_structure">
- <span t-field="doc.partner_id.name" class="h4-fs">Customer Name</span>
- </div>
- </div>
- <div class="col-6">
- <span t-field="doc.company_id.x_studio_ef_number_1" t-options-widget="'image'" style="width: 50%;"/>
- </div>
- </div>
- <table class="table table-sm o_small-fs">
- <tbody>
- <t t-set="total_weight" t-value="0"/>
- <t t-set="no_vegetable" t-value="0"/>
- <tr t-foreach="doc.move_ids_without_package" t-as="line">
- <t t-if="line.product_id.categ_id.id == 8">
- <t t-set="no_vegetable" t-value="no_vegetable + 1"/></t>
- <t t-set="total_weight" t-value="total_weight+ line.quantity"/>
- <td style="width: 60%">
- <strong t-field="line.product_id.name"/>
- <br/>
- <span t-field="line.product_id.description_sale"/>
- <br/>
- </td>
- <td>
- <table class="table table-sm o_small-fs">
- <tbody>
- <tr t-foreach="line.lot_ids" t-as="sn">
- <span t-field="sn.name"/> <br/>
- <i t-field="sn.x_studio_production_method_id" style="font-size: 10px;"/> <span style="font-size: 10px;"> </span>
- <i t-field="sn.x_studio_production_area_id" style="font-size: 10px;"/>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- </tbody>
- </table>
- <div style="font-size: 10px;">
- Delivery Date:
- <strong t-field="doc.scheduled_date" t-options-widget="'date'"/>
- <t t-set="expiration_date" t-value="doc.scheduled_date.date() + datetime.timedelta(days=2)"/>
- <br/>
- Expiration Date:
- <strong t-esc="expiration_date" t-options-widget="'date'"/>
- <br/>
- Total Weight:
- <strong t-if="no_vegetable == 0 " t-esc="total_weight"/>
- <strong> KG
- </strong>
- <br/>
- <span t-if="no_vegetable == 0 ">To be stored in temperature between 2°C and 4°C</span>
- </div>
- </div>
- </div>
- </xpath>
- </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement