Rodney Elpidio Enciso Arias 6 lat temu
commit
ec2fe666c5
6 zmienionych plików z 347 dodań i 0 usunięć
  1. 1 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 22 0
      __openerp__.py
  4. 31 0
      static/src/css/pos.css
  5. 283 0
      static/src/xml/pos_receipt.xml
  6. 10 0
      template.xml

+ 1 - 0
__init__.py

@@ -0,0 +1 @@
+# -*- coding: utf-8 -*-

BIN
__init__.pyc


+ 22 - 0
__openerp__.py

@@ -0,0 +1,22 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "Eiru Nutty Bavariant Invoice",
+    'summary': """This module print POS receipt.""",
+    'author': "Eiru",
+    'website': "http://www.eiru.com.py",
+    'category': 'Point of Sale',
+    'version': '0.1',
+    'depends': [
+                'base',
+                'point_of_sale',
+                ],
+    "data": [
+        "template.xml",
+    ],
+    'qweb': [
+        'static/src/xml/pos_receipt.xml',
+    ],
+    'license': 'AGPL-3',
+    'installable': True,
+    'auto_install': False,
+}

+ 31 - 0
static/src/css/pos.css

@@ -0,0 +1,31 @@
+.pos .custom-sale-ticket {
+    text-align: left;
+    width: 800px;
+    /*height: 800px;*/
+    background-color: white;
+    margin: 20px;
+    padding: 15px;
+    font-size: 14px;
+    padding-bottom:30px;
+    display: inline-block;
+    /*font-family: "Inconsolata";*/
+    /*border: solid 1px rgb(220,220,220);*/
+    /*border-radius: 3px;*/
+    overflow: hidden;
+}
+/*.pos .pos-sale-ticket pre{
+    font-family: "Inconsolata";
+}
+.pos .pos-sale-ticket .emph{
+    font-size: 20px;
+    margin:5px;
+}
+.pos .pos-sale-ticket table {
+    width: 100%;
+    border: 0;
+    table-layout: fixed;
+}
+.pos .pos-sale-ticket table td {
+    border: 0;
+    word-wrap: break-word;
+}*/

+ 283 - 0
static/src/xml/pos_receipt.xml

