Browse Source

[FIX] Bug fixed 'crm_dashboard'

pull/195/head
Ajmal Cybro 3 years ago
parent
commit
c45fcd7922
  1. 2
      crm_dashboard/__manifest__.py
  2. 6
      crm_dashboard/models/crm_dashboard.py
  3. 6
      crm_dashboard/static/src/js/custom.js

2
crm_dashboard/__manifest__.py

@ -25,7 +25,7 @@
'summary': """CRM dashboard module brings a multipurpose graphical dashboard"""
""" for CRM module and making the relationship management better and easier""",
'category': 'Sales',
'version': '15.0.1.0.1',
'version': '15.0.1.0.2',
'author': 'Cybrosys Techno Solutions',
'company': 'Cybrosys Techno Solutions',
'maintainer': 'Cybrosys Techno Solutions',

6
crm_dashboard/models/crm_dashboard.py

@ -538,7 +538,11 @@ class CRMLead(models.Model):
if len(data) != 3:
del data
else:
ratio = round(data[1] / data[2], 2)
data[1] = 0
if data[2] == 0:
ratio = 0
else:
ratio = round(data[1] / data[2], 2)
data.append(str(ratio))
country_wise_ratio.append(data)

6
crm_dashboard/static/src/js/custom.js

@ -1,5 +1,6 @@
odoo.define('crm_dashboard.custom', function (require) {
'use strict';
var rpc = require('web.rpc');
var manager = false;
rpc.query({
@ -8,8 +9,9 @@ odoo.define('crm_dashboard.custom', function (require) {
})
.then(function (res) {
manager = res;
})
$(document).on("mousemove", ".dashboard_main_section", function(event){
});
$(document).on("mouseenter", ".dashboard_main_section", function(event){
if (manager) {
var percentage_crm = $('#percentage_crm').val();
var gauge = new Gauge(document.getElementById("gauge"));

Loading…
Cancel
Save