Browse Source

[FIX] Correcciones de errores

Adrielso 7 years ago
parent
commit
13364cb91e

+ 0 - 27
static/src/js/dashboard.js

@@ -50,8 +50,6 @@ function dashboard_widget (instance, widget) {
             wRankingPartner.renderElement();
             wRankingPartner.start();
             this.grid.addWidget(wRankingPartner.$el, 0, 0, wRankingPartner.size.width,  wRankingPartner.size.height, true);
-
-
             //Gasto por Mes
             var wMonthlyExpenses = new widgets.MonthlyExpensesWidget(this);
             wMonthlyExpenses.renderElement();
@@ -74,31 +72,6 @@ function dashboard_widget (instance, widget) {
             this.grid.addWidget(wPaymentsToday.$el, 0, 0, wPaymentsToday.size.width,  wPaymentsToday.size.height, true);
             //
 
-            // for (var i = 1; i <= 4; i++) {
-            //     var widget = new widgets.CustomerCounterWidget(this);
-            //     widget.renderElement();
-            //     // widget.start();
-            //
-            //     this.grid.addWidget(widget.$el, 0, 0, widget.getWidth(),  widget.getHeight(), true);
-            // }
-            //
-            // var w = new widgets.SalesInTheWeekWidget(this);
-            // w.renderElement();
-            // w.start();
-            //
-            // this.grid.addWidget(w.$el, 0, 0, w.size.width,  w.size.height, true);
-            //
-            // var w2 = new widgets.TopSalesProductWidget(this);
-            // w2.renderElement();
-            // w2.start();
-            //
-            // this.grid.addWidget(w2.$el, 0, 0, w2.size.width,  w2.size.height, true);
-            //
-            // var w3 = new widgets.SalesInWarehouseByBrandWidget(this);
-            // w3.renderElement();
-            // w3.start();
-            //
-            // this.grid.addWidget(w3.$el, 0, 0, w3.size.width,  w3.size.height, true);
         }
     });
 }

+ 1 - 1
static/src/js/widgets/missing_product.js

@@ -43,7 +43,7 @@ function missing_product (widget) {
             var defer =$.Deferred();
             var product_id = _.map(stockQaunt,function(map){return map.product_id[0]});
             var fields = ['id', 'name_template', 'qty_available'];
-            var domain =[['qty_available', '<=', 0],['type', '=', 'product']];
+            var domain =[['qty_available', '<=', 0],['type', '=', 'product'],['active','=',true]];
             var productProduct = new model.web.Model('product.product');
             productProduct.query(fields).filter(domain).all().then(function(results){
                 defer.resolve(results);

+ 1 - 1
static/src/js/widgets/monthly_expenses.js

@@ -118,7 +118,7 @@ function monthly_expenses(widget) {
                                 amount_rate :(itemVoucher.amount/itemCurrencyRate.rate)
                             });
             }
-            if (voucher){
+            if (voucher.length > 0){
                 cat = _.reduce(_.map(voucher, function (map) {
                     return map.amount_rate;
                 }), function (memo, num) {

+ 1 - 1
static/src/js/widgets/monthly_purchases.js

@@ -121,7 +121,7 @@ function monthly_purchases(widget) {
                                 amount_rate :(itemVoucher.amount/itemCurrencyRate.rate)
                             });
             }
-            if (voucher){
+            if (voucher.length >0){
                 cat = _.reduce(_.map(voucher, function (map) {
                     return map.amount_rate;
                 }), function (memo, num) {

+ 1 - 1
templates.xml

@@ -2,7 +2,7 @@
 <openerp>
     <data>
         <!-- Templates -->
-        <template id="eiru_dashboard_assets" inherit_id="web.assets_eiru">
+        <template id="eiru_dashboard_assets" inherit_id="eiru_assets.assets">
             <xpath expr="." position="inside">
                 <!-- Dashboard Style -->
                 <link rel="stylesheet" href="/eiru_dashboard/static/src/css/dashboard.css" />