Browse Source

commit inicial

Rodney Enciso Arias 7 years ago
commit
1b46390855

+ 3 - 0
__init__.py

@@ -0,0 +1,3 @@
+# -*- coding: utf-8 -*-
+import controllers
+import models

BIN
__init__.pyc


+ 15 - 0
__openerp__.py

@@ -0,0 +1,15 @@
+# -*- coding: utf-8 -*-
+{
+    'name': "EIRU SET",
+    'author': "Robert Gauto/Adrielso Kunert/Rodney Enciso Arias/Sebastian Penayo",
+    'category': 'Uncategorized',
+    'version': '0.1',
+    'depends': ['base','eiru_assets'],
+    'data': [
+    'templates.xml',
+    ],
+    'qweb': [
+        'static/src/xml/*.xml',
+        'static/src/reports/*.xml'
+    ]
+}

+ 20 - 0
controllers.py

@@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+from openerp import http
+
+# class EiruReporting(http.Controller):
+#     @http.route('/eiru_reporting/eiru_reporting/', auth='public')
+#     def index(self, **kw):
+#         return "Hello, world"
+
+#     @http.route('/eiru_reporting/eiru_reporting/objects/', auth='public')
+#     def list(self, **kw):
+#         return http.request.render('eiru_reporting.listing', {
+#             'root': '/eiru_reporting/eiru_reporting',
+#             'objects': http.request.env['eiru_reporting.eiru_reporting'].search([]),
+#         })
+
+#     @http.route('/eiru_reporting/eiru_reporting/objects/<model("eiru_reporting.eiru_reporting"):obj>/', auth='public')
+#     def object(self, obj, **kw):
+#         return http.request.render('eiru_reporting.object', {
+#             'object': obj
+#         })

BIN
controllers.pyc


+ 8 - 0
models.py

@@ -0,0 +1,8 @@
+# -*- coding: utf-8 -*-
+
+from openerp import models, fields, api
+
+# class eiru_reporting(models.Model):
+#     _name = 'eiru_reporting.eiru_reporting'
+
+#     name = fields.Char()

BIN
models.pyc


BIN
static/description/icon.png


+ 78 - 0
static/src/css/eiru_reporting.css

@@ -0,0 +1,78 @@
+.reporting_view_header {
+    display: flex;
+    width: 100%;
+    height: 80px;
+    padding: 5px;
+}
+
+.reporting_view_header > h2 {
+    font-weight: bold;
+    font-size: 14pt !important;
+    padding: 10px;
+}
+
+.reporting_view_header > .reporting_searcher {
+    display: flex;
+    flex-direction: row-reverse;
+    padding: 5px;
+    height: 35px;
+    width: 100%;
+}
+
+.reporting_page_header {
+    padding-bottom: 9px;
+    margin: 25px 0 35px;
+    border-bottom: 1px solid #eee;
+}
+
+.reporting_page_header > h1 > small {
+    padding-left: 1.833em;
+    font-size: 8pt;
+}
+
+.report_group {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: wrap;
+    justify-content: center;
+    width: 100%;
+    height: 100%;
+}
+
+.report_item {
+    padding: 1em 1em;
+    margin: 1em 1em;
+    width: 220px;
+    height: 250px;
+    border: 1px solid #d3d3d3;
+    border-radius: 3px;
+    box-shadow: 5px 5px 2px #d3d3d3;
+    display: flex;
+    flex-direction: column;
+}
+
+.report_item:hover {
+    box-shadow: 3px 3px 2px #d3d3d3;
+    transform: translateY(2px);
+}
+
+.report_title > h1 {
+    text-align: center;
+    font-size: 9pt;
+}
+
+.report_content {
+    flex-grow: 1;
+    margin: 0.8em 0;
+    overflow-y: auto;
+}
+
+.report_content > p {
+}
+
+.report_action > button {
+    width: 100%;
+}
+.sucursal{
+    font-weight: bold;
+}

+ 50 - 0
static/src/js/configuration_reporting.js

@@ -0,0 +1,50 @@
+function configuration_reporting (instance, widget) {
+    "use strict";
+    var widgets = widget;
+
+
+
+    widget.ReportingWidget = instance.Widget.extend({
+        template: 'EiruReporting',
+        events: {
+            'click .report_action > button': 'clickOnReport',
+        },
+        reports: [
+            {
+                title: 'Ventas',
+                description: 'Analisis Tributario de ventas',
+                action: 'ReportSales'
+            },
+            {
+                title: 'Compras',
+                description: 'Analisis Tributario de compras',
+                action: 'ReportPurchases'
+            }
+        ],
+        start: function () {
+        },
+
+        clickOnReport: function (e) {
+            var templateName = this.$el.find(e.target).val();
+            this.renderReport(templateName);
+        },
+
+        renderReport: function (templateName) {
+            var Widget = this.getWidgetFromTemplate(templateName);
+            var WidgetInstance = new Widget(this);
+            var container = this.$el.find('.oe_form_sheet.oe_form_sheet_width');
+            container.find('.report_view').hide({
+                effect: 'fade',
+                duration: 200,
+                complete: function () {
+                    WidgetInstance.appendTo(container);
+                }
+            });
+        },
+
+        getWidgetFromTemplate: function (templateName) {
+            var widgetName = `${templateName}Widget`;
+            return _.pick(widget, widgetName)[widgetName];
+        },
+    });
+}

+ 16 - 0
static/src/js/main.js

@@ -0,0 +1,16 @@
+openerp.eiru_set = function (instance) {
+    "use strict";
+
+    var set = instance.eiru_set;
+
+    //reportingBase
+    reporting_base(instance,set);
+    configuration_reporting(instance,set);
+
+    // Lista de Reportes
+    report_purchases(set);
+    report_sales(set);
+
+
+    instance.web.client_actions.add('eiru_set.action_report', 'instance.eiru_set.ReportingWidget');
+}

+ 22 - 0
static/src/js/reporting_base.js

