Advertisement
ninofelino

Picking Operations

Dec 4th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 11.22 KB | None | 0 0
  1. <?xml version="1.0"?>
  2. <t t-name="stock.report_picking">
  3.             <t t-call="web.html_container">
  4.                 <t t-foreach="docs" t-as="o">
  5.                     <t t-call="web.external_layout">
  6.                         <div class="page">
  7.                             <div class="row">
  8.                              
  9.                                 <div class="col-xs-6">
  10.                                      <span><strong>Delivery Address:</strong></span>
  11.                                      <div t-field="o.move_lines[0].partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/>
  12.                                     <div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
  13.                                         <span><strong>Delivery Address:</strong></span>
  14.                                         <div t-field="o.move_lines[0].partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/>
  15.                                     </div>
  16.                                     <div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines or not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
  17.                                        
  18.                                      </div>
  19.                                 </div>
  20.                                 <div class="col-xs-5 col-xs-offset-1">
  21.                                     <div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
  22.                                         <span><strong>Partner Address:</strong></span>
  23.                                     </div>
  24.                                     <div t-if="o.picking_type_id.code=='internal' and o.partner_id">
  25.                                         <span><strong>Warehouse Address:</strong></span>
  26.                                     </div>
  27.                                     <div t-if="o.picking_type_id.code=='outgoing' and o.partner_id">
  28.                                         <span><strong>Customer Address:</strong></span>
  29.                                     </div>
  30.                                     <div t-if="o.partner_id" name="partner_header">
  31.                                         <div t-field="o.partner_id" t-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;name&quot;, &quot;phone&quot;], &quot;no_marker&quot;: True, &quot;phone_icons&quot;: True}"/>
  32.                                         <p t-if="o.sudo().partner_id.vat"><t t-esc="o.company_id.country_id.vat_label or 'TIN'"/>: <span t-field="o.sudo().partner_id.vat"/></p>
  33.                                     </div>
  34.                                 </div>
  35.                             </div>
  36.                             <br/>
  37.                             <img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px" class="pull-right mb16"/>
  38.                             <h1 t-field="o.name" class="mt0 pull-left"/>
  39.                             <div class="clearfix"/>
  40.                             <table class="table table-condensed">
  41.                             <thead>
  42.                                 <tr>
  43.                                     <th t-if="o.origin"><strong>Order (Origin)</strong></th>
  44.                                     <th><strong>State</strong></th>
  45.                                     <th><strong>Commitment Date</strong></th>
  46.                                     <th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
  47.                                 </tr>
  48.                             </thead>
  49.                             <tbody>
  50.                                 <tr>
  51.                                     <td t-if="o.origin">
  52.                                         <span t-field="o.origin"/>
  53.                                     </td>
  54.                                     <td>
  55.                                         <span t-field="o.state"/>
  56.                                     </td>
  57.                                     <td>
  58.                                         <span t-field="o.date"/>
  59.                                     </td>
  60.                                     <td name="td_sched_date">
  61.                                         <span t-field="o.scheduled_date"/>
  62.                                     </td>
  63.                                 </tr>
  64.                             </tbody>
  65.                             </table>
  66.                             <br/>
  67.                             <br/>
  68.                             <table class="table table-condensed" t-if="o.move_line_ids">
  69.                               <t t-set="has_barcode" t-value="any([move_lines.product_id and move_lines.product_id.sudo().barcode or move_lines.package_id for move_lines in o.move_line_ids])"/>
  70.                               <t t-set="has_serial_number" t-value="o.move_line_ids.filtered(lambda ml: ml.lot_id or ml.lot_name)" groups="stock.group_production_lot"/>
  71.                               <thead>
  72.                                 <tr>
  73.                                     <th width="15%">Product</th>
  74.                                     <th width="10%">Quantity</th>
  75.                                     <th width="10%">Price</th>
  76.                                     <th width="20%" class="text-center">
  77.                                         <t t-if="has_barcode">Barcode</t>
  78.                                     </th>
  79.                                     <th width="15%">
  80.                                         <t t-if="o.picking_type_id.code != 'incoming'" align="left">Source</t>
  81.                                     </th>
  82.                                     <th width="20%">
  83.                                         <t t-if="has_serial_number">Lot/Serial Number</t>
  84.                                     </th>
  85.                                     <th width="20%" class="text-right">Destination</th>
  86.                                 </tr>
  87.                               </thead>
  88.                               <tbody>
  89.                                     <tr t-foreach="o.move_lines.sorted(key=lambda m: m.product_id.id)" t-as="move">
  90.                                         <td>
  91.                                             <span t-field="move.product_id.display_name"/><br/>
  92.                                            
  93.                                         </td>
  94.                                         <td>
  95.                                             <span t-if="move.product_qty" t-field="move.product_qty"/>
  96.                                             <span t-if="not move.product_qty" t-esc="move.product_uom._compute_quantity(move.quantity_done, move.product_id.uom_id, rounding_method='HALF-UP')"/>
  97.                                             <span t-field="move.product_id.uom_id" groups="product.group_uom"/>
  98.                                         </td>
  99.                                        
  100.                                          <td>
  101.                                            
  102.                                             <span t-field="move.product_id.lst_price" />
  103.                                         </td>
  104.                                        
  105.                                        
  106.                                        
  107.                                        
  108.                                         <td>
  109.                                          
  110.                                             <t t-if="has_barcode">
  111.                                                
  112.                                                
  113.                                             </t>
  114.                                         </td>
  115.                                         <td colspan="3">
  116.                                            
  117.                                            
  118.                                          
  119.                                         </td>
  120.                                     </tr>
  121.                               </tbody>
  122.                             </table>
  123.                             <table class="table table-condensed" t-if="o.entire_package_ids and o.picking_type_entire_packs">
  124.                                 <thead>
  125.                                     <tr>
  126.                                         <th width="25%">Package</th>
  127.                                         <th width="25%" class="text-center">Barcode</th>
  128.                                         <th width="25%" class="text-left">Source</th>
  129.                                         <th width="25%" class="text-right">Destination</th>
  130.                                     </tr>
  131.                                 </thead>
  132.                                 <tbody>
  133.                                     <tr t-foreach="o.entire_package_ids.sorted(key=lambda p: p.name)" t-as="package">
  134.                                         <t t-set="package" t-value="package.with_context({'picking_id':o.id})"/>
  135.                                         <td><span t-field="package.name"/></td>
  136.                                         <td><img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', package.name, 600, 100)" style="width:300px    ;height:50px"/></td>
  137.                                         <td><span t-field="package.current_source_location_id"/></td>
  138.                                         <td><span t-field="package.current_destination_location_id"/></td>
  139.                                     </tr>
  140.                                 </tbody>
  141.                                 <tfoot>
  142.                                        <tr>
  143.                                           <td><h1>footer</h1></td>
  144.                                          
  145.                                        </tr>
  146.                                      
  147.                                 </tfoot>
  148.                             </table>
  149.                             <p t-if="o.state in ['draft', 'waiting', 'confirmed']">
  150.                                 You do not have any products reserved for this picking.  Please click the 'Reserve' button
  151.                                 to check if products are available.
  152.                             </p>
  153.                            
  154.                             <table class="table table-condensed">
  155.                                   <tr></tr>
  156.                                   <tr></tr>
  157.                                   <tr></tr>
  158.                                    <tr>
  159.                                         <th width="25%">Dibuat</th>
  160.                                         <th width="25%" class="text-center">Mengetahui</th>
  161.                                         <th width="25%" class="text-left"></th>
  162.                                         <th width="25%" class="text-right">Penerima</th>
  163.                                     </tr>
  164.                             </table>
  165.                            
  166.                             <p t-field="o.note"/>
  167.                            
  168.                         </div>
  169.                     </t>
  170.                  </t>
  171.              </t>
  172.         </t>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement