Jelajahi Sumber

Módulo para orden de cobro para cliente

SEBAS 2 minggu lalu
melakukan
085dc042b3
15 mengubah file dengan 643 tambahan dan 0 penghapusan
  1. 23 0
      __init__.py
  2. TEMPAT SAMPAH
      __init__.pyc
  3. 18 0
      __openerp__.py
  4. 20 0
      data/report_paperformat_cobroorden.xml
  5. 185 0
      orden_cobro.py
  6. TEMPAT SAMPAH
      orden_cobro.pyc
  7. 183 0
      orden_cobro_report.xml
  8. 19 0
      orden_cobro_sequence.xml
  9. 123 0
      orden_cobro_view.xml
  10. 25 0
      recibo_orden_cobro.py
  11. TEMPAT SAMPAH
      recibo_orden_cobro.pyc
  12. 31 0
      res_currency.py
  13. TEMPAT SAMPAH
      res_currency.pyc
  14. 16 0
      res_currency_view.xml
  15. TEMPAT SAMPAH
      static/description/icon.png

+ 23 - 0
__init__.py

@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+from . import orden_cobro, res_currency, recibo_orden_cobro
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

TEMPAT SAMPAH
__init__.pyc


+ 18 - 0
__openerp__.py

@@ -0,0 +1,18 @@
+# -*- encoding: utf-8 -*-
+{
+    'name': 'Orden de cobro',
+    'version': '1.0',
+    'category': 'Accounting',
+    'description': 'Modulo para registrar ordenes de cobro a clientes',
+    'author': 'Sebastian Penayo',
+    'depends': ['base', 'account', 'set_paraguay'],
+    'data': [
+        'orden_cobro_sequence.xml',
+        'data/report_paperformat_cobroorden.xml',
+        'orden_cobro_report.xml',
+        'orden_cobro_view.xml',
+        'res_currency_view.xml',
+    ],
+    'installable': True,
+    'auto_install': False,
+}

+ 20 - 0
data/report_paperformat_cobroorden.xml

@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+    <data>
+        <record id="paperformat_orden_cobroorden" model="report.paperformat">
+            <field name="name">Orden de cobro</field>
+            <field name="default" eval="True"/>
+            <field name="format">custom</field>
+            <field name="page_height">150</field>
+            <field name="page_width">80</field>
+            <field name="orientation">Portrait</field>
+            <field name="margin_top">1</field>
+            <field name="margin_bottom">1</field>
+            <field name="margin_left">1</field>
+            <field name="margin_right">1</field>
+            <field name="header_line" eval="False" />
+            <field name="header_spacing">0</field>
+            <field name="dpi">300</field>
+        </record>
+    </data>
+</openerp>

+ 185 - 0
orden_cobro.py

@@ -0,0 +1,185 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+#    OpenERP, Open Source Management Solution
+#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as
+#    published by the Free Software Foundation, either version 3 of the
+#    License, or (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+from openerp import models, fields, api
+from openerp.exceptions import ValidationError, except_orm, Warning, RedirectWarning
+from openerp.tools import DEFAULT_SERVER_TIME_FORMAT
+from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT
+from datetime import datetime
+
+class OrdenCobro(models.Model):
+    _name = 'orden.cobro'
+    _description = 'Orden de cobro'
+
+    def _get_user(self):
+        return self.env.uid
+
+    def _get_number(self):
+        return self.env['ir.sequence'].next_by_code('orden.cobro') or '*'
+
+    name = fields.Char(
+        string=u'Referencia',
+        readonly=True,
+        default=_get_number,
+    )
+
+    partner_id = fields.Many2one(
+        'res.partner',
+        string='Cliente',
+        required=True
+    )
+
+    date = fields.Date(
+        string='Fecha elab.',
+        default=fields.Date.context_today
+    )
+
+    user_id = fields.Many2one(
+        comodel_name='res.users',
+        string='Preparado por:',
+        default=_get_user
+    )
+
+    company_id = fields.Many2one(
+        'res.company',
+        string='Compañía',
+        required=True,
+        default=lambda self: self.env.user.company_id
+    )
+
+    invoice_ids = fields.One2many(
+        comodel_name='account.invoice',
+        inverse_name='ordencobro_invoice_id',
+        string='Facturas'
+    )
+
+    responsable = fields.Char(
+        string='Aprobado Gerencia General:'
+    )
+
+    celular_partner = fields.Char(
+        related='partner_id.mobile',
+        string='Móvil',
+        store=True
+    )
+
+    telefono_partner = fields.Char(
+        related='partner_id.phone',
+        string='Teléfono',
+        store=True
+    )
+
+    ruc_partner = fields.Char(
+        related='partner_id.ruc',
+        string='RUC:',
+        readonly=True
+    )
+
+    forma_cobro = fields.Char(
+        string='Forma de Cobro'
+    )
+
+    presupuesto_nro = fields.Char(
+        string='Presupuesto N°'
+    )
+
+    cheque_nro = fields.Char(
+        string='Cheque N°'
+    )
+
+    transf_nro = fields.Char(
+        string='Transferencia N°'
+    )
+
+    cheque_banco = fields.Char(
+        string='Banco Cheque'
+    )
+
+    transf_banco = fields.Char(
+        string='Banco Transferencia'
+    )
+
+    concepto = fields.Char(
+        string='Concepto'
+    )
+
+    currency_id = fields.Many2one(
+        'res.currency',
+        string='Moneda',
+        related='company_id.currency_id',
+        store=True,
+        readonly=True
+    )
+
+    is_efec = fields.Boolean(string="Efectivo", default=False)
+    is_cheq = fields.Boolean(string="Cheque", default=False)
+    is_transf = fields.Boolean(string="Transferencia", default=False)
+
+    comprobante_monto = fields.Float(
+        string='Importe Comprobante'
+    )
+
+    obra = fields.Char(
+        string='Obra'
+    )
+
+    solicitado_por = fields.Char(
+        string='Solicitado por'
+    )
+
+    total = fields.Float(
+        string='Total',
+        compute='_compute_total',
+        store=True
+    )
+
+
+    @api.depends('invoice_ids.amount_total')
+    def _compute_total(self):
+        for rec in self:
+            rec.total = sum(line.amount_total for line in rec.invoice_ids)
+
+
+    @api.onchange('partner_id')
+    def _onchange_partner_id(self):
+        # Filtro dinámico para facturas abiertas del cliente seleccionado
+        if self.partner_id:
+            return {
+                'domain': {
+                    'invoice_ids': [
+                        ('partner_id', '=', self.partner_id.id),
+                        ('state', '=', 'open'),
+                        ('type', '=', 'out_invoice')
+                    ]
+                }
+            }
+
+
+
+
+class AccountInvoice(models.Model):
+    _inherit = 'account.invoice'
+
+    ordencobro_invoice_id = fields.Many2one(
+        comodel_name='orden.cobro',
+        string='Orden de cobro'
+    )

TEMPAT SAMPAH
orden_cobro.pyc


+ 183 - 0
orden_cobro_report.xml

