Browse Source

Modulo solicitud_credito_athletic

sebas 8 years ago
commit
3fa6266a43
10 changed files with 389 additions and 0 deletions
  1. 27 0
      __init__.py
  2. BIN
      __init__.pyc
  3. 46 0
      __openerp__.py
  4. 16 0
      credito_cliente.py
  5. BIN
      credito_cliente.pyc
  6. 227 0
      credito_cliente.xml
  7. 57 0
      res_partner.py
  8. BIN
      res_partner.pyc
  9. 16 0
      res_partner_view.xml
  10. BIN
      static/description/icon.png

+ 27 - 0
__init__.py

@@ -0,0 +1,27 @@
+# -*- encoding: utf-8 -*-
+#################################################################################
+#                                                                               #
+#    product_brand 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/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product Brand is an Openobject module wich enable Brand management for products #
+###################################################################################
+from . import res_partner, credito_cliente

BIN
__init__.pyc


+ 46 - 0
__openerp__.py

@@ -0,0 +1,46 @@
+# -*- 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/>.      #
+#                                                                               #
+#################################################################################
+###################################################################################
+# Product features is an Openobject module wich enable features management for products #
+###################################################################################
+{
+    'name': 'Solicitud de credito Athletic',
+    'version': '0.1',
+    'category': 'Product',
+    'description': """
+Informe
+=======
+
+Informes
+
+    """,
+    'author': 'Sebastian Penayo/Eiru',
+    'website': 'http://www.eiru.com.py',
+    'depends': ['base','partner_extra_data'],
+    'data': [
+        'credito_cliente.xml',
+        'res_partner_view.xml',
+    ],
+    'installable': True,
+}

+ 16 - 0
credito_cliente.py

@@ -0,0 +1,16 @@
+from openerp import api, models
+import datetime
+
+class report_credito_cliente(models.AbstractModel):
+    _name = 'report.solicitud_credito_athletic.report_credito_cliente'
+
+    @api.multi
+    def render_html(self, data=None):
+        report_obj = self.env['report']
+        report = report_obj._get_report_from_name('solicitud_credito_athletic.report_credito_cliente')
+        docargs = {
+            'doc_ids': self._ids,
+            'doc_model': report.model,
+            'docs': self.env[report.model].browse(self._ids),
+        }
+        return report_obj.render('solicitud_credito_athletic.report_credito_cliente', docargs)

BIN
credito_cliente.pyc


File diff suppressed because it is too large
+ 227 - 0
credito_cliente.xml


+ 57 - 0
res_partner.py

@@ -0,0 +1,57 @@
+# -*- coding: 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
+
+class res_partner(models.Model):
+    _name = 'res.partner'
+    _inherit = 'res.partner'
+
+    #informacion personal basica
+    fecha_credito = fields.Date('Fecha del crédito')
+
+    _defaults = {
+        'user_id': lambda obj, cr, uid, context: uid,
+    }
+
+    # @api.model
+    # def create(self, vals):
+    #     partner_id = super(res_partner,self).create(vals)
+    #     self.act_fecha_credito(partner_id)
+    #     return partner_id
+
+    # @api.multi
+    # def write(self, vals):
+    #     partner_id = super(res_partner,self).write(vals)
+    #     self.act_fecha_credito(partner_id)
+    #     return partner_id
+
+    # @api.model
+    # def act_fecha_credito(self,partner_id):
+    #     # print self.fecha_credito
+    #     if not self.fecha_credito:
+    #         # print 'no tiene fecha'
+    #         self.fecha_credito = fields.Date.context_today(self)
+    #
+    #     return True
+
+# res_partner()
+

BIN
res_partner.pyc


+ 16 - 0
res_partner_view.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0"?>
+<openerp>
+    <data>
+        <record id="res_partner_credito_view" model="ir.ui.view">
+            <field name="name">res.partner.credito.view</field>
+            <field name="model">res.partner</field>
+            <field name="inherit_id" ref="base.view_partner_form"/>
+            <field name="arch" type="xml">
+                <field name="function" position="replace">
+                    <field name="fecha_credito"/>
+                </field>
+
+            </field>
+        </record>
+    </data>
+</openerp>

BIN
static/description/icon.png


Some files were not shown because too many files changed in this diff