[IMP] removing project sparkline
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
'mail',
|
||||
'resource',
|
||||
'web_kanban',
|
||||
'web_kanban_sparkline',
|
||||
'web_tip',
|
||||
],
|
||||
'description': """
|
||||
|
||||
@@ -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'
|
||||
)
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user