@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+  <data>
+    <report
+      id="report_orden_cobro"
+      model="orden.cobro"
+      string="Orden de cobro"
+      report_type="qweb-pdf"
+      name="orden_cobro.orden_cobro"
+      file="orden_cobro.orden_cobro"
+    />
+
+    <template id="orden_cobro">
+      <t t-call="report.html_container">
+        <t t-foreach="docs" t-as="o">
+          <t t-call="report.external_layout">
+            <t t-set="meses" t-value="{
+              '01': 'enero', '02': 'febrero', '03': 'marzo', '04': 'abril',
+              '05': 'mayo', '06': 'junio', '07': 'julio', '08': 'agosto',
+              '09': 'septiembre', '10': 'octubre', '11': 'noviembre', '12': 'diciembre'
+            }"/>
+            <t t-set="fecha_parts" t-value="o.date.split('-')"/>
+            <t t-set="fecha_letras" t-value="'%s de %s de %s' % (fecha_parts[2], meses[fecha_parts[1]], fecha_parts[0])"/>
+
+            <div class="page" style="font-size:13px;">
+              <div style="border: 2px solid #ddd; padding: 10px;">
+
+                <!-- Cabecera -->
+                <div class="row" style="display: flex; align-items: stretch; margin-top: -25px; border-top: 1px solid #ddd;">
+                  <div class="col-xs-3" style="border-radius: 10px 0 0 10px; border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                    <div class="logo-container">
+                      <img t-if="o.company_id.logo" t-att-src="'data:image/png;base64,%s' % o.company_id.logo" style="max-height: 125px;" />
+                    </div>
+                    <div style="margin-top: 0.3cm;"></div>
+                    <t><center><strong>INNOVACIÓN, TECNOLOGÍA Y SEGURIDAD</strong></center></t>
+                  </div>
+                  <div class="col-xs-5" style="border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                    <h3><center><strong><i>BIOELECTRIC</i></strong></center></h3>
+                    <t><center><b>de Armando Javier Aguilar Ramos</b></center></t>
+                    <t><center><b>Instalaciones eléctricas, electromecánicas y electrónicas.</b></center></t>
+                    <t><center><b>Comercio al por menor de otros artículos N.C.P.</b></center></t>
+                    <t><center><b>Comercio al por menor de otros artículos de Ferretería</b></center></t>
+                    <t><center><b>Calle Juan R. Medina c/ Av San Antonio</b></center></t>
+                    <t><center><b>San Antonio - Paraguay</b></center></t>
+                    <t><center><b>bioelectricpy@gmail.com - (0981) 939 132</b></center></t>
+                  </div>
+                  <div class="col-xs-4" style="border-radius: 0 10px 10px 0; border: 2px solid #ddd; display: flex; flex-direction: column; justify-content: center; padding: 10px;">
+                     <t>
+                      <div>
+                        <h5><center><strong>Formulario Nº 022</strong></center></h5>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <h3><center><strong>RECIBO DE DINERO</strong></center></h3>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <h4><center><strong><span t-field="o.name" /></strong></center></h4>
+                      </div>
+                    </t>
+                    <t>
+                      <div>
+                        <center><strong><span t-field="o.company_id.vat" /></strong></center>
+                      </div>
+                    </t>
+                  </div>
+                </div>
+
+                <hr style="border: 1px solid #ddd; margin-top: 10px; margin-bottom: 15px;"/>
+
+                <div style="margin-bottom: 15px; font-size: 13px;">
+                  <strong>Fecha:</strong> <span t-esc="fecha_letras"/>
+                </div>
+
+                <table style="width:100%; margin-bottom:15px;">
+                  <tr style="height: 25px;">
+                    <td><strong>Recibimos de   </strong> <span t-field="o.partner_id.name"/></td>
+                    <td><strong>R.U.C:</strong> <span t-esc="o.ruc_partner"/></td>
+                  </tr>
+                  <tr style="height: 25px;">
+                    <td><strong>Teléfono:</strong> <span t-esc="o.telefono_partner or ''"/></td>
+                    <td><strong>Celular:</strong> <span t-esc="o.celular_partner or ''"/></td>
+                  </tr>
+                </table>
+
+                <table style="width:100%; margin-bottom:15px;border: 1px solid #ddd; margin-top: 10px;">
+                  <tr style="height: 25px;">
+                      <td><strong>La cantidad de </strong> <span t-esc="convertir(o.total, o.currency_id.en_letras1)"/></td>
+                  </tr>
+                </table>
+                <table style="width:100%; margin-bottom:15px;border: 1px solid #ddd; margin-top: 10px;">
+                  <tr style="height: 25px;">
+                    <td><strong>Por concepto de </strong> <span t-esc="o.concepto or ''"/></td>
+                  </tr>
+                </table>
+
+                <!-- Detalle de Facturas -->
+                <div class="row" style="display: flex;">
+                  <div class="col-xs-3" style="border: 1px solid #ddd; padding: 10px;">
+                    <h4>Facturas</h4>
+                    <table style="width: 100%; border-collapse: collapse; margin-bottom: 20px; border: 1px solid #ddd;">
+                      <thead>
+                        <tr>
+                          <th style="border: 1px solid #ddd; padding: 8px;">Nº de Factura</th>
+                          <th style="border: 1px solid #ddd; padding: 8px;">Monto</th>
+                        </tr>
+                      </thead>
+                      <tbody>
+                        <tr t-foreach="o.invoice_ids" t-as="line">
+                          <td style="border: 1px solid #ddd; padding: 8px;"><span t-esc="line.name"/></td>
+                          <td style="border: 1px solid #ddd; padding: 8px; text-align: right;"><span t-esc="'{0:,.0f}'.format(line.amount_total)"/></td>
+                        </tr>
+                      </tbody>
+                    </table>
+                    <table style="width:100%; border: 1px solid #ddd; margin-bottom:15px;">
+                      <tr style="height: 30px;">
+                        <td style="width:40%; border-right:1px solid #ddd;">
+                          <strong>Importe Gs.:</strong>
+                        </td>
+                        <td style="width:60%; padding-left:10px;">
+                          <span t-esc="'{0:,.0f}'.format(o.total)"/>
+                        </td>
+                      </tr>
+                    </table>
+                  </div>
+
+                  <div class="col-xs-9" style="border: 1px solid #ddd; padding: 10px;">
+                    <strong>Forma de cobro:</strong>
+                    <div style="margin-top: 5px;">
+                      <span style="margin-right: 40px; display: inline-block;">
+                        <t t-if="o.is_efec">[x] Efectivo</t>
+                        <t t-if="not o.is_efec">[ ] Efectivo</t>
+                      </span>
+                      <span style="margin-right: 40px; display: inline-block;">
+                        <t t-if="o.is_cheq">[x] Cheque</t>
+                        <t t-if="not o.is_cheq">[ ] Cheque</t>
+                      </span>
+                      <span style="display: inline-block;">
+                        <t t-if="o.is_transf">[x] Transferencia</t>
+                        <t t-if="not o.is_transf">[ ] Transferencia</t>
+                      </span>
+                    </div>
+
+                    <table style="width:100%; margin-top: 10px; border-collapse: collapse; border: 1px solid #ddd;">
+                      <tr style="height: 25px;">
+                        <td style="border: 1px solid #ddd;"><strong>Banco Cheque:</strong> <span t-esc="o.cheque_banco or ''"/></td>
+                        <td style="border: 1px solid #ddd;"><strong>Cheque Nº:</strong> <span t-esc="o.cheque_nro or ''"/></td>
+                      </tr>
+                      <tr style="height: 25px;">
+                        <td style="border: 1px solid #ddd;"><strong>Banco Transferencia:</strong> <span t-esc="o.transf_banco or ''"/></td>
+                        <td style="border: 1px solid #ddd;"><strong>Transferencia Nº:</strong> <span t-esc="o.transf_nro or ''"/></td>
+                      </tr>
+                      <tr style="height: 25px;">
+                        <td style="border: 1px solid #ddd;"><strong>Presupuesto Nº:</strong> <span t-esc="o.presupuesto_nro or ''"/></td>
+                        <td style="border: 1px solid #ddd;"><strong>Obra:</strong> <span t-esc="o.obra or ''"/></td>
+                      </tr>
+
+                    </table>
+                  </div>
+                </div>
+
+                <table style="width:100%; margin-top: 20px; font-size: 12px;">
+                  <tr style="height: 25px;">
+                    <td><strong>Solicitado por:</strong> <span t-esc="o.solicitado_por or ''"/></td>
+
+                  </tr>
+                  <tr style="height: 25px;">
+
+                  </tr>
+                  <tr style="height: 25px;">
+                    <td><strong>Elaborado por:</strong> <span t-field="o.user_id.name"/></td>
+                  </tr>
+                </table>
+              </div>
+            </div>
+          </t>
+        </t>
+      </t>
+    </template>
+  </data>
+</openerp>

+ 19 - 0
orden_cobro_sequence.xml

@@ -0,0 +1,19 @@
+<openerp>
+    <data noupdate="1">
+
+        <!-- Sequences for repair.workorder -->
+        <record id="seq_type_ordencobro" model="ir.sequence.type">
+            <field name="name">Orden de cobro</field>
+            <field name="code">orden.cobro</field>
+        </record>
+
+        <record id="seq_orden_cobro" model="ir.sequence">
+            <field name="name">Orden de cobro</field>
+            <field name="code">orden.cobro</field>
+            <field name="prefix">0</field>
+            <field name="padding">7</field>
+            <field name="company_id" eval="False"/>
+        </record>
+
+    </data>
+</openerp>

+ 123 - 0
orden_cobro_view.xml

@@ -0,0 +1,123 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+
+      <!-- <act_window
+            id="action_open_account_invoice_cobroorden"
+            name="Servicios"
+            res_model="account.invoice"
+            view_type="form"
+            view_mode="tree,form"
+            domain="[('ordencobro_invoice_id', '=', active_id)]"/> -->
+
+            <!-- Vista Formulario Orden de cobro -->
+          <record id="view_orden_cobro_form" model="ir.ui.view">
+              <field name="name">orden.cobro.form</field>
+              <field name="model">orden.cobro</field>
+              <field name="arch" type="xml">
+                  <form string="Orden de cobro">
+                      <sheet>
+                        <group>
+                          <group>
+                              <field name="name" readonly="1"/>
+                              <field name="partner_id" required="1"/>
+                              <field name="celular_partner" readonly="1"/>
+                              <field name="obra"/>
+                              <field name="concepto"/>
+                              <field name="is_efec"/>
+                              <field name="is_cheq"/>
+                              <field name="cheque_banco"/>
+                              <field name="transf_nro"/>
+                              <field name="user_id" readonly="1"/>
+                          </group>
+                          <group>
+                              <field name="date" required="1"/>
+                              <field name="ruc_partner" readonly="1"/>
+                              <field name="telefono_partner" readonly="1"/>
+                              <field name="presupuesto_nro"/>
+                              <field name="currency_id" readonly="1"/>
+                              <field name="responsable"/>
+                              <field name="cheque_nro"/>
+                              <field name="is_transf"/>
+                              <field name="transf_banco"/>
+                              <field name="solicitado_por"/>
+                          </group>
+                         </group>
+                          <notebook>
+                              <page>
+                                <span style="font-weight:bold;">Facturas relacionadas al Orden de cobro</span>
+
+                                <field name="invoice_ids" widget="many2many" options="{'no_create': False}">
+                                   <tree editable="top">
+                                       <field name="name" string="Número de factura" />
+                                      <field name="date_invoice" string="Fecha de factura" />
+                                        <field name="residual" string="Saldo" sum="Saldo" />
+                                        <field name="amount_total" string="Total factura" sum="Total" />
+                                        <field name="state" string="Estado" />
+                                    </tree>
+                                </field>
+                              </page>
+                          </notebook>
+
+                          <group>
+                              <field name="total" readonly="1"/>
+                          </group>
+
+                      </sheet>
+                  </form>
+              </field>
+          </record>
+
+          <!-- Vista Árbol Orden de cobro -->
+          <record id="view_orden_cobro_tree" model="ir.ui.view">
+              <field name="name">orden.cobro.tree</field>
+              <field name="model">orden.cobro</field>
+              <field name="arch" type="xml">
+                  <tree>
+                      <field name="name"/>
+                      <field name="partner_id"/>
+                      <field name="date"/>
+                      <field name="total"/>
+                  </tree>
+              </field>
+          </record>
+
+          <!-- Acción de Ventana Orden de cobro -->
+          <record id="action_orden_cobro" model="ir.actions.act_window">
+              <field name="name">Órdenes de cobro</field>
+              <field name="res_model">orden.cobro</field>
+              <field name="view_type">form</field>
+              <field name="view_mode">tree,form</field>
+          </record>
+
+          <!-- search view -->
+
+          <record id="search_orden_cobro_search" model="ir.ui.view">
+              <field name="name">orden.cobro.search</field>
+              <field name="model">orden.cobro</field>
+              <field name="arch" type="xml">
+                  <search string="Orden de cobro">
+                      <field name="name"/>
+                      <field name="partner_id"/>
+                      <field name="ruc_partner"/>
+                      <separator/>
+                    <filter string="Creado Hoy" domain="[('date', '&gt;=', datetime.datetime.now().strftime('%Y-%m-%d 00:00:00')),('date', '&lt;=',datetime.datetime.now().strftime('%Y-%m-%d 23:23:59'))]"/>
+                    <filter string="Creado mes actual" domain="[('date','&lt;',(context_today()+relativedelta(months=1)).strftime('%%Y-%%m-01')), ('date','&gt;=',time.strftime('%%Y-%%m-01'))]"/>
+                    <filter string="Creado semana anterior" domain="[('date', '&gt;=', ((context_today()+relativedelta(weeks=-2, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '&lt;=', ((context_today()+relativedelta(weeks=-1, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
+                    <filter string="Creado esta semana" domain="[('date', '&gt;=', ((context_today()+relativedelta(weeks=-1, days=1, weekday=0)).strftime('%%Y-%%m-%%d'))),('date', '&lt;=', ((context_today()+relativedelta(weeks=0, weekday=6)).strftime('%%Y-%%m-%%d')))]"/>
+
+                      <group expand="0" string="Agrupar por...">
+                          <filter string="Por dia" context="{'group_by':'date:day'}"/>
+                          <filter string="Por mes" context="{'group_by':'date:month'}"/>
+                          <filter string="Usuario" domain="[]" context="{'group_by':'user_id'}" />
+                          <filter string="Cliente" domain="[]" context="{'group_by':'partner_id'}" />
+                      </group>
+                  </search>
+              </field>
+          </record>
+
+        <!-- Menú -->
+        <menuitem id="menu_orden_cobro_main" name="Órdenes de cobro"  parent="account.menu_finance_receivables" action="action_orden_cobro" sequence="60"/>
+
+    </data>
+</openerp>

