Advertisement
rht_odoo

[GREENSEA FOOD] Delivery label

Nov 20th, 2024 (edited)
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.27 KB | None | 0 0
  1. <data>
  2.     <xpath expr="/t[@t-name='studio_report_document']" position="replace" mode="inner">
  3.         <div class="page">
  4.             <div class="oe_structure">
  5.                  <!--
  6.    Done by RHT on the 20/11/2024
  7.    Need: new label to put on the deliveries
  8.    Task : https://www.odoo.com/odoo/project.task/project.task/4102897/project.project/15829/tasks/4313760
  9.    Code : https://pastebin.com/tjFURPir -->
  10.                 <br/>
  11.                 <img src="/web/image/922-c747740e/Greensea%20Logo.png" alt="" class="img img-fluid o_we_custom_image" style="width: 25%;"/>
  12.                 <span t-field="doc.name" t-options="{'widget': 'barcode', 'symbology': 'auto', 'img_style': 'width:60mm;height:14mm'}"/>
  13.                 <span class="h4-fs"/>
  14.                 <br/>
  15.                 <br/>
  16.                 <div class="row">
  17.                     <div class="col-6">
  18.                         <div class="oe_structure">
  19.                             <span t-field="doc.partner_id.name" class="h4-fs">Customer Name</span>
  20.                         </div>
  21.                     </div>
  22.                     <div class="col-6">
  23.                      
  24.                         <span t-field="doc.company_id.x_studio_ef_number_1" t-options-widget="'image'" style="width: 50%;"/>
  25.                     </div>
  26.                 </div>
  27.                 <table class="table table-sm o_small-fs">
  28.                     <tbody>
  29.                         <t t-set="total_weight" t-value="0"/>
  30.                         <t t-set="no_vegetable" t-value="0"/>
  31.                         <tr t-foreach="doc.move_ids_without_package" t-as="line">
  32.                             <t t-if="line.product_id.categ_id.id == 8">
  33.                                 <t t-set="no_vegetable" t-value="no_vegetable + 1"/></t>
  34.                             <t t-set="total_weight" t-value="total_weight+ line.quantity"/>
  35.                             <td style="width: 60%">
  36.                                 <strong t-field="line.product_id.name"/>
  37.                                 <br/>
  38.                                 <span t-field="line.product_id.description_sale"/>
  39.                                 <br/>
  40.                                
  41.                             </td>
  42.                             <td>
  43.                                
  44.                                 <table class="table table-sm o_small-fs">
  45.                                     <tbody>
  46.                                         <tr t-foreach="line.lot_ids" t-as="sn">
  47.                                           <span t-field="sn.name"/> <br/>
  48.                                           <i t-field="sn.x_studio_production_method_id" style="font-size: 10px;"/> <span style="font-size: 10px;"> </span>
  49.                                 <i t-field="sn.x_studio_production_area_id" style="font-size: 10px;"/>
  50.                                         </tr>
  51.                                     </tbody>
  52.                                 </table>
  53.                             </td>
  54.                         </tr>
  55.                     </tbody>
  56.                 </table>
  57.                 <div style="font-size: 10px;">
  58.                     Delivery Date: 
  59.                
  60.                    
  61.                    
  62.                    
  63.                    
  64.                    
  65.                     <strong t-field="doc.scheduled_date" t-options-widget="'date'"/>
  66.                     <t t-set="expiration_date" t-value="doc.scheduled_date.date() + datetime.timedelta(days=2)"/>
  67.                     <br/>
  68.                    
  69.                 Expiration Date: 
  70.                
  71.                    
  72.                    
  73.                    
  74.                    
  75.                    
  76.                     <strong t-esc="expiration_date" t-options-widget="'date'"/>
  77.                     <br/>
  78.                     Total Weight: 
  79.                
  80.                    
  81.                    
  82.                    
  83.                    
  84.                    
  85.                     <strong t-if="no_vegetable == 0 " t-esc="total_weight"/>
  86.                     <strong> KG
  87.                     </strong>
  88.                     <br/>
  89.                     <span t-if="no_vegetable == 0 ">To be stored in temperature between 2°C and 4°C</span>
  90.                 </div>
  91.             </div>
  92.         </div>
  93.     </xpath>
  94. </data>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement