From edff1d957585dc36ec8a67d95df389509fc6511f Mon Sep 17 00:00:00 2001 From: "Turkesh Patel (Open ERP)" Date: Fri, 26 Jul 2013 12:48:34 +0530 Subject: [PATCH] [IMP] Fixed issue of traceback when we enter non integer number,improved css and help. bzr revid: tpa@tinyerp.com-20130726071834-hd9qyyotf41ja57w --- addons/crm/static/src/css/crm.css | 1 + addons/sale/report/sale_report_view.xml | 4 +-- addons/sale_crm/sale_crm_view.xml | 37 ++++++++++++++++++++--- addons/sale_crm/static/src/js/sale_crm.js | 21 ++++++++----- 4 files changed, 49 insertions(+), 14 deletions(-) diff --git a/addons/crm/static/src/css/crm.css b/addons/crm/static/src/css/crm.css index ba4473edc26..53939191eb5 100644 --- a/addons/crm/static/src/css/crm.css +++ b/addons/crm/static/src/css/crm.css @@ -29,6 +29,7 @@ margin: 0 !important; position: relative; display: inline-block; + float: left; } .openerp .oe_kanban_view .oe_kanban_crm_salesteams .oe_items_list a:hover { text-decoration: underline !important; diff --git a/addons/sale/report/sale_report_view.xml b/addons/sale/report/sale_report_view.xml index 69e9cc5e119..4d0ac87bc13 100644 --- a/addons/sale/report/sale_report_view.xml +++ b/addons/sale/report/sale_report_view.xml @@ -47,8 +47,8 @@ - - + + diff --git a/addons/sale_crm/sale_crm_view.xml b/addons/sale_crm/sale_crm_view.xml index ae21934ce61..09b613a40ec 100644 --- a/addons/sale_crm/sale_crm_view.xml +++ b/addons/sale_crm/sale_crm_view.xml @@ -211,6 +211,33 @@ + + Sales Analysis + sale.report + form + tree,graph + {'search_default_year':1,'search_default_month':1,'search_default_User':1,'search_default_Quotations':1,'group_by_no_leaf':1,'group_by':[]} + This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application. + + + + Sales Analysis + sale.report + form + tree,graph + {'search_default_year':1,'search_default_month':1,'search_default_User':1,'search_default_Sales':1,'group_by_no_leaf':1,'group_by':[]} + This report performs analysis on your quotations and sales orders. Analysis check your sales revenues and sort it by different group criteria (salesman, partner, product, etc.) Use this report to perform analysis on sales not having invoiced yet. If you want to analyse your turnover, you should use the Invoice Analysis report in the Accounting application. + + + + Invoices Analysis + account.invoice.report + form + tree,graph + {'search_default_period':1, 'search_default_current':1, 'search_default_user':1, 'search_default_year': 1, 'search_default_category_product':1, 'search_default_customer':1, 'group_by':[], 'group_by_no_leaf':1,} + From this report, you can have an overview of the amount invoiced to your customer. The tool search can also be used to personalise your Invoices reports and so, match this analysis to your needs. + + crm.case.section.form crm.case.section @@ -241,9 +268,9 @@ @@ -251,7 +278,7 @@ diff --git a/addons/sale_crm/static/src/js/sale_crm.js b/addons/sale_crm/static/src/js/sale_crm.js index 207ac959af3..77871bb3a50 100644 --- a/addons/sale_crm/static/src/js/sale_crm.js +++ b/addons/sale_crm/static/src/js/sale_crm.js @@ -67,13 +67,17 @@ openerp.sale_crm.GaugeWidget = openerp.web_kanban.AbstractField.extend({ $input.focus() .keydown(function (event) { event.stopPropagation(); - if (event.keyCode == 13 || event.keyCode == 9) { - if ($input.val() != value) { - parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () { - parent.do_reload(); - }); - } else { - $div.remove(); + if(isNaN($input.val())){ + self.do_warn(_t("Wrong value entered!"), _t("Only Integer Value should be valid.")); + $div.remove(); + } else { + if (event.keyCode == 13 || event.keyCode == 9) { + var val = self.parse_client($input.val()); + if (val != value) { + parent.view.dataset.call(self.options.action_change, [parent.id, $input.val()]).then(function () { + parent.do_reload(); + }); + } else { $div.remove();} } } }) @@ -102,6 +106,9 @@ openerp.sale_crm.GaugeWidget = openerp.web_kanban.AbstractField.extend({ } } }, + parse_client: function(value) { + return openerp.web.parse_value(value, { type:"integer" }); + }, }); openerp.web_kanban.fields_registry.add("gage", "openerp.sale_crm.GaugeWidget");