diff options
| author | Fabien Pinckaers <fp@openerp.com> | 2015-02-15 19:59:54 +0100 |
|---|---|---|
| committer | Fabien Pinckaers <fp@openerp.com> | 2015-02-15 19:59:54 +0100 |
| commit | 29ace2949e9c5bb979a2d65cc561c8048bef7ac8 (patch) | |
| tree | c520c6acffa9459e5156238bc28bed8e5710b9b9 /addons | |
| parent | 8efa988de99a943be9c7f53bff8d31dcf20fcace (diff) | |
[IMP] removing project sparkline
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mass_mailing/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/project/__openerp__.py | 1 | ||||
| -rw-r--r-- | addons/project/project.py | 13 | ||||
| -rw-r--r-- | addons/project/project_view.xml | 5 | ||||
| -rw-r--r-- | addons/project/static/src/css/project.css | 6 | ||||
| -rw-r--r-- | addons/project_issue/project_issue.py | 13 | ||||
| -rw-r--r-- | addons/project_issue/project_issue_view.xml | 3 | ||||
| -rw-r--r-- | addons/sales_team/__openerp__.py | 2 |
8 files changed, 3 insertions, 41 deletions
diff --git a/addons/mass_mailing/__openerp__.py b/addons/mass_mailing/__openerp__.py index 9a683afe3ce..c79fcae50ea 100644 --- a/addons/mass_mailing/__openerp__.py +++ b/addons/mass_mailing/__openerp__.py @@ -35,7 +35,6 @@ professional emails and reuse templates in a few clicks. 'mail', 'marketing', 'web_kanban_gauge', - 'web_kanban_sparkline', 'website_mail', 'website_links', 'utm', diff --git a/addons/project/__openerp__.py b/addons/project/__openerp__.py index eee82303ba7..264611ed80b 100644 --- a/addons/project/__openerp__.py +++ b/addons/project/__openerp__.py @@ -35,7 +35,6 @@ 'mail', 'resource', 'web_kanban', - 'web_kanban_sparkline', 'web_tip', ], 'description': """ diff --git a/addons/project/project.py b/addons/project/project.py index 3fe33fbf5c1..35acb73d02d 100644 --- a/addons/project/project.py +++ b/addons/project/project.py @@ -269,17 +269,6 @@ class project(osv.osv): section_result[self._period_number - (month_delta.months + 1)] = {'value': group.get(value_field, 0), 'tooltip': group.get(groupby_field, 0)} return section_result - def _get_project_task_data(self, cr, uid, ids, field_name, arg, context=None): - obj = self.pool['project.task'] - month_begin = date.today().replace(day=1) - date_begin = (month_begin - relativedelta.relativedelta(months=self._period_number - 1)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) - date_end = month_begin.replace(day=calendar.monthrange(month_begin.year, month_begin.month)[1]).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) - res = {} - for id in ids: - created_domain = [('project_id', '=', id), ('create_date', '>=', date_begin ), ('create_date', '<=', date_end ), ('stage_id.fold', '=', False)] - res[id] = json.dumps(self.__get_bar_values(cr, uid, obj, created_domain, [ 'create_date'], 'create_date_count', 'create_date', context=context)) - return res - # Lambda indirection method to avoid passing a copy of the overridable method when declaring the field _alias_models = lambda self, *args, **kwargs: self._get_alias_models(*args, **kwargs) _visibility_selection = lambda self, *args, **kwargs: self._get_visibility_selection(*args, **kwargs) @@ -345,8 +334,6 @@ class project(osv.osv): ('pending','Pending'), ('close','Closed')], 'Status', required=True, copy=False), - 'monthly_tasks': fields.function(_get_project_task_data, type='char', readonly=True, - string='Project Task By Month'), 'doc_count': fields.function( _get_attached_docs, string="Number of documents attached", type='integer' ) diff --git a/addons/project/project_view.xml b/addons/project/project_view.xml index 6141c4afd37..de75199596d 100644 --- a/addons/project/project_view.xml +++ b/addons/project/project_view.xml @@ -284,12 +284,9 @@ </div> <div class="row oe_margin_top_8 oe_kanban_project_list"> <div class="col-md-6"> - <a t-if="record.use_tasks.raw_value" class="oe_sparkline_bar_link" name="%(act_project_project_2_project_task_all)d" type="action"> + <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action"> <t t-raw="record.task_ids.raw_value.length" /> <field name="label_tasks"/> - <field name="monthly_tasks" widget="sparkline_bar" options="{'delayIn': '1000'}"> - Created Tasks - </field> </a> </div> <div t-if="record.use_tasks.raw_value and record.task_count.raw_value lt 1" class="col-md-12"> diff --git a/addons/project/static/src/css/project.css b/addons/project/static/src/css/project.css index 397c8c870e7..2235d27b972 100644 --- a/addons/project/static/src/css/project.css +++ b/addons/project/static/src/css/project.css @@ -22,12 +22,6 @@ cursor: default; } -.openerp .oe_kanban_view .oe_sparkline_bar { - height: 20px; - width: 30px; - display: inline; -} - .openerp .oe_project_kanban_content { margin-right: 16px !important; margin-left: 16px !important; diff --git a/addons/project_issue/project_issue.py b/addons/project_issue/project_issue.py index 87a152a7d4f..eb5ce771a95 100644 --- a/addons/project_issue/project_issue.py +++ b/addons/project_issue/project_issue.py @@ -487,16 +487,7 @@ class project(osv.Model): project_id: Issue.search_count(cr,uid, [('project_id', '=', project_id), ('stage_id.fold', '=', False)], context=context) for project_id in ids } - def _get_project_issue_data(self, cr, uid, ids, field_name, arg, context=None): - obj = self.pool['project.issue'] - month_begin = date.today().replace(day=1) - date_begin = (month_begin - relativedelta.relativedelta(months=self._period_number - 1)).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) - date_end = month_begin.replace(day=calendar.monthrange(month_begin.year, month_begin.month)[1]).strftime(tools.DEFAULT_SERVER_DATE_FORMAT) - res = {} - for id in ids: - created_domain = [('project_id', '=', id), ('date_closed', '>=', date_begin ), ('date_closed', '<=', date_end )] - res[id] = json.dumps(self.__get_bar_values(cr, uid, obj, created_domain, [ 'date_closed'], 'date_closed_count', 'date_closed', context=context)) - return res + _columns = { 'project_escalation_id': fields.many2one('project.project', 'Project Escalation', help='If any issue is escalated from the current Project, it will be listed under the project selected here.', @@ -504,8 +495,6 @@ class project(osv.Model): 'issue_count': fields.function(_issue_count, type='integer', string="Issues",), 'issue_ids': fields.one2many('project.issue', 'project_id', string="Issues", domain=[('date_closed', '!=', False)]), - 'monthly_issues': fields.function(_get_project_issue_data, type='char', readonly=True, - string='Project Issue By Month') } def _check_escalation(self, cr, uid, ids, context=None): diff --git a/addons/project_issue/project_issue_view.xml b/addons/project_issue/project_issue_view.xml index 7214f7222be..96577bb104a 100644 --- a/addons/project_issue/project_issue_view.xml +++ b/addons/project_issue/project_issue_view.xml @@ -354,9 +354,6 @@ <a t-if="record.use_issues.raw_value" name="%(act_project_project_2_project_issue_all)d" type="action"> <t t-raw="record.issue_ids.raw_value.length"/> <field name="label_issues"/> - <field name="monthly_issues" widget="sparkline_bar" options="{'delayIn': '1000'}"> - Closed Issues - </field> </a> </div> </xpath> diff --git a/addons/sales_team/__openerp__.py b/addons/sales_team/__openerp__.py index e0491b3f12f..21a8938b61a 100644 --- a/addons/sales_team/__openerp__.py +++ b/addons/sales_team/__openerp__.py @@ -29,7 +29,7 @@ Using this application you can manage Sales Team with CRM and/or Sales ======================================================================= """, 'website': 'https://www.odoo.com/page/crm', - 'depends': ['base','mail','web_kanban_sparkline',], + 'depends': ['base','mail'], 'data': ['security/sales_team_security.xml', 'security/ir.model.access.csv', 'res_config_view.xml', |
