project_issue_kanban
bzr revid: rmu@tinyerp.com-20110915123642-hiq0sfcunrciytk3
This commit is contained in:
parent
92e1432757
commit
bd03e6aabf
|
@ -227,6 +227,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),
|
||||
|
@ -268,7 +269,22 @@ class project_issue(crm.crm_case, osv.osv):
|
|||
'project_id':_get_project,
|
||||
'categ_id' : lambda *a: False,
|
||||
#'assigned_to' : lambda obj, cr, uid, context: uid,
|
||||
}
|
||||
}
|
||||
|
||||
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')
|
||||
|
|
|
@ -10,7 +10,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_current":1, "search_default_project_id":project_id}</field>
|
||||
|
|
|
@ -263,6 +263,81 @@
|
|||
</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">
|
||||
<field name="priority"/>
|
||||
<field name="name"/>
|
||||
<field name="user_id"/>
|
||||
<field name="version_id"/>
|
||||
<field name="type_id"/>
|
||||
<field name="color"/>
|
||||
<field name="state"/>
|
||||
<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">
|
||||
<table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_column_heading oe_kanban_color_border oe_kanban_draghandle">
|
||||
|
||||
<tr>
|
||||
<td class="oe_kanban_title3" 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.name.value, 22)" class="oe_kanban_gravatar"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
|
||||
<div class="oe_kanban_right oe_kanban_small">
|
||||
<field name="user_id"/>
|
||||
</div>
|
||||
<div>
|
||||
<b><field name="partner_id"/></b>
|
||||
</div>
|
||||
<div>
|
||||
<b><field name="project_id"/></b>
|
||||
</div>
|
||||
<div>
|
||||
Version <field name="version_id"/>
|
||||
</div>
|
||||
</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': 'project.issue' }" 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