Ver Fonte

agrega detalles en pagos a proveedores nuevo report

SEBAS há 1 ano atrás
pai
commit
4115ea4ea2

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

@@ -9,6 +9,7 @@ openerp.eiru_reports_nandetv= function (instance) {
         group_by_pdf(reporting);
         report_customer_payment(reporting);
         report_sale_utility_vendor(reporting);
+        report_supplier_details_payment(reporting);
     } catch (e) {
         // ignorar error
     }
@@ -22,5 +23,8 @@ openerp.eiru_reports_nandetv= function (instance) {
 
     instance.web.client_actions.add('eiru_reports_nandetv.sale_utility_vendor_action', 'instance.eiru_reports_nandetv.ReportSaleUtilityVendorWidget');
 
+    // Informe de pagos con detalles
+
+    instance.web.client_actions.add('eiru_reports_nandetv.supplier_details_payment_action', 'instance.eiru_reports_nandetv.ReportSupplierDetailsPaymentWidget');
 
 }

+ 582 - 0
static/src/js/reports/report_supplier_details_payment.js

@@ -0,0 +1,582 @@
+function report_supplier_details_payment (reporting){
+    "use strict";
+
+    var model = openerp;
+
+    reporting.ReportSupplierDetailsPaymentWidget = reporting.Base.extend({
+        template: 'ReportSupplierDetailsPayment',
+        AccountVoucher: [],
+        content:[],
+        rowsData :[],
+        events:{
+            'click #toolbar > button' : 'clickOnAction',
+            'click #generate' : 'fetchGenerate',
+            'click-row.bs.table #table' : 'clickAnalysisDetail',
+            'change #current-company' : 'updateSelections',
+            'change #current-store' : 'updateJournalSelections',
+            'change #current-date' : 'ShowDateRange',
+            'change #current-period': 'updatePeriodSelections',
+        },
+
+        init : function(parent){
+            this._super(parent);
+        },
+
+        start: function () {
+            var table = this.$el.find('#table');
+            table.bootstrapTable({data : self.rowsData});
+            var date = new model.eiru_reports.ReportDatePickerWidget(self);
+            date.fecthFecha();
+            this.fetchInitial();
+        },
+
+        valorNull:function(dato){
+            var valor ="";
+            if (dato){
+                valor=dato;
+            }
+            return valor;
+        },
+
+        ShowDateRange : function(){
+            var self = this;
+            var date = self.$el.find('#current-date').val();
+            if(date == 'range'){
+                self.$el.find('.datepicker').css('display','block');
+            }
+            if(date != 'range'){
+                self.$el.find('.datepicker').css('display','none');
+            }
+        },
+
+        clickAnalysisDetail: function(e, row, $element, field){
+            // if (field == 'reference'){
+            //     this.do_action({
+            //         name:"Factura",
+            //         type: 'ir.actions.act_window',
+            //         res_model: "account.invoice",
+            //         views: [[false,'form']],
+            //         target: 'new',
+            //         domain: [['id','=', row.invoice_id]],
+            //         context: {},
+            //         flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
+            //         res_id: row.invoice_id,
+            //     });
+            // }
+            // if (field === 'partner'){
+            //     this.do_action({
+            //         name:"Registro",
+            //         type: 'ir.actions.act_window',
+            //         res_model: "res.partner",
+            //         views: [[false,'form']],
+            //         target: 'new',
+            //         domain: [['id','=', row.partner_id]],
+            //         context: {},
+            //         flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
+            //         res_id: row.partner_id,
+            //     });
+            // }
+            e.stopImmediatePropagation();
+        },
+
+        fetchInitial: function () {
+            var self = this;
+            self.fetchResCompany().then(function (ResCompany) {
+                return ResCompany;
+            }).then(function(ResCompany){
+                self.ResCompany = ResCompany;
+                if(ResCompany.length > 1){
+                    self.$el.find('#current-company').append('<option value="9999999">Todas las empresas</option>');
+                    _.each(ResCompany,function(item){
+                        self.$el.find('#current-company').append('<option value="' + item.id + '">' + item.name + '</option>');
+                    });
+                }else{
+                    self.$el.find('.company').css('display','none');
+                }
+                return self.fetchResCurrency();
+            }).then(function(ResCurrency){
+                self.ResCurrency = ResCurrency;
+            });
+                self.$el.find('#generate').css('display','inline');
+                return;
+            },
+
+            fetchGenerate: function () {
+                var self = this;
+                self.$el.find('.search-form').block({
+                    message: null,
+                    overlayCSS: {
+                        backgroundColor: '#FAFAFA'
+                    }
+                });
+                self.$el.find('.report-form').block({
+                    message: null,
+                    overlayCSS: {
+                        backgroundColor: '#FAFAFA'
+                    }
+                });
+
+                this.fetchAccountVoucher().then(function(AccountVoucher) {
+                  return AccountVoucher;
+                }).then(function (AccountVoucher){
+                    self.AccountVoucher = AccountVoucher;
+                  return self.fetchAccountInvoice();
+                }).then(function(AccountInvoice){
+                  self.AccountInvoice = AccountInvoice;
+                  return self.fetchAccountInvoiceLine();
+                }).then(function (AccountInvoiceLine){
+                  self.AccountInvoiceLine = AccountInvoiceLine;
+                  return self.fecthProduct(AccountInvoiceLine);
+                }).then(function(productProduct){
+                  self.productProduct = productProduct;
+                  return self.fetchAccountJournal();
+                }).then(function (AccountJournal) {
+                  self.AccountJournal = AccountJournal;
+                  return self.BuildTable();
+            });
+        },
+
+        /*====================================================================
+            RES COMPANY
+        ====================================================================*/
+        fetchResCompany: function(){
+            var self = this;
+            var defer = $.Deferred();
+            var currency = new model.web.Model('res.company');
+            var field=['id','name','currency_id','logo'];
+            currency.query(field).filter().all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+
+        fetchAccountVoucher: function () {
+            var self = this;
+            var date = self.$el.find('#current-date').val();
+            var desde = self.$el.find('#from').val();
+            var hasta = self.$el.find('#to').val();
+
+            var domain = [
+                ['state', 'in',['posted']],
+            ];
+
+            if(date && date != 9999999){
+
+                if(desde){
+                    var date = desde.split('/')
+                    date = (date[2]+"-"+date[1]+"-"+date[0]);
+                    domain.push(['date','>=',date]);
+                }
+
+                if(hasta){
+                    var date = hasta.split('/')
+                    date = (date[2]+"-"+date[1]+"-"+date[0]);
+                    domain.push(['date','<=',date]);
+                }
+
+                if(date == 'today'){
+                    var today = moment().format('YYYY-MM-DD');
+                    domain.push(['date','=',today]);
+                }
+
+                if(date == 'yesterday'){
+                    var yesterday = moment().add(-1,'days').format('YYYY-MM-DD');
+                    domain.push(['date','=',yesterday]);
+                }
+
+                if(date == 'currentMonth'){
+                    var currentMonth = moment().format('YYYY-MM');
+                    domain.push(['date','like',currentMonth]);
+                }
+
+                if(date == 'lastMonth'){
+                    var lastMonth = moment().add(-1,'months').format('YYYY-MM');
+                    domain.push(['date','like',lastMonth]);
+                }
+            }
+
+            var AccountVoucher = new model.web.Model('account.voucher');
+            return AccountVoucher.call('getAccountVoucherDental',[domain], {
+                context: new model.web.CompoundContext()
+            });
+        },
+
+        fetchResPartner: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var ResPartner = new model.web.Model('res.partner');
+            ResPartner.query(['id','name','ruc']).filter([['active', '=', true]]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+        fetchAccountInvoice: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var domain = [
+                ['state', 'in',['paid','open']],
+                ['type', 'in', ['in_invoice','in_refund']],
+            ];
+            var AccountInvoice = new model.web.Model('account.invoice');
+            AccountInvoice.query(['id','number','type']).filter(domain).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+        fetchAccountJournal: function () {
+            var self = this;
+            var defer = $.Deferred();
+            var AccountJournal = new model.web.Model('account.journal');
+            AccountJournal.query(['id','name']).filter([['active','=',true],['type', 'in', ['bank','cash']]]).all().then(function(results){
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+
+        fetchAccountInvoiceLine: function () {
+            var self = this;
+            var invoice_ids = _.flatten(_.map(self.AccountInvoice, function (item) {
+                return item.id;
+            }));
+            var domain = [
+                ['invoice_id','in',invoice_ids],
+            ];
+
+            var AccountInvoiceLine = new model.web.Model('account.invoice.line');
+            return AccountInvoiceLine.call('getAccountInvoiceLineDental',[domain], {
+                context: new model.web.CompoundContext()
+            });
+        },
+
+
+        /*====================================================================
+            GET RES CURRENCY BASE
+        ====================================================================*/
+        getResCurrency: function (id) {
+            var self = this;
+            return _.filter(self.ResCurrency,function (item) {
+                return item.id === id;
+            })
+        },
+
+
+        // Product Product
+        fecthProduct: function(AccountInvoiceLine){
+            var defer = $.Deferred();
+            var porductIDS = _.flatten(_.map(AccountInvoiceLine, function (item) {
+                return item.product_id[0];
+            }));
+            var ProductProdcut =  new model.web.Model('product.product');
+            var fields = ['id', 'default_code', 'name_template','ean13'];
+            ProductProdcut.query(fields).filter([['id', 'in', porductIDS]]).all().then(function (results) {
+                defer.resolve(results)
+            });
+            return defer;
+        },
+
+        /*====================================================================
+            RES CURRENCY
+        ====================================================================*/
+        fetchResCurrency : function(){
+            var self = this;
+            var defer = $.Deferred();
+            var fields = ['id','name', 'symbol', 'rate_silent', 'base', 'decimal_separator', 'decimal_places', 'thousands_separator', 'symbol_position'];
+            var domain = [['active', '=', true]];
+            var ResCurrency = new model.web.Model('res.currency');
+            ResCurrency.query(fields).filter(domain).all().then(function(results) {
+                defer.resolve(results);
+            });
+            return defer;
+        },
+
+
+        getAccountInvoice: function (number) {
+            var self = this;
+            return _.filter(self.AccountInvoice,function (item) {
+                return item.number == number;
+            });
+        },
+
+        /*====================================================================
+             GET ACCOUNT INVOICE LINE
+         ====================================================================*/
+         getAccountInvoiceLine: function (id) {
+           var self = this;
+           return _.filter(self.AccountInvoiceLine, function(item){
+               return item.invoice_id === id;
+           });
+         },
+
+        BuildTable: function(){
+            var self = this;
+            var AccountVoucher = self.AccountVoucher;
+            var data=[];
+            var company = $('#current-company').val();
+
+            if(company && company != 9999999){
+              var ResCompany = self.getResCompany(company).shift();
+              var CurrencyBase = self.getResCurrency(ResCompany.currency_id[0]).shift();
+            }else{
+              var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            };
+
+            var invoice;
+            var amount_in;
+            _.each(AccountVoucher, function(item){
+
+                var total_price = 0;
+                var total_comision = 0;
+                var tcomision = 0;
+                var total_sale = 0;
+                var product_name = "";
+                var cobrado = 0;
+                cobrado = (item.amount);
+                var AccountInvoice = self.getAccountInvoice(item.reference);
+                _.each(AccountInvoice,function(item2) {
+
+                    var AccountInvoiceLine = self.getAccountInvoiceLine(item2.id);
+                    _.each(AccountInvoiceLine, function(line_item){
+                      if(item2.type == 'in_invoice'){
+                              product_name = line_item.name + " " +line_item.name,
+                              total_comision = 5;
+                              // total_price = total_sale * line_item.quantity;
+                              // tcomision = (total_price*total_comision)/100;
+                      }
+                      if(item2.type == 'in_refund'){
+                        product_name = line_item.name + " " +line_item.name,
+                        total_comision = 5;
+                        // total_price = -(total_sale * line_item.quantity);
+                        // tcomision = - ((total_price*total_comision)/100);
+                      }
+
+                    });
+
+
+                    if(item2.type == 'in_invoice'){
+
+
+                            tcomision = (cobrado *total_comision)/100;
+                    }
+                    if(item2.type == 'in_refund'){
+
+                       tcomision = - ((cobrado *total_comision)/100);
+                    }
+
+
+                        data.push({
+                            id : item.id,
+                            reference: item.reference,
+                            number: item.number,
+                            seq_invoice: self.valorNull(item.seq_invoice),
+                            journal: item.journal_id[1],
+                            date_voucher: moment(item.date).format('YYYY-MM-DD'),
+                            partner: item.partner_id[1],
+                            product_name : product_name,
+                            amount_in: accounting.formatMoney(cobrado,'', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
+                            // total_comision: accounting.formatMoney(tcomision,'', CurrencyBase.decimal_places, CurrencyBase.thousands_separator, CurrencyBase.decimal_separator),
+                            date: item.date,
+                            journal_id: item.journal_id[0],
+                            partner_id: item.partner_id[0],
+
+                            in_amount: cobrado,
+                            // tcomision: tcomision,
+
+                            //TOTAL FOOTER CONFIGURATION
+                            decimal_places : CurrencyBase.decimal_places,
+                            thousands_separator: CurrencyBase.thousands_separator,
+                            decimal_separator: CurrencyBase.decimal_separator,
+                        });
+
+              });
+            });
+            self.content = data;
+            this.loadTable(data);
+
+            self.$el.find('.report-form').css('display','block');
+            self.$el.find('.search-form').unblock();
+            self.$el.find('.report-form').unblock();
+        },
+
+        loadTable:function(rowsTable){
+            var self = this;
+            self.rowsData = rowsTable;
+            var table = this.$el.find('#table');
+            table.bootstrapTable('load',rowsTable);
+        },
+
+        clickOnAction: function (e) {
+            var self = this;
+            var ResCompany;
+            var action = this.$el.find(e.target).val();
+            var company = $('#current-company').val();
+            if(company && company != 9999999){
+                ResCompany = self.getResCompany(company).shift();
+                var CurrencyBase = self.getResCurrency(ResCompany.currency_id[0]).shift();
+            }else{
+                ResCompany = self.ResCompany[0];
+                var CurrencyBase = self.getResCurrency(self.ResCompany[0].currency_id[0]).shift();
+            }
+            var getColumns=[];
+            var rows=[];
+            var table = this.$el.find("#table");
+            var column = table.bootstrapTable('getVisibleColumns');
+            var row = table.bootstrapTable('getData');
+
+            var total_price = totalPriceFormatter(row);
+
+            row.push({
+                date_voucher: 'Totales',
+                total_price: total_price,
+            })
+
+            if (action === 'pdf') {
+                var data = _.map(column, function (val){ return val.field});
+                _.each(_.map(column,function(val){
+                    return val}), function(item){
+                    getColumns.push([{
+                        title: item.title,
+                        dataKey: item.field
+                    }]);
+                });
+                /*
+                ============================================================
+                    CONFIGURACION DEL PDF
+                ============================================================
+                */
+                var pdf_title = 'Listado de pagos por detalles';
+                var pdf_type = '';
+                var pdf_name = 'listado_pagos_detalles';
+                var pdf_columnStyles =  {
+                  number: {columnWidth: 17, halign:'center'},
+                  date_voucher: {columnWidth: 18, halign:'center'},
+                  reference : {columnWidth: 12, halign:'center'},
+                  seq_invoice : {columnWidth: 12, halign:'center'},
+                  partner : {columnWidth: 21, halign:'left'},
+                  product_name : {columnWidth: 20, halign:'left'},
+                  amount_in : {columnWidth: 18, halign:'right'},
+                };
+                /*
+                ============================================================
+                    LLAMAR FUNCION DE IMPRESION
+                ============================================================
+                */
+                var filter = self.getFilter();
+                var pdf = new reporting.ReportPdfWidget(self);
+                pdf.drawPDF(
+                    _.flatten(getColumns),
+                    row,
+                    ResCompany,
+                    pdf_title,
+                    pdf_type,
+                    pdf_name,
+                    pdf_columnStyles,
+                    filter,
+                );
+            }
+        },
+
+        getFilter: function(){
+          var self = this;
+          var company = self.$el.find('#current-company').val();
+          // var store = self.$el.find('#current-store').val();
+          // var journal = self.$el.find('#current-journal').val();
+          // var period = self.$el.find('#current-period').val();
+          var date = self.$el.find('#current-date').val();
+          var desde = self.$el.find('#from').val();
+          var hasta = self.$el.find('#to').val();
+
+          var filter = [];
+
+          if(company && company){
+            var ResCompany = _.filter(self.ResCompany, function(item){
+              return item.id == company;
+            });
+            filter.push({
+              title:'Empresa',
+              value: ResCompany[0].name,
+            });
+          }
+
+          // if(store && store != 9999999){
+          //   var ResStore =  _.filter(self.ResStore,function (item) {
+          //       return item.id == store;
+          //   });
+          //
+          //   filter.push({
+          //       title: 'Sucursal',
+          //       value:  ResStore[0].name,
+          //   });
+          //
+          // }
+
+          // if(journal && journal != 9999999){
+          //   var AccountJournal =  _.filter(self.AccountJournal,function (item) {
+          //       return item.id == journal;
+          //   });
+          //   filter.push({
+          //        title: 'Vendedor',
+          //        value: AccountJournal[0].name,
+          //      });
+          // }
+
+          // if(category && category != 9999999){
+          //   var ProductCategory = _.filter(self.ProductCategory, function(item){
+          //     return item.id == category;
+          //   })
+          //   filter.push({
+          //       title: 'Categoría',
+          //       value:  ProductCategory[0].name,
+          //   });
+          // }
+
+          // if(period && period != 9999999){
+          //
+          //   var AccountPeriod =  _.filter(self.AccountPeriod,function (item) {
+          //       return item.id == period;
+          //   });
+          //   filter.push({
+          //        title: 'Periodo',
+          //        value:  AccountPeriod[0].name,
+          //      });
+          // }
+
+          if(date && date != 9999999){
+            moment.locale('es', {
+              months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
+            });
+
+            if(date == 'range'){
+              filter.push({
+                  title: 'Fecha',
+                  value:  desde +' al '+hasta,
+              });
+
+            }
+            else {
+              if(date == 'today'){
+                  var fecha = moment().format('DD/MM/YYYY');
+              }
+
+              if(date == 'yesterday'){
+                  var fecha = moment().add(-1,'days').format('DD/MM/YYYY');
+              }
+              if(date == 'currentMonth'){
+                  var fecha = moment().format('MMMM/YYYY');
+              }
+              if(date == 'lastMonth'){
+                  var fecha = moment().add(-1,'months').format('MMMM/YYYY');
+              }
+
+              filter.push({
+                  title: 'Fecha',
+                  value:  fecha,
+              });
+            }
+          }
+          return filter;
+        },
+    });
+}

+ 149 - 0
static/src/reports/report_supplier_details_payment.xml

@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<template xml:space="preserve">
+    <t t-name="ReportSupplierDetailsPayment">
+        <div class="report_view">
+            <div class="reporting_page_header">
+                <h1 class="report_title">Listado de pagos por detalles</h1>
+            </div>
+            <div class="container search-form" style="border-bottom:1px solid #eee; width:95%;">
+                <div class="row">
+                    <div class="col-lg-3 company filter-style">
+                        <label>Empresa</label>
+                        <select id="current-company" class="form-control form-control-sm"></select>
+                    </div>
+                    <!-- <div class="col-lg-3 store filter-style">
+                        <label>Sucursal</label>
+                        <select id="current-store" class="form-control form-control-sm">
+                        </select>
+                    </div> -->
+                    <!-- <div class="col-lg-3 journal filter-style">
+                        <label>Método de pago</label>
+                        <select id="current-journal" class="form-control form-control-sm">
+                        </select>
+                    </div> -->
+                    <div class="col-lg-3 filter-style">
+                        <label>Fechas</label>
+                        <select id="current-date" class="form-control form-control-sm">
+                            <option value="9999999">Sin fechas</option>
+                            <option value="today">Hoy</option>
+                            <option value="yesterday">Ayer</option>
+                            <option value="currentMonth">Mes Actual</option>
+                            <option value="lastMonth">Mes Pasado</option>
+                            <option value="range">Busqueda Avanzada</option>
+                        </select>
+                    </div>
+                </div>
+                <div class="row">
+                    <div class="datepicker" style="display:none;">
+                        <div class="col-lg-3 filter-style col-md-offset-3">
+                            <div class="input-group">
+                                <span class="input-group-addon" id="basic-addon1">Desde</span>
+                                <input type="text" id="from" class="form-control" aria-describedby="basic-addon1"/>
+                            </div>
+                        </div>
+                        <div class="col-lg-3 filter-style">
+                            <div class="input-group">
+                                <span class="input-group-addon" id="basic-addon1">Hasta</span>
+                                <input type="text" id="to" class="form-control" aria-describedby="basic-addon1"/>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <div class="row">
+                    <div class="text-center" style="padding-top:20px;">
+                        <button id="generate" class="myButton" aria-label="Left Align" style="color:#fff;display:none;">
+                            Generar
+                        </button>
+                    </div>
+                    <br/>
+                </div>
+            </div>
+            <div class="report-form" style="display:none;">
+                <div id="toolbar">
+                    <button class="print-report oe_button myButton" value="pdf">Imprimir Informe</button>
+                </div>
+                <div class="container" style="width:95%;">
+                    <table id="table"
+                        data-pagination="true"
+                        data-toggle="table"
+                        data-toolbar="#toolbar"
+                        data-show-columns="true"
+                        data-classes="table table-condensed"
+                        data-search="true"
+                        data-show-export="true"
+                        data-show-toggle="true"
+                        data-show-footer="true"
+                        data-footer-style="footerStyle"
+                        data-buttons-class="oe_button myButton"
+                        data-show-pagination-switch="true"
+                        data-search-on-enter-key="true"
+                        data-undefined-text=" "
+                        data-pagination-v-align="top"
+                        >
+                        <thead style="background:none;">
+                            <tr>
+                              <th data-field="date_voucher"
+                                    data-align="left"
+                                    >Fecha pago</th>
+                              <th data-field="number"
+                                    data-align="left"
+                                    data-footer-formatter="Totales"
+                                    >Nº de Pago</th>
+                              <th data-field="reference"
+                                    data-align="left"
+                                    >Nº Fact.</th>
+                              <th data-field="partner"
+                                    data-align="left"
+                                    >Cliente</th>
+                              <th data-field="seq_invoice"
+                                    data-align="left"
+                                    >Recibo Nº</th>
+                              <th data-field="product_name"
+                                    data-align="left"
+                                    >Producto</th>
+                                <th data-field="amount_in"
+                                    data-align="right"
+                                    data-footer-formatter="totalPriceFormatter"
+                                    >Monto</th>
+                            </tr>
+                        </thead>
+                    </table>
+                </div>
+            </div>
+
+            <script>
+                <!--
+                    TOTAL
+                -->
+                function totalPriceFormatter(rowsTable) {
+                    var decimal_places = 0;
+                    var thousands_separator = '.';
+                    var decimal_separator = ',';
+                    if(rowsTable.length > 0){
+                        decimal_places = rowsTable[0].decimal_places;
+                        thousands_separator = rowsTable[0].thousands_separator;
+                        decimal_separator = rowsTable[0].decimal_separator;
+                    }
+                    var amount =  _.reduce(_.map(rowsTable,function(item){
+                        return item.in_amount;
+                    }), function(memo, num){
+                        return memo + num;
+                    },0)
+                    return accounting.formatNumber(amount,decimal_places,thousands_separator,decimal_separator);
+                }
+
+
+                <!--
+                    FOOTER STYLE
+                -->
+                function footerStyle(row, index) {
+                    return {
+                        css: {
+                          "font-weight": "bold"
+                        }
+                    };
+                };
+            </script>
+        </div>
+    </t>
+</template>

+ 4 - 1
templates.xml

@@ -11,11 +11,14 @@
 
 
                 <!-- rendicion de venta por vendedor -->
-                <script type="text/javascript" src="/eiru_reports_nandetv/static/src/js/reports/report_customer_payment.js"/> 
+                <script type="text/javascript" src="/eiru_reports_nandetv/static/src/js/reports/report_customer_payment.js"/>
 
                 <!-- rendicion de venta por vendedor agrupado-->
                 <script type="text/javascript" src="/eiru_reports_nandetv/static/src/js/reports/report_sale_utility_vendor.js"/>
 
+                <!-- listado de pagos detallados-->
+                <script type="text/javascript" src="/eiru_reports_nandetv/static/src/js/reports/report_supplier_details_payment.js"/>
+
             </xpath>
         </template>
     </data>

+ 6 - 1
views/actions.xml

@@ -12,5 +12,10 @@
 						<field name="tag">eiru_reports_nandetv.sale_utility_vendor_action</field>
 		</record>
 
-    </data>
+		<record id="supplier_details_payment_action" model="ir.actions.client">
+						<field name="name">Listado de pagos con detalles</field>
+						<field name="tag">eiru_reports_nandetv.supplier_details_payment_action</field>
+		</record>
+
+  </data>
 </openerp>

+ 6 - 0
views/menus.xml

@@ -21,5 +21,11 @@
               action="sale_utility_vendor_action"
               sequence="6"/>
 
+        <menuitem id="supplier_details_payment_menu"
+                parent="eiru_reports.account_payments_parent_menu"
+                name="Listado de pagos a proveedores con detalles"
+                action="supplier_details_payment_action"
+                sequence="5"/>
+
     </data>
 </openerp>