+ 25 - 0
recibo_orden_cobro.py

@@ -0,0 +1,25 @@
+from openerp import api, models
+from num2words import num2words
+
+class report_reciboordenpago(models.AbstractModel):
+    _name = 'report.orden_cobro.orden_cobro'
+
+    @api.multi
+    def render_html(self, data=None):
+        report_obj = self.env['report']
+        report = report_obj._get_report_from_name('orden_cobro.orden_cobro')
+        docargs = {
+            'doc_ids': self._ids,
+            'doc_model': report.model,
+            'docs': self.env[report.model].browse(self._ids),
+            'convertir':self.convertir,
+        }
+        return report_obj.render('orden_cobro.orden_cobro', docargs)
+
+    def convertir(self,nro,moneda):
+        letra = num2words(nro,lang="es")
+        letra = letra.capitalize()
+        if not moneda:
+            moneda=''
+        letra = letra +' '+moneda
+        return letra

TEMPAT SAMPAH
recibo_orden_cobro.pyc


+ 31 - 0
res_currency.py

@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    product_features for OpenERP                                                  #
+#    Copyright (C) 2009 NetAndCo (<http://www.netandco.net>).                   #
+#    Authors, Mathieu Lemercier, mathieu@netandco.net,                          #
+#             Franck Bret, franck@netandco.net                                  #
+#    Copyright (C) 2011 Akretion Benoît Guillot <benoit.guillot@akretion.com>   #
+#                                                                               #
+#    This program is free software: you can redistribute it and/or modify       #
+#    it under the terms of the GNU Affero General Public License as             #
+#    published by the Free Software Foundation, either version 3 of the         #
+#    License, or (at your option) any later version.                            #
+#                                                                               #
+#    This program is distributed in the hope that it will be useful,            #
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of             #
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              #
+#    GNU Affero General Public License for more details.                        #
+#                                                                               #
+#    You should have received a copy of the GNU Affero General Public License   #
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.      #
+#                                                                               #
+#################################################################################
+
+from openerp import models, fields
+
+class res_currency(models.Model):
+    _inherit = 'res.currency'
+    _name = 'res.currency'
+
+    en_letras1 = fields.Char('En letras')

TEMPAT SAMPAH
res_currency.pyc


+ 16 - 0
res_currency_view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<openerp>
+    <data>
+        <record id="res_currency_en_letras" model="ir.ui.view">
+            <field name="name">res.currency.en.letras</field>
+            <field name="model">res.currency</field>
+            <field name="inherit_id" ref="base.view_currency_form" />
+            <field name="arch" type="xml">
+                <field name="symbol" position="after">
+                    <field name="en_letras1"/>
+                </field>
+            </field>
+        </record>
+    </data>
+</openerp>

TEMPAT SAMPAH
static/description/icon.png