commit
029121fa0e
|
@ -226,6 +226,7 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
multi='compute_day', type="float", store=True),
|
||||
'inactivity_days': fields.function(_compute_day, string='Days since last action', \
|
||||
multi='compute_day', type="integer", help="Difference in days between last action and current date"),
|
||||
'color': fields.integer('Color Index'),
|
||||
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', domain=[('model','=',_name)]),
|
||||
'date_action_last': fields.datetime('Last Action', readonly=1),
|
||||
'date_action_next': fields.datetime('Next Action', readonly=1),
|
||||
|
@ -258,7 +259,22 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
'priority': crm.AVAILABLE_PRIORITIES[2][0],
|
||||
'project_id':_get_project,
|
||||
'categ_id' : lambda *a: False,
|
||||
}
|
||||
}
|
||||
|
||||
def set_priority(self, cr, uid, ids, priority):
|
||||
"""Set lead priority
|
||||
"""
|
||||
return self.write(cr, uid, ids, {'priority' : priority})
|
||||
|
||||
def set_high_priority(self, cr, uid, ids, *args):
|
||||
"""Set lead priority to high
|
||||
"""
|
||||
return self.set_priority(cr, uid, ids, '1')
|
||||
|
||||
def set_normal_priority(self, cr, uid, ids, *args):
|
||||
"""Set lead priority to normal
|
||||
"""
|
||||
return self.set_priority(cr, uid, ids, '3')
|
||||
|
||||
def convert_issue_task(self, cr, uid, ids, context=None):
|
||||
case_obj = self.pool.get('project.issue')
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
<field name="name">Issues</field>
|
||||
<field name="res_model">project.issue</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="view_mode">tree,calendar</field>
|
||||
<field name="view_mode">tree,calendar,kanban</field>
|
||||
<field name="view_id" ref="project_issue_tree_view"/>
|
||||
<field name="domain" eval=""/>
|
||||
<field name="context">{"search_default_user_id": uid, "search_default_draft": 1, "search_default_project_id":project_id}</field>
|
||||
|
|
|
@ -260,6 +260,83 @@
|
|||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- Project Issue Karban View-->
|
||||
|
||||
<record model="ir.ui.view" id="project_issue_kanban_view">
|
||||
<field name="name">Project Issue Kanban</field>
|
||||
<field name="model">project.issue</field>
|
||||
<field name="type">kanban</field>
|
||||
<field name="arch" type="xml">
|
||||
<kanban default_group_by="type_id">
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
<t t-set="color" t-value="kanban_color(record.color.raw_value || record.state.raw_value)"/>
|
||||
<div t-att-class="color + (record.priority.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
|
||||
<div class="oe_kanban_box oe_kanban_color_border">
|
||||
<div class="oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_color_border oe_kanban_draghandle">
|
||||
<table class="oe_kanban_table">
|
||||
<tr>
|
||||
<td class="oe_kanban_title1" align="left" valign="middle">
|
||||
<a t-if="record.priority.raw_value == 1" icon="star-on" type="object" name="set_normal_priority" />
|
||||
<a t-if="record.priority.raw_value != 1" icon="star-off" type="object" name="set_high_priority" style="opacity:0.6; filter:alpha(opacity=60);"/>
|
||||
<field name="name"/>
|
||||
</td>
|
||||
<td valign="top" width="22">
|
||||
<img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger oe_kanban_color_border">
|
||||
<table class="oe_kanban_table">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="oe_kanban_right oe_kanban_small">
|
||||
<field name="user_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_title2">
|
||||
<field name="partner_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_title3">
|
||||
<field name="project_id"/>
|
||||
</div>
|
||||
<div class="oe_kanban_title3">
|
||||
<i><field name="version_id"/></i>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
|
||||
<div class="oe_kanban_left">
|
||||
<a string="Edit" icon="gtk-edit" type="edit"/>
|
||||
<a string="Change Color" icon="color-picker" type="color" name="color"/>
|
||||
<a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
|
||||
<a string="Add Internal Note" name="%(crm.action_crm_add_note)d" context="{'model': 'crm.lead' }" icon="terp-document-new" type="action"/>
|
||||
<a string="Escalate" name="case_escalate" icon="gtk-go-up" type="object"/>
|
||||
<a string="Convert To Task" name="convert_issue_task" icon="gtk-index" type="object"/>
|
||||
</div>
|
||||
<div class="oe_kanban_right">
|
||||
<a name="case_open" string="Open" states="draft,pending" type="object" icon="lead-stage-won" />
|
||||
<a name="case_pending" string="Pending" states="draft,open" type="object" icon="lead-stage-pending"/>
|
||||
<a name="case_close" string="Close" states="open,draft,pending" type="object" icon="lead-stage-lost"/>
|
||||
</div>
|
||||
<br class="oe_kanban_clear"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# ------------------------------------------------------
|
||||
# Feature Requests
|
||||
# ------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue