Pārlūkot izejas kodu

[ADD] validacion en el ticket de la cocina

Rodney Elpidio Enciso Arias 6 gadi atpakaļ
vecāks
revīzija
b83f9da84f
1 mainītis faili ar 36 papildinājumiem un 34 dzēšanām
  1. 36 34
      static/src/xml/pos_receipt.xml

+ 36 - 34
static/src/xml/pos_receipt.xml

@@ -106,42 +106,44 @@
                 </t>
             </div>
             <p></p>
-            
-            <div class="pos-sale-ticket" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 15px;'>
 
-                <p style="page-break-after: always;"></p>
-                <div style='text-align:center'>
-                    <h3>Cocina</h3>    
+            <t t-if="kitchenlines.length > 0">
+                <div class="pos-sale-ticket" style='font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;font-size: 15px;'>
+
+                    <p style="page-break-after: always;"></p>
+                    <div style='text-align:center'>
+                        <h3>Cocina</h3>    
+                    </div>                     
+                    
+                    <table class="table">
+                        <tbody>
+                            <colgroup>
+                                <col width='80%'/>
+                                <col width='20%'/>
+                            </colgroup>
+                            <t t-foreach="kitchenlines" t-as="kitchenline">
+                                <tr>
+                                    <td>
+                                        <t t-esc="kitchenline.product_name"/>
+                                        <t t-foreach="kitchenline.product_pack_lines" t-as="item">
+                                            <ul>
+                                                <li><t t-esc="item.product_name"/></li>
+                                            </ul>   
+                                        </t>    
+                                    </td>
+                                    <td>
+                                        <t t-esc="kitchenline.product_qty"/>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>------------------------------------------</td>
+                                    <td></td>
+                                </tr>
+                            </t>
+                        </tbody>
+                    </table>
                 </div>
-                
-                <table class="table">
-                    <tbody>
-                        <colgroup>
-                            <col width='80%'/>
-                            <col width='20%'/>
-                        </colgroup>
-                        <t t-foreach="kitchenlines" t-as="kitchenline">
-                            <tr>
-                                <td>
-                                    <t t-esc="kitchenline.product_name"/>
-                                    <t t-foreach="kitchenline.product_pack_lines" t-as="item">
-                                        <ul>
-                                            <li><t t-esc="item.product_name"/></li>
-                                        </ul>   
-                                    </t>    
-                                </td>
-                                <td>
-                                    <t t-esc="kitchenline.product_qty"/>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>------------------------------------------</td>
-                                <td></td>
-                            </tr>
-                        </t>
-                    </tbody>
-                </table>
-            </div>
+            </t>
         </t>
     </t>
 </templates>