@@ -0,0 +1,22 @@
+function reporting_base (instance, widget) {
+    "use strict";
+
+    widget.Base = instance.Widget.extend({
+
+        position: 0,
+
+        init: function (parent, position) {
+            this._super(parent);
+            this.position = position || this.position;
+        },
+        start: function () {
+            // console.log('Reporting Locoo');
+        },
+        getPosition: function () {
+            return this.position;
+        },
+        setPosition: function (position) {
+            this.position = position;
+        }
+    });
+}

+ 522 - 0
static/src/js/reports/report_purchases.js

@@ -0,0 +1,522 @@
+function report_purchases (reporting){
+    "use strict";
+    
+    var instance = openerp;
+
+    reporting.ReportPurchasesWidget = reporting.Base.extend({
+        template: 'ReportPurchases',
+        invoice: [],
+        Currency:[],
+        resCurrency :[],
+        resCompany:[],
+        accountJournal:[],
+        supplier:[],
+        newInvoice:[],
+        newCabecera:[],
+        rowsData :[],
+        events:{
+            'change #current-period' : 'factSearch',
+            'click  #txt' : 'generarTxt',
+        },
+        // Init
+        init : function(parent){
+            this._super(parent);
+        },
+        // start
+        start: function () {
+            var self = this;
+            var table = this.$el.find('#table');
+            table.bootstrapTable({data : self.rowsData});
+            // this.fecthFecha();
+            this.submitForm();
+        },
+        // Consultar
+        submitForm: function () {
+            var self = this;
+            self.fetchPeriod().then(function(period) {
+                return period;
+            }).then(function (period) {
+                self.period = period;
+                self.$el.find('#current-period').append('<option value="9999999">Todos los periodos</option>');
+                _.each(period, function (item) {
+                    self.$el.find('#current-period').append('<option value="' + item.id + '">' + item.name + '</option>');
+                });
+                return self.fetchJournal();
+            }).then(function (journal) {
+                self.accountJournal =journal;
+                return self.fetchInvoiceP2();
+            }).then(function (invoice){
+                self.invoice = invoice;
+                return self.fetchSupplier(invoice);
+            }).then(function (supplier){
+                self.supplier=supplier;
+                return self.fetchPaymentTerm();
+            }).then(function (paymentTerm){
+                self.paymentTerm=paymentTerm;
+                return self.fetchAttachment();
+            }).then(function(attachment){
+                self.attachment=attachment;
+                return self.fecthComanyCurrency();
+            }).then(function(resCompany){
+                self.resCompany = resCompany;
+                self.inicializarBuscadorsup();
+                return self.fect_generar(self.invoice);
+            }).then(function(currency){
+                self.currency = currency;
+                return self.fect_cabecera(self.resCompany, self.invoice);
+            });
+        },
+
+        // Buscar Diario
+        fetchJournal: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var Journal = new instance.web.Model('account.journal');
+            Journal.query(['id', 'name']).filter([['type', '=', ['purchase','purchase_refund']]]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // Periodo
+        fetchPeriod: function () {
+            var defer = $.Deferred();
+            var period = new instance.web.Model('account.period');
+            var fields = ['id', 'name'];
+            var domain = [['special', '!=', true]];
+            period.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // Invoice (FACTURAS)
+        fetchInvoiceP2: function () {
+            var journal_ids = _.flatten(_.map(this.accountJournal, function (item) {
+                return item.id;
+            }));
+            var filter =[['state', 'in',['open','paid']],['type', '=', ['in_invoice','in_refund']],['journal_id', 'in',journal_ids]];
+            var field =['id', 'type', 'number', 'origin', 'state', 'journal_id', 'currency_id', 'supplier_invoice_number','date_invoice','partner_id','amount_total','user_id','contado','credito','payment_term','period_id','amount_untaxed','amount_tax','attachment_ids'];
+            var defer = $.Deferred();
+            var Invoice = new instance.web.Model('account.invoice');
+            Invoice.query(field).filter(filter).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // company_curency
+        fecthComanyCurrency: function(){
+            var self = this;
+            var defer = $.Deferred();
+            var currency = new instance.web.Model('res.company');
+            var field=['id', 'currency_id','exportador','agent_ruc','legal_agent','company_ruc','name'];
+            var domain=[['id','=',1]];
+            currency.query(field).filter(domain).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // Partner (Proveeedor)
+        fetchSupplier: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var supplier = new instance.web.Model('res.partner');
+            supplier.query(['id', 'name', 'ruc', 'active', 'supplier']).filter([['active', '=', true], ['supplier', '=', true]]).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // archivos Adjuntos
+        fetchAttachment: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var id = _.flatten(_.map(self.invoice,function(map){
+                return id;
+            }));
+            var attachment = new instance.web.Model('ir.attachment');
+            attachment.query(['id','res_id', 'datas', 'res_model']).filter([['res_model', '=','account.invoice']]).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // Plazos de pagos
+        fetchPaymentTerm: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var payment_term = _.flatten(_.map(self.invoice,function(map){
+                return map.payment_term[0];
+            }));
+            var paymentTerm = new instance.web.Model('account.payment.term');
+            paymentTerm.query(['id','name','line_ids']).filter([['id', '=', payment_term]]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // Verificar si los Valores no son nulos
+        valorNull:function(dato){
+            var valor ="";
+            if (dato){
+                valor=dato;
+            }
+            return valor;
+        },
+
+        // Buscador
+        inicializarBuscadorsup: function () {
+            var self = this;
+            var results = self.supplier;
+            results = _.map(results, function (item) {
+                return {
+                    label: item.id + '-'+ item.name + ' ' + self.valorNull(item.ruc),
+                    value: item.id + '-'+ item.name + ' ' + self.valorNull(item.ruc)
+                }
+            });
+            self.$('#customer').autocomplete({
+                source: results,
+                minLength:0,
+                search: function(event, ui) {
+                    if (!(self.$('#customer').val())){
+                        self.factSearch();
+                    }
+                },
+                close: function( event, ui ) {
+                    self.factSearch();
+                },
+                select: function(event, ui) {
+                    self.factSearch();
+                }
+            });
+        },
+
+        getSupplier : function(partner_id){
+            var self = this;
+            return _.filter(self.supplier,function(item){
+                return item.id === partner_id;
+            }).shift();
+        },
+
+        getPaymentTerm : function(id){
+            var self = this;
+            return _.filter(self.paymentTerm,function(item){
+                return item.id === id;
+            }).shift();
+        },
+
+        getAttachment : function(attachment_ids){
+            var self = this;
+            return _.map(_.filter(self.attachment,function(item){
+                return item.id === attachment_ids;
+            }),function(map){
+                return map.datas;
+            });
+        },
+
+        // Cuerpo del registro
+        fect_generar: function(invoices){
+            var self = this;
+            var data = [];
+            var supplier_ruc;
+            var ruc;
+            var cuota;
+            var tipo;
+            var tasa_10 = 0;
+            var tasa_5 = 0;
+            var iva_5 = 0;
+            var iva_10 = 0;
+            var IVA = 0;
+            var TAX = 0;
+            var adjunto;
+            var untaxed;
+            var condicion;
+
+            _.each(invoices, function(invoice){
+                // Obtener el ruc y el DV del proveedor
+                supplier_ruc = self.getSupplier(invoice.partner_id[0]);
+                ruc = supplier_ruc.ruc.split("-");
+
+                // Determinar si la factura es a credito o al contado.
+                condicion = 1;
+                if (invoice.credito == true){
+                    condicion = 2;
+                }
+
+                // Determinar la cantidad de cuotas.
+                cuota = _.flatten(self.getPaymentTerm(invoice.payment_term[0])).length - 2;
+
+                // Validar. Si la factura es al contado, la cuota debe ser cero.
+                if (condicion == 1 || cuota < 1){
+                    cuota = 0;
+                }
+                
+                // Determinar el tipo de factura.
+                if(invoice.type == 'in_invoice'){
+                    tipo = 1;
+                }else{
+                    tipo = 2;
+                }
+
+                // Manejo de impuestos
+                IVA = accounting.formatNumber(((invoice.amount_untaxed * 10)/100),"","");
+                TAX = accounting.formatNumber(invoice.amount_tax,"","");
+
+                untaxed = 0;
+                iva_5 = 0;
+                iva_10 = 0;
+                tasa_10 = 0;
+                tasa_5 = 0;
+
+                // Determinar si fue aplicado algun impuesto a la factura.
+                if(invoice.amount_total == invoice.amount_untaxed){
+                    untaxed = accounting.formatNumber(invoice.amount_untaxed,"","");        
+                }else{
+                    // Si fue aplicado impuesto, determina si fue de 10% o 5%.
+                    if(IVA == TAX){
+                        iva_10 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_10 = accounting.formatNumber(invoice.amount_untaxed,"","");   
+                    }else{
+                        iva_5 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_5 = accounting.formatNumber(invoice.amount_untaxed,"","");
+                    }
+                }
+
+                // Obtener binario del archivo adjunto
+                adjunto = self.getAttachment(invoice.attachment_ids[0]);
+                
+                data.push({
+                    tipo_registro: 2,
+                    ruc_proveedor: ruc[0], 
+                    dv: ruc[1],
+                    partner : invoice.partner_id[1],
+                    supplier_invoice_number: self.valorNull(invoice.supplier_invoice_number), 
+                    tipo_documento : tipo,
+                    number: invoice.number,
+                    date: moment(invoice.date_invoice).format("DD/MM/YYYY"),
+                    tasa_10 : tasa_10,
+                    iva_10 : iva_10,
+                    tasa_5 : tasa_5,
+                    iva_5 : iva_5,
+                    amount_untaxed: untaxed,
+                    tipo_operacion : 8,
+                    condicion_compra : condicion,
+                    cantidad_cuotas : cuota,
+                    period_id : invoice.period_id[0],
+                    period_name : invoice.period_id[1],
+                    // attachment_ids : adjunto,
+                });
+            });
+            self.newInvoice = data;
+            this.loadTable(data);  
+        },
+
+        // Informacion para el txt.
+        fect_cabecera: function(resCompanys, invoices){
+            var self = this;
+
+            // Cabecera
+
+            var datos = [];
+            var periodo =(this.$el.find('#from').val());
+            var company_ruc;
+            var agent_ruc;
+            var version = 2;
+            _.each(resCompanys, function(resCompany){
+                company_ruc = resCompany.company_ruc.split("-");
+                agent_ruc = resCompany.agent_ruc.split("-");
+                // Tipo de registro
+                datos.push(1);
+                datos.push('\t');
+                // Periodo
+                datos.push(moment(periodo).format("YYYYMM"));
+                datos.push('\t');
+                // Tipo de reporte
+                datos.push(1);
+                datos.push('\t');
+                // Codigo Obligacion
+                datos.push(911);
+                datos.push('\t');
+                // Codigo Formulario
+                datos.push(211);
+                datos.push('\t');
+                // Ruc agente de informacion
+                datos.push(company_ruc[0]);
+                datos.push('\t');
+                // DV agente de informacion
+                datos.push(company_ruc[1]);
+                datos.push('\t');
+                // Nombre o denominacion del agente de informacion
+                datos.push(resCompany.name);
+                datos.push('\t');
+                // Ruc representante legal
+                datos.push(agent_ruc[0]);
+                datos.push('\t');
+                // DV representante legal
+                datos.push(agent_ruc[1]);
+                datos.push('\t');
+                // Nombre y apellido de representante legal
+                datos.push(resCompany.legal_agent);
+                datos.push('\t');
+                // Cantidad de registros
+                datos.push(50);
+                datos.push('\t');
+                // Monto total
+                datos.push(2654122);
+                datos.push('\t');
+                // Exportador
+                datos.push(resCompany.exportador);
+                datos.push('\t');
+                // Version
+                datos.push(version);
+                datos.push('\r\n');                
+            });
+
+            // detalles
+            var supplier_ruc;
+            var ruc;
+            var cuota;
+            var cuotaII;
+            var tipo;
+            var cantidad = 0;
+            var tasa_10 = 0;
+            var tasa_5 = 0;
+            var iva_5 = 0;
+            var iva_10 = 0;
+            var IVA = 0;
+            var tax = 0;
+            var total = 0;
+            var valor = 0;
+            _.each(invoices, function(invoice){
+                supplier_ruc = self.getSupplier(invoice.partner_id[0]);
+                ruc = supplier_ruc.ruc.split("-");
+                var condicion = 1;
+                if (invoice.credito == true){
+                    condicion = 2;
+                }
+                cuota = _.flatten(self.getPaymentTerm(invoice.payment_term[0]));
+                cuotaII = (cuota.length - 2);
+                if (condicion == 1 || cuotaII < 1){
+                    cuotaII = 0;
+                }
+                if(invoice.type == 'in_invoice'){
+                    tipo = 1;
+                }else{
+                    tipo = 2;
+                }
+                IVA = accounting.formatNumber(((invoice.amount_untaxed * 10)/100),"","");
+                tax = accounting.formatNumber(invoice.amount_tax,"","");
+                if(IVA == tax){
+                    iva_10 = IVA;
+                }else{
+                    iva_5 = IVA;
+                }
+
+                // tipo de registro
+                datos.push(2);
+                datos.push('\t');
+                // ruc del proveedor
+                datos.push(ruc[0]);
+                datos.push('\t'); 
+                // dv del proveedor
+                datos.push(ruc[1]);
+                datos.push('\t');
+                // Nombre o denominacion del proveedor
+                datos.push(invoice.partner_id[1]);
+                datos.push('\t');
+                // Numero de timbrado
+                datos.push(self.valorNull(invoice.supplier_invoice_number));
+                datos.push('\t'); 
+                // Tipo de documento
+                datos.push(tipo);
+                datos.push('\t');
+                // Numero de documento
+                datos.push(invoice.number);
+                datos.push('\t');
+                // Fecha de documento
+                datos.push(moment(invoice.date_invoice).format("DD/MM/YYYY"));
+                datos.push('\t');
+                // Monto de la compra a la tasa 10%
+                datos.push(tasa_10);
+                datos.push('\t');
+                // IVA credito 10%
+                datos.push(iva_10);
+                datos.push('\t');
+                // Monto de la compra a la tasa 5%
+                datos.push(tasa_5);
+                datos.push('\t');
+                // IVA credito 5%
+                datos.push(iva_5);
+                datos.push('\t');
+                // Monto de la compra no gravada o exenta
+                datos.push(accounting.formatNumber(invoice.amount_untaxed,"",""));
+                datos.push('\t');
+                // Tipo de operacion
+                datos.push(8);
+                datos.push('\t');
+                // Condicion de compra
+                datos.push(condicion);
+                datos.push('\t');
+                // Cantidad de cuotas
+                datos.push(cuotaII);
+                datos.push('\r\n');
+
+                cantidad += 1;
+                valor = invoice.amount_untaxed + tasa_5 + tasa_10;
+                total += valor;
+            });
+            datos.splice(22,0);
+            datos[22] = cantidad;
+            datos.splice(24,0);
+            datos[24] = accounting.formatNumber(total,"","");
+            self.newCabecera = new Blob(datos, {type: 'text/plain'});
+        },
+
+        // Buscar
+        factSearch: function(){
+            var self = this;
+            var period =this.$el.find('#current-period').val();
+            var newInvoice = self.newInvoice;
+            // Buscar por Periodo
+            if (period != 9999999){
+                newInvoice=_.filter(newInvoice, function (inv){
+                    return inv.period_id == period;
+                });
+            }
+            self.loadTable(newInvoice)
+        },
+
+        // cargara la tabla
+        loadTable:function(rowsTable){
+            var self = this;
+            self.rowsData = rowsTable;
+            var table = this.$el.find('#table');
+            table.bootstrapTable('load',rowsTable);
+        },
+
+        descargarArchivo: function(contenidoEnBlob, nombreArchivo) {
+            var self = this;
+            var reader = new FileReader();
+            reader.onload = function (event) {
+                var save = document.createElement('a');
+                save.href = event.target.result;
+                save.target = '_blank';
+                save.download = nombreArchivo || 'archivo.dat';
+                var clicEvent = new MouseEvent('click', {
+                    'view': window,
+                    'bubbles': true,
+                    'cancelable': true
+                });
+                save.dispatchEvent(clicEvent);
+                (window.URL || window.webkitURL).revokeObjectURL(save.href);
+            };
+            reader.readAsDataURL(contenidoEnBlob);
+        },
+
+        generarTxt: function () {
+            var self = this;
+            var periodo = self.newInvoice[0].period_name.split("/");
+            var fileName = "Compras " + periodo[1] + periodo[0];
+            self.descargarArchivo(self.newCabecera, fileName);
+        },
+    });
+}

+ 533 - 0
static/src/js/reports/report_sales.js

@@ -0,0 +1,533 @@
+function report_sales (reporting){
+    "use strict";
+    
+    var instance = openerp;
+
+    reporting.ReportSalesWidget = reporting.Base.extend({
+        template: 'ReportSales',
+        invoice: [],
+        Currency:[],
+        resCurrency :[],
+        resCompany:[],
+        accountJournal:[],
+        customer:[], 
+        newInvoice:[],
+        rowsData :[],
+        // event
+        events:{
+            'change #current-period' : 'factSearch',
+            'click  #txt' : 'generarTxt',
+        },
+        // Initil
+        init : function(parent){
+            this._super(parent);
+        },
+        // start
+        start: function () {
+            var self = this;
+            var table = this.$el.find('#table');
+            table.bootstrapTable({data : self.rowsData});
+            this.submitForm();
+        },
+        // Consultar
+        submitForm: function () {
+            var self = this;
+            self.fetchPeriod().then(function(period) {
+                return period;
+            }).then(function (period) {
+                self.period = period;
+                self.$el.find('#current-period').append('<option value="9999999">Todos los periodos</option>');
+                _.each(period, function (item) {
+                    self.$el.find('#current-period').append('<option value="' + item.id + '">' + item.name + '</option>');
+                });
+                return self.fetchJournal();
+            }).then(function (journal) {
+                self.accountJournal =journal;
+                return self.fetchInvoiceP2();
+            }).then(function (invoice){
+                self.invoice = invoice;
+                return self.fetchCustomer(invoice);
+            }).then(function (customer){
+                self.customer=customer;
+                return self.fetchPaymentTerm();
+            }).then(function (paymentTerm){
+                self.paymentTerm=paymentTerm;
+                return self.fetchAttachment();
+            }).then(function(attachment){
+                self.attachment=attachment;
+                return self.fecthComanyCurrency();
+            }).then(function(resCompany){
+                self.resCompany = resCompany;
+                self.inicializarBuscadorsup();
+                return self.fect_generar(self.invoice);
+            }).then(function(currency){
+                self.currency = currency;
+                return self.fect_cabecera(self.resCompany, self.invoice);
+            });
+        },
+        // Buscar Diario
+        fetchJournal: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var Journal = new instance.web.Model('account.journal');
+            Journal.query(['id', 'name']).filter([['type', '=', 'sale']]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // Periodo
+        fetchPeriod: function () {
+            var defer = $.Deferred();
+            var period = new instance.web.Model('account.period');
+            var fields = ['id', 'name'];
+            var domain = [['special', '!=', true]];
+            period.query(fields).filter(domain).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // Invoice (FACTURAS)
+        fetchInvoiceP2: function () {
+            var journal_ids = _.flatten(_.map(this.accountJournal, function (item) {
+                return item.id;
+            }));
+            var filter =[['state', 'in',['open','paid']],['type', '=', 'out_invoice'],['journal_id', 'in',journal_ids]];
+            var field =['id', 'type', 'number', 'origin', 'state', 'journal_id', 'currency_id', 'supplier_invoice_number','date_invoice','partner_id','amount_total','user_id','contado','credito','payment_term','period_id','amount_untaxed','amount_tax','attachment_ids'];
+            var defer = $.Deferred();
+            var Invoice = new instance.web.Model('account.invoice');
+            Invoice.query(field).filter(filter).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // company_curency
+        fecthComanyCurrency: function(){
+            var self = this;
+            var defer = $.Deferred();
+            var currency = new instance.web.Model('res.company');
+            var field=['id', 'currency_id','exportador','agent_ruc','legal_agent','company_ruc','name'];
+            var domain=[['id','=',1]];
+            currency.query(field).filter(domain).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        // Partner (Proveeedor)
+        fetchCustomer: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var customer = new instance.web.Model('res.partner');
+            customer.query(['id', 'name', 'ruc', 'active', 'customer']).filter([['active', '=', true], ['customer', '=', true]]).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+
+        // archivos Adjuntos
+        fetchAttachment: function() {
+            var self = this;
+            var defer = $.Deferred();
+            var id = _.flatten(_.map(self.invoice,function(map){
+                return id;
+            }));
+            var attachment = new instance.web.Model('ir.attachment');
+            attachment.query(['id','res_id', 'datas', 'res_model']).filter([['res_model', '=','account.invoice']]).all().then(function (results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // plazos de pago
+        fetchPaymentTerm: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var payment_term = _.flatten(_.map(self.invoice,function(map){
+                return map.payment_term[0];
+            }));
+            var paymentTerm = new instance.web.Model('account.payment.term');
+            paymentTerm.query(['id','name','line_ids']).filter([['id', '=', payment_term]]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        // Verificar si los Valores no son nulos
+        valorNull:function(dato){
+            var valor ="";
+            if (dato){
+                valor=dato;
+            }
+            return valor;
+        },
+        // Buscador
+        inicializarBuscadorsup: function () {
+            var self = this;
+            var results = self.customer;
+            results = _.map(results, function (item) {
+                return {
+                        label: item.id + '-'+ item.name + ' ' + self.valorNull(item.ruc),
+                        value: item.id + '-'+ item.name + ' ' + self.valorNull(item.ruc)
+                }
+            });
+            self.$('#customer').autocomplete({
+                source: results,
+                minLength:0,
+                search: function(event, ui) {
+                    if (!(self.$('#customer').val())){
+                        self.factSearch();
+                    }
+                },
+                close: function( event, ui ) {
+                        self.factSearch();
+                },
+                select: function(event, ui) {
+                    self.factSearch();
+                }
+            });
+        },
+
+        getCustomer : function(partner_id){
+            var self = this;
+            return _.filter(self.customer,function(item){
+                return item.id === partner_id;
+            }).shift();
+        },
+
+        getPaymentTerm : function(id){
+            var self = this;
+            return _.filter(self.paymentTerm,function(item){
+                return item.id === id;
+            }).shift();
+        },
+
+        getAttachment : function(attachment_ids){
+            var self = this;
+            return _.map(_.filter(self.attachment,function(item){
+                return item.id === attachment_ids;
+            }),function(map){
+                return map.datas;
+            });
+        },
+
+        // unir los objetos
+        fect_generar: function(invoices){
+            var self = this;
+            var attach = self.attachment;
+            var data = [];
+            var customer_ruc;
+            var ruc;
+            var cuota;
+            var cuotaII;
+            var total;
+            var tasa_10;
+            var tasa_5;
+            var iva_10;
+            var iva_5;
+            var condicion;
+            var IVA;
+            var TAX;
+            var untaxed;
+            _.each(invoices, function(invoice){
+                // obtener el ruc y el DV del cliente
+                customer_ruc = self.getCustomer(invoice.partner_id[0]);
+                ruc = customer_ruc.ruc.split("-");
+                
+                // Determinar si la factura es a credito o al contado
+                condicion = 1;
+                if (invoice.credito == true){
+                    condicion = 2;
+                }
+                
+                // Determinar la cantidad de cuotas
+                cuota = _.flatten(self.getPaymentTerm(invoice.payment_term[0])).length - 2;
+                // cuotaII = (cuota.length - 2);
+                if (condicion == 1 || cuota < 1){
+                    cuota = 0;
+                }
+
+                // Manejo de impuestos
+                IVA = accounting.formatNumber(((invoice.amount_untaxed * 10)/100),"","");
+                TAX = accounting.formatNumber(invoice.amount_tax,"","");
+
+                untaxed = 0;
+                iva_5 = 0;
+                iva_10 = 0;
+                tasa_10 = 0;
+                tasa_5 = 0;
+
+                // Determinar si fue aplicado algun impuesto a la factura.
+                if(invoice.amount_total == invoice.amount_untaxed){
+                    untaxed = accounting.formatNumber(invoice.amount_untaxed,"","");        
+                }else{
+                    // Si fue aplicado impuesto, determina si fue de 10% o 5%.
+                    if(IVA == TAX){
+                        iva_10 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_10 = accounting.formatNumber(invoice.amount_untaxed,"","");   
+                    }else{
+                        iva_5 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_5 = accounting.formatNumber(invoice.amount_untaxed,"","");
+                    }
+                }
+
+                total = 0;
+                total = parseInt(tasa_10) + parseInt(iva_10) + parseInt(tasa_5) + parseInt(iva_5) + parseInt(untaxed);
+                
+                data.push({
+                    tipo_registro: 2,
+                    ruc_cliente: ruc[0],
+                    dv: ruc[1],
+                    partner: invoice.partner_id[1],
+                    tipo_documento : 1,
+                    numero_documento : invoice.number,
+                    date: moment(invoice.date_invoice).format("DD/MM/YYYY"),
+                    tasa_10 : tasa_10,
+                    iva_10 : iva_10,
+                    tasa_5 : tasa_5,
+                    iva_5 : iva_5,
+                    amount: untaxed,
+                    total : total,
+                    condicion_venta : condicion,
+                    cantidad_cuotas : cuota,
+                    number: invoice.number,
+                    // informacion del periodo
+                    period_id : invoice.period_id[0],
+                    period_name : invoice.period_id[1],
+                });
+                
+            });
+            self.newInvoice = data;
+            this.loadTable(data);
+        },
+
+
+        // Informacion para el txt.
+        fect_cabecera: function(resCompanys, invoices){
+            var self = this;
+            
+            // Cabecera
+
+            var datos = [];
+            var periodo =(this.$el.find('#from').val());
+            var company_ruc;
+            var agent_ruc;
+            var version = 2;
+            _.each(resCompanys, function(resCompany){
+                company_ruc = resCompany.company_ruc.split("-");
+                agent_ruc = resCompany.agent_ruc.split("-");
+                // Tipo de registro
+                datos.push(1);
+                datos.push('\t');
+                // Periodo
+                datos.push(moment(periodo).format("YYYYMM"));
+                datos.push('\t');
+                // Tipo de reporte
+                datos.push(1);
+                datos.push('\t');
+                // Codigo Obligacion
+                datos.push(911);
+                datos.push('\t');
+                // Codigo Formulario
+                datos.push(211);
+                datos.push('\t');
+                // Ruc agente de informacion
+                datos.push(company_ruc[0]);
+                datos.push('\t');
+                // DV agente de informacion
+                datos.push(company_ruc[1]);
+                datos.push('\t');
+                // Nombre o denominacion del agente de informacion
+                datos.push(resCompany.name);
+                datos.push('\t');
+                // Ruc representante legal
+                datos.push(agent_ruc[0]);
+                datos.push('\t');
+                // DV representante legal
+                datos.push(agent_ruc[1]);
+                datos.push('\t');
+                // Nombre y apellido de representante legal
+                datos.push(resCompany.legal_agent);
+                datos.push('\t');
+                // Cantidad de registros
+                datos.push(50);
+                datos.push('\t');
+                // Monto total
+                datos.push(60);
+                datos.push('\t');
+                // Version
+                datos.push(version);
+                datos.push('\r\n');                
+            });
+
+            // detalles
+            var customer_ruc;
+            var ruc;
+            var cuota;
+            var cuotaII;
+            var tipo;
+            var cantidad = 0;
+            var tasa_10 = 0;
+            var tasa_5 = 0;
+            var iva_5 = 0;
+            var iva_10 = 0;
+            var IVA = 0;
+            var TAX = 0;
+            var total = 0;
+            var valor = 0;
+            var condicion;
+            var untaxed;
+            var ingreso = 0;
+
+            _.each(invoices, function(invoice){
+                // obtener el ruc y el DV del cliente
+                customer_ruc = self.getCustomer(invoice.partner_id[0]);
+                ruc = customer_ruc.ruc.split("-");
+                
+                // Determinar si la factura es a credito o al contado
+                condicion = 1;
+                if (invoice.credito == true){
+                    condicion = 2;
+                }
+                
+                // Determinar la cantidad de cuotas
+                cuota = _.flatten(self.getPaymentTerm(invoice.payment_term[0])).length - 2;
+                if (condicion == 1 || cuota < 1){
+                    cuota = 0;
+                }
+
+                // Manejo de impuestos
+                IVA = accounting.formatNumber(((invoice.amount_untaxed * 10)/100),"","");
+                TAX = accounting.formatNumber(invoice.amount_tax,"","");
+
+                untaxed = 0;
+                iva_5 = 0;
+                iva_10 = 0;
+                tasa_10 = 0;
+                tasa_5 = 0;
+
+                // Determinar si fue aplicado algun impuesto a la factura.
+                if(invoice.amount_total == invoice.amount_untaxed){
+                    untaxed = accounting.formatNumber(invoice.amount_untaxed,"","");        
+                }else{
+                    // Si fue aplicado impuesto, determina si fue de 10% o 5%.
+                    if(IVA == TAX){
+                        iva_10 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_10 = accounting.formatNumber(invoice.amount_untaxed,"","");   
+                    }else{
+                        iva_5 = accounting.formatNumber(invoice.amount_tax,"","");;
+                        tasa_5 = accounting.formatNumber(invoice.amount_untaxed,"","");
+                    }
+                }
+
+                total = 0;
+                total = parseInt(tasa_10) + parseInt(iva_10) + parseInt(tasa_5) + parseInt(iva_5) + parseInt(untaxed);
+
+                // tipo de registro
+                datos.push(2);
+                datos.push('\t');
+                // ruc del cliente
+                datos.push(ruc[0]);
+                datos.push('\t'); 
+                // dv del cliente
+                datos.push(ruc[1]);
+                datos.push('\t');
+                // Nombre o denominacion del cliente
+                datos.push(invoice.partner_id[1]);
+                datos.push('\t');
+                // tipo de documento
+                datos.push(1);
+                datos.push('\t'); 
+                // Numero de documento
+                datos.push(invoice.number);
+                datos.push('\t');
+                // Fecha de documento
+                datos.push(moment(invoice.date_invoice).format("DD/MM/YYYY"));
+                datos.push('\t');
+                // Monto de la venta a la tasa 10%
+                datos.push(tasa_10);
+                datos.push('\t');
+                // IVA debito 10%
+                datos.push(iva_10);
+                datos.push('\t');
+                // Monto de la venta a la tasa 5%
+                datos.push(tasa_5);
+                datos.push('\t');
+                // IVA debito 5%
+                datos.push(iva_5);
+                datos.push('\t');
+                // Monto de la venta no gravada o exenta
+                datos.push(untaxed);
+                datos.push('\t');
+                // Monto del ingreso
+                datos.push(total);
+                datos.push('\t');
+                // Condicion de venta
+                datos.push(condicion);
+                datos.push('\t');
+                // Cantidad de cuotas
+                datos.push(cuota);
+                datos.push('\t');
+                // Numero de timbrado
+                datos.push(invoice.number);
+                datos.push('\r\n');
+
+                cantidad += 1;
+                ingreso += total;    
+            });
+            datos.splice(22,0);
+            datos[22] = cantidad;
+            datos.splice(24,0);
+            datos[24] = ingreso;
+            self.newCabecera = new Blob(datos, {type: 'text/plain'});
+        },
+
+        // Buscar
+        factSearch: function(){
+            var self = this;
+            var period =this.$el.find('#current-period').val();
+            var newInvoice = self.newInvoice;
+            // Buscar por Periodo
+            if (period != 9999999){
+                newInvoice=_.filter(newInvoice, function (inv){
+                    return inv.period_id == period;
+                });
+            }
+            self.loadTable(newInvoice)
+        },
+        // cargara la tabla
+        loadTable:function(rowsTable){
+            var self = this;
+            self.rowsData = rowsTable;
+            var table = this.$el.find('#table');
+            table.bootstrapTable('load',rowsTable);
+        },
+        
+        // Descarga el archivo en formato txt
+        descargarArchivo: function(contenidoEnBlob, nombreArchivo) {
+            var self = this;
+            var reader = new FileReader();
+            reader.onload = function (event) {
+                var save = document.createElement('a');
+                save.href = event.target.result;
+                save.target = '_blank';
+                save.download = nombreArchivo || 'archivo.dat';
+                var clicEvent = new MouseEvent('click', {
+                    'view': window,
+                    'bubbles': true,
+                    'cancelable': true
+                });
+                save.dispatchEvent(clicEvent);
+                (window.URL || window.webkitURL).revokeObjectURL(save.href);
+            };
+            reader.readAsDataURL(contenidoEnBlob);
+        },
+
+        // Genera el archivo txt, con el nombre correspondiente
+        generarTxt: function () {
+            var self = this;
+            var periodo = self.newInvoice[0].period_name.split("/");
+            var fileName = "Ventas " + periodo[1] + periodo[0];
+            self.descargarArchivo(self.newCabecera, fileName);
+        },
+    });
+}

+ 61 - 0
static/src/reports/report_purchases.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="ReportPurchases">
+        <div class="report_view">
+            <div class="reporting_page_header">
+                <h1>Tributacion de compras</h1>
+            </div>
+            <div class="row">
+                <div class="col-md-6 col-md-offset-3">
+                    <table class="table table-condensed">
+                        <tr>
+                            <th>
+                                <label for="current-period">Periodo: </label>
+                                <select id="current-period" class="ui-autocomplete-input form-control"  name="period"></select>
+                            </th>
+                        </tr>
+                        <tr>
+                            <th>
+                                <button class="oe_button oe_form_button oe_highlight btn-block txt" value="txt" id="txt">Exportar a txt</button>
+                            </th>
+                        </tr>
+                    </table> 
+                </div>   
+            </div>
+            <table id="table"
+                data-pagination="true"
+                data-toggle="table"
+                data-reorderable-columns="true"
+                data-toolbar="#toolbar"
+                data-show-columns="true"
+                data-buttons-class="oe_button oe_form_button oe_highlight"
+                data-height="auto"
+                data-classes="table table-hover table-condensed table-bordered"
+                data-row-style="rowStyle"
+                data-search="true">
+                <thead>
+                    <tr>
+                        <th data-field="tipo_registro">Tipo de registro</th>
+                        <th data-field="ruc_proveedor">Ruc Proveedor</th>
+                        <th data-field="dv">DV Proveedor</th>
+                        <th data-field="partner">Nombre o Demoninacion Proveedor</th>
+                        <th data-field="supplier_invoice_number">Numero de Timbrado</th>
+                        <th data-field="tipo_documento">Tipo de Documento</th>
+                        <th data-field="number">Numero de Documento</th>
+                        <th data-field="date">Fecha Documento</th>
+                        <th data-field="tasa_10">Monto de la compra a la Tasa 10%</th>
+                        <th data-field="iva_10">IVA Credito 10%</th>
+                        <th data-field="tasa_5">Monto de la compra a la Tasa 5%</th>
+                        <th data-field="iva_5">IVA Credito 5%</th>
+                        <th data-field="amount_untaxed">Monto de Compra no Gravada o Exenta</th>
+                        <th data-field="tipo_operacion">Tipo de Operacion</th>
+                        <th data-field="condicion_compra">Condicion de Compra</th>
+                        <th data-field="cantidad_cuotas">Cantidad de Cuotas</th>
+                        <th data-field="attachment_ids">Adjuntos</th>
+                    </tr>
+                </thead>
+            </table>
+            <div id="dialog"></div>
+        </div>
+    </t>
+</template>

+ 63 - 0
static/src/reports/report_sales.xml

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="ReportSales">
+        <div class="report_view">
+            <div class="reporting_page_header">
+                <h1>Tributacion de Ventas</h1>
+                <div id="volver"></div>
+            </div>
+            <div class="row">
+                <div class="col-md-6 col-md-offset-3">
+                    <table class="table table-condensed">
+                        <tr>
+                            <th>
+                                <label for="current-period">Periodo: </label>
+                                <select id="current-period" class="ui-autocomplete-input form-control"  name="period"></select>
+                            </th>
+                        </tr>
+                        <tr>
+                            <th>
+                                <button class="oe_button oe_form_button oe_highlight btn-block txt" value="txt" id="txt">Exportar a txt</button>
+                            </th>
+                        </tr>
+                    </table> 
+                </div>   
+            </div>
+            <table id="table"
+                data-pagination="true"
+                data-toggle="table"
+                data-reorderable-columns="true"
+                data-toolbar="#toolbar"
+                data-show-columns="true"
+                data-buttons-class="oe_button oe_form_button oe_highlight"
+                data-height="auto"
+                data-classes="table table-hover table-condensed table-bordered"
+                data-row-style="rowStyle"
+                data-search="true">
+                <thead>
+                    <tr>
+                        <th data-field="tipo_registro" >Tipo de Registro</th>
+                        <th data-field="ruc_cliente" >RUC Cliente</th>
+                        <th data-field="dv">DV Cliente</th>
+                        <th data-field="partner">Nombre o Denominacion Cliente</th>
+                        <th data-field="tipo_documento">Tipo de Documento</th>
+                        <th data-field="numero_documento">Numero Documento</th>
+                        <th data-field="date">Fecha Documento</th>
+                        <th data-field="tasa_10">Monto de la venta a la Tasa 10%</th>
+                        <th data-field="iva_10">IVA Debito 10%</th>
+                        <th data-field="tasa_5">Monto de la venta a la Tasa 5%</th>
+                        <th data-field="iva_5">IVA Debito 5%</th>
+                        <th data-field="amount">Monto de la Venta no Grabada o Exenta</th>
+                        <th data-field="total">Monto del Ingreso</th>
+                        <th data-field="condicion_venta">Condicion de Venta</th>
+                        <th data-field="cantidad_cuotas">Cantidad de Cuotas</th>
+                        <th data-field="number">Numero de Timbrado</th>
+                        <th data-field="attachment_ids">Adjuntos</th>
+                    </tr>
+                </thead>
+            </table>
+            <canvas></canvas>
+            <div id="dialog"></div>
+        </div>
+    </t>
+</template>

+ 14 - 0
static/src/xml/eiru_reporting.xml

@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<template xml:space="preserve">
+    <t t-name="EiruReporting">
+        <t t-call="EiruReportingBase">
+            <!-- <header class="reporting_view_header">
+                <h2>Reportes</h2>
+            </header> -->
+            <div class="oe_form_sheetbg">
+                <t t-call="EiruReportingCards" />
+            </div>
+        </t>
+    </t>
+</template>

+ 13 - 0
static/src/xml/eiru_reporting_base.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<template xml:space="preserve">
+    <t t-name="EiruReportingBase">
+        <div class="oe_form_container">
+            <div class="oe_form">
+                <div class="">
+                    <t t-raw="0" />
+                </div>
+            </div>
+        </div>
+    </t>
+</template>

+ 32 - 0
static/src/xml/eiru_reporting_cards.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<template xml:space="preserve">
+    <t t-name="EiruReportingCards">
+        <div class="oe_form_sheet oe_form_sheet_width">
+            <div class="report_view">
+                <!-- <div class="reporting_page_header">
+                    <h1></h1>
+                </div> -->
+                <div class="report_group">
+                    <t t-foreach="widget.reports" t-as="item">
+                        <div class="report_item">
+                            <div class="report_title">
+                                <h1>
+                                    <t t-esc="item.title" />
+                                </h1>
+                            </div>
+                            <div class="report_content">
+                                <p>
+                                    <t t-esc="item.description" />
+                                </p>
+                            </div>
+                            <div class="report_action">
+                                <button class="oe_button oe_form_button oe_highlight" t-att-value="item.action" autofocus="false">Generar</button>
+                            </div>
+                        </div>
+                    </t>
+                </div>
+            </div>
+        </div>
+    </t>
+</template>

+ 28 - 0
templates.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <template id="eiru_set_assets" inherit_id="eiru_assets.assets">
+            <xpath expr="." position="inside">
+                <!-- Report style -->
+                <link rel="stylesheet" href="/eiru_set/static/src/css/eiru_reporting.css" />
+
+                <!-- configuration < main > -->
+                <script type="text/javascript" src="/eiru_set/static/src/js/main.js" />
+                <script type="text/javascript" src="/eiru_set/static/src/js/reporting_base.js" />
+                <script type="text/javascript" src="/eiru_set/static/src/js/configuration_reporting.js" />
+
+                <!-- Reportes -->
+                <script type="text/javascript" src="/eiru_set/static/src/js/reports/report_purchases.js" />
+                <script type="text/javascript" src="/eiru_set/static/src/js/reports/report_sales.js" />
+            </xpath>
+        </template>
+
+        <record id="eiru_set_action" model="ir.actions.client">
+            <field name="name">SET</field>
+            <field name="tag">eiru_set.action_report</field>
+        </record>
+
+        <menuitem id="eiru_report_menu" name="SET" parent="base.menu_reporting" />
+        <menuitem id="eiru_report_menu_submenu" parent="eiru_report_menu" name="Analisis de Tributacion" action="eiru_set_action" />
+    </data>
+</openerp>