@@ -0,0 +1,283 @@
+<templates>
+    <t t-extend="PosTicket">
+        <t t-jquery="div.pos-sale-ticket" t-operation="replace">
+            <div class="custom-sale-ticket">
+                <div class="row" style="column-count: 2; font-size: 12px;">
+                    
+                    <!-- 
+                        Original Comprador
+                    -->
+
+                    <div>
+
+                        <!-- Numero de factura -->
+                        <div style="padding-left:250px; padding-top:115px;">
+                            <t>0001</t>    
+                        </div>
+                        
+                        <div class="row" style="column-count: 2;">
+                            <!-- Fecha de Emision -->
+                            <div style="padding-left:130px; padding-top:12px;">
+                                <t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate)"/>
+                            </div>
+                            <!-- Conficion de venta -->
+                            <div style="padding-left:100px; padding-top:12px;">
+                                <t>Contado</t>
+                            </div>    
+                        </div>
+
+                        <!-- Nombre o Razon social -->
+                        <div style="padding-left:150px; padding-top:12px;">
+                            <t>Rodney Enciso Arias</t>    
+                        </div>
+
+                        <div class="row" style="column-count: 2;">
+                            <!-- RUC -->
+                            <div style="padding-left:50px; padding-top:11px;">
+                                <t>4.710.447</t>
+                            </div>
+
+                            <!-- Cod. Clente -->
+                            <div style="padding-left:100px; padding-top:11px;">
+                                <t>0001</t>
+                            </div>    
+                        </div>
+                        
+                        <!-- tabla -->
+                        <div style="padding-left:20px; padding-top:45px; font-size: 9px;  height: 135px;">
+                            <table class="table table-condensed">
+                                <tbody>
+                                    <colgroup>
+                                        <col width='10%'/>
+                                        <col width='37%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                    </colgroup>
+                                    <tr t-foreach="orderlines" t-as="orderline">
+                                        <td>
+                                            <t t-esc="orderline.get_quantity_str_with_unit()"/>
+                                        </td>
+                                        <td>
+                                            <t t-esc="orderline.get_product().display_name"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <div style="padding-left:20px; padding-top:45px; font-size: 9px;">
+                            <table class="table table-condensed">
+                                <tbody>
+                                    <colgroup>
+                                        <col width='10%'/>
+                                        <col width='37%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                    </colgroup>
+                                    <tr>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <div style="padding-left:280px; padding-top:15px;">
+                            <t>100.000</t>
+                        </div>                    
+                    </div>
+
+                    <!-- 
+                        Duplicado tributario
+                    -->
+
+                    <div>
+                        <!-- Numero de factura -->
+                        <div style="padding-left:250px; padding-top:115px;">
+                            <t>0001</t>    
+                        </div>
+                        
+                        <div class="row" style="column-count: 2;">
+                            <!-- Fecha de Emision -->
+                            <div style="padding-left:130px; padding-top:12px;">
+                                <t t-esc="new Date().toString(Date.CultureInfo.formatPatterns.shortDate)"/>
+                            </div>
+                            <!-- Conficion de venta -->
+                            <div style="padding-left:100px; padding-top:12px;">
+                                <t>Contado</t>
+                            </div>    
+                        </div>
+
+                        <!-- Nombre o Razon social -->
+                        <div style="padding-left:150px; padding-top:12px;">
+                            <t>Rodney Enciso Arias</t>    
+                        </div>
+
+                        <div class="row" style="column-count: 2;">
+                            <!-- RUC -->
+                            <div style="padding-left:50px; padding-top:11px;">
+                                <t>4.710.447</t>
+                            </div>
+
+                            <!-- Cod. Clente -->
+                            <div style="padding-left:100px; padding-top:11px;">
+                                <t>0001</t>
+                            </div>    
+                        </div>
+                        
+                        <!-- tabla -->
+                        <div style="padding-left:20px; padding-top:45px; font-size: 9px;  height: 135px;">
+                            <table class="table table-condensed">
+                                <tbody>
+                                    <colgroup>
+                                        <col width='10%'/>
+                                        <col width='37%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                    </colgroup>
+                                    <tr t-foreach="orderlines" t-as="orderline">
+                                        <td>
+                                            <t t-esc="orderline.get_quantity_str_with_unit()"/>
+                                        </td>
+                                        <td>
+                                            <t t-esc="orderline.get_product().display_name"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="orderline.get_display_price()"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <div style="padding-left:20px; padding-top:45px; font-size: 9px;">
+                            <table class="table table-condensed">
+                                <tbody>
+                                    <colgroup>
+                                        <col width='10%'/>
+                                        <col width='37%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                        <col width='15%'/>
+                                    </colgroup>
+                                    <tr>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                        <td>
+                                            <t t-set="monto" t-value="50000"/>
+                                            <t t-js="ctx">
+                                                ctx.monto = accounting.formatNumber(ctx.monto,0,'.',',');
+                                            </t>
+                                            <t t-esc="monto"/>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
+                        </div>
+
+                        <div style="padding-left:280px; padding-top:15px;">
+                            <t>100.000</t>
+                        </div> 
+                    </div>
+                </div>
+            </div>
+        </t>
+    </t>
+</templates>

+ 10 - 0
template.xml

@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <template id="indexs" inherit_id='point_of_sale.index' name="POS Header">
+            <xpath expr="//link[@id='pos-stylesheet']" position="after">
+                <link rel="stylesheet" href="/eiru_nutty_bavarian_invoice/static/src/css/pos.css" />
+            </xpath>
+        </template>
+    </data>
+</openerp>