[MERGE] [IMP] crm, hr_recruitment, project, project_issue: use the newly-introduced widgets for the kanban state and the priority management.

This branch comes with a web branch holding those new widgets for form and kanban views.

bzr revid: tde@openerp.com-20140508160126-ddr1p19k9cbjd09h
This commit is contained in:
Mahendra Barad 2014-05-08 18:01:26 +02:00 committed by Thibault Delavallée
commit df2e290da5
29 changed files with 124 additions and 233 deletions

View File

@ -28,11 +28,11 @@ from openerp.osv import fields
from openerp.osv import osv
AVAILABLE_PRIORITIES = [
('1', 'Highest'),
('2', 'High'),
('3', 'Normal'),
('4', 'Low'),
('5', 'Lowest'),
('0', 'Very Low'),
('1', 'Low'),
('2', 'Normal'),
('3', 'High'),
('4', 'Very High'),
]
class crm_case_channel(osv.osv):

View File

@ -455,21 +455,6 @@ class crm_lead(format_address, osv.osv):
self.write(cr, uid, [case.id], data, context=context)
return True
def set_priority(self, cr, uid, ids, priority, context=None):
""" Set lead priority
"""
return self.write(cr, uid, ids, {'priority': priority}, context=context)
def set_high_priority(self, cr, uid, ids, context=None):
""" Set lead priority to high
"""
return self.set_priority(cr, uid, ids, '1', context=context)
def set_normal_priority(self, cr, uid, ids, context=None):
""" Set lead priority to normal
"""
return self.set_priority(cr, uid, ids, '3', context=context)
def _merge_get_result_type(self, cr, uid, opps, context=None):
"""
Define the type of the result of the merge. If at least one of the

View File

@ -54,7 +54,7 @@ Could you please send me the details ?</field>
<field name="type_id" ref="type_lead7"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
<field name="priority">1</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
@ -104,7 +104,7 @@ Could you please send me the details ?</field>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="stage_lead6"/>
@ -129,7 +129,7 @@ Could you please send me the details ?</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead1"/>
@ -156,7 +156,7 @@ Contact: +1 813 494 5005</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">3</field>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead1"/>
@ -174,7 +174,7 @@ Contact: +1 813 494 5005</field>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
<field name="channel_id" ref=""/>
<field name="priority">5</field>
<field name="priority">0</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
@ -193,7 +193,7 @@ Contact: +1 813 494 5005</field>
<field name="type_id" ref="type_lead5"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor6,categ_oppor8])]"/>
<field name="channel_id" ref=""/>
<field name="priority">4</field>
<field name="priority">1</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="stage_lead1"/>
@ -253,7 +253,7 @@ Andrew</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_direct"/>
<field name="priority">3</field>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_1"/>
<field name="user_id" ref=""/>
<field name="stage_id" ref="stage_lead1"/>
@ -331,7 +331,7 @@ Andrew</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field name="priority">2</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>
@ -404,7 +404,7 @@ Andrew</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">4</field>
<field name="priority">1</field>
<field eval="time.strftime('%Y-%m-8')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-3')" name="date_action"/>
<field name="title_action">Send price list regarding our interventions</field>
@ -431,7 +431,7 @@ Andrew</field>
<field name="partner_id" ref="base.res_partner_4"/>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/>
<field name="priority">4</field>
<field name="priority">1</field>
<field eval="time.strftime('%Y-%m-13')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-4')" name="date_action"/>
<field name="title_action">Call to define real needs about training</field>
@ -492,7 +492,7 @@ Andrew</field>
<field name="type_id" ref="type_lead2"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_phone"/>
<field name="priority">3</field>
<field name="priority">2</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead4"/>
@ -510,7 +510,7 @@ Andrew</field>
<field name="type_id" ref="type_lead7"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
<field name="channel_id" ref="crm_case_channel_email"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="section_id" ref="crm_case_section_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="stage_id" ref="crm.stage_lead5"/>
@ -525,7 +525,7 @@ Andrew</field>
<field name="type_id" ref="type_lead5"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
<field name="channel_id" ref="crm_case_channel_direct"/>
<field name="priority">5</field>
<field name="priority">0</field>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_demo"/>
<field name="stage_id" ref="crm.stage_lead5"/>
@ -543,7 +543,7 @@ Andrew</field>
<field name="type_id" ref="type_lead8"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">5</field>
<field name="priority">0</field>
<field eval="time.strftime('%Y-%m-6')" name="date_deadline"/>
<field name="section_id" ref="section_sales_department"/>
<field name="user_id" ref="base.user_root"/>
@ -588,7 +588,7 @@ Andrew</field>
<field name="type_id" ref="type_lead3"/>
<field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
<field name="channel_id" ref="crm_case_channel_website"/>
<field name="priority">3</field>
<field name="priority">2</field>
<field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
<field eval="time.strftime('%Y-%m-10')" name="date_action"/>
<field name="title_action">Send Catalogue by Email</field>

View File

@ -158,7 +158,7 @@
<field name="type" invisible="1"/>
</group>
<group>
<field name="priority"/>
<field name="priority" widget="priority"/>
<field name="categ_ids"
widget="many2many_tags"
domain="[('object_id.model','=','crm.lead')]"
@ -303,9 +303,10 @@
<field name="title_action"/>
</div>
<div class="oe_kanban_bottom_right">
<a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>
<a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar" t-if="record.user_id.value"/>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
<div class="pull-left" groups="base.group_user">
<field name="priority" widget="priority"/>
</div>
</div>
<div class="oe_kanban_footer_left">
<t t-raw="record.message_summary.raw_value"/>
@ -430,7 +431,7 @@
<field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/>
</div>
<field name="date_deadline"/>
<field name="priority"/>
<field name="priority" widget="priority"/>
</group>
<group>

View File

@ -62,7 +62,7 @@ class crm_phonecall(osv.osv):
('object_id.model', '=', 'crm.phonecall')]"),
'partner_phone': fields.char('Phone', size=32),
'partner_mobile': fields.char('Mobile', size=32),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Date'),
'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'),
@ -75,7 +75,7 @@ class crm_phonecall(osv.osv):
_defaults = {
'date': fields.datetime.now,
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'priority': '1',
'state': _get_default_state,
'user_id': lambda self, cr, uid, ctx: uid,
'active': 1

View File

@ -6,7 +6,7 @@
<record id="crm_phonecall_1" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="'3'" name="priority"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">Left the message</field>
<field name="state">done</field>
@ -19,7 +19,7 @@
<record id="crm_phonecall_2" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
<field name="partner_id" ref="base.res_partner_7"/>
<field eval="'4'" name="priority"/>
<field eval="'0'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">Need more information on the proposed deal</field>
<field name="state">done</field>
@ -44,7 +44,7 @@
</record>
<record id="crm_phonecall_4" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
<field eval="'3'" name="priority"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">Wanted information about pricing of laptops</field>
<field name="state">done</field>
@ -58,7 +58,7 @@
<record id="crm_phonecall_5" model="crm.phonecall">
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="'3'" name="priority"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">More information on the proposed deal</field>
<field name="state">pending</field>
@ -69,7 +69,7 @@
<field eval="2.08" name="duration"/>
</record>
<record id="crm_phonecall_6" model="crm.phonecall">
<field eval="'3'" name="priority"/>
<field eval="'1'" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field name="name">Proposal for discount offer</field>
<field name="state">open</field>

View File

@ -103,7 +103,7 @@
<field name="categ_id" widget="selection"
domain="[('object_id.model', '=', 'crm.phonecall')]"/>
<field name="partner_mobile"/>
<field name="priority"/>
<field name="priority" widget="priority"/>
<field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/>
</group>
<field name="description" placeholder="Description..."/>

View File

@ -42,7 +42,7 @@ class crm_phonecall_report(osv.osv):
_columns = {
'user_id':fields.many2one('res.users', 'User', readonly=True),
'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'nbr': fields.integer('# of Cases', readonly=True),
'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
'create_date': fields.datetime('Create Date', readonly=True, select=True),

View File

@ -88,7 +88,7 @@ class crm_claim(osv.osv):
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),
'user_id': fields.many2one('res.users', 'Responsible'),
'user_fault': fields.char('Trouble Responsible', size=64),
@ -111,7 +111,7 @@ class crm_claim(osv.osv):
'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
'date': fields.datetime.now,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'priority': '1',
'active': lambda *a: 1,
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c)
}

View File

@ -9,7 +9,7 @@
<record id="crm_claim_1" model="crm.claim">
<field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field eval="&quot;3&quot;" name="priority"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of goods&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -21,7 +21,7 @@
<record id="crm_claim_2" model="crm.claim">
<field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field eval="&quot;4&quot;" name="priority"/>
<field eval="&quot;0&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Damaged Products&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -46,7 +46,7 @@
<record id="crm_claim_4" model="crm.claim">
<field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
<field name="partner_id" ref="base.res_partner_18"/>
<field eval="&quot;3&quot;" name="priority"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Product quality not maintained&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -58,7 +58,7 @@
<record id="crm_claim_5" model="crm.claim">
<field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field eval="&quot;3&quot;" name="priority"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Some products missing&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -69,7 +69,7 @@
<record id="crm_claim_6" model="crm.claim">
<field name="partner_id" ref="base.res_partner_9"/>
<field eval="&quot;3&quot;" name="priority"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Problem with the delivery of assignments&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -82,7 +82,7 @@
<record id="crm_claim_7" model="crm.claim">
<field name="partner_id" ref="base.res_partner_19"/>
<field eval="&quot;3&quot;" name="priority"/>
<field eval="&quot;1&quot;" name="priority"/>
<field name="user_id" ref="base.user_root"/>
<field eval="&quot;Documents unclear&quot;" name="name"/>
<field name="section_id" ref="crm.section_sales_department"/>

View File

@ -107,7 +107,7 @@
</group>
<group colspan="4" col="4" groups="base.group_user">
<field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
<field name="priority"/>
<field name="priority" widget="priority"/>
<field name="section_id" groups="base.group_multi_salesteams"/>
<field name="date_deadline"/>
</group>

View File

@ -23,11 +23,9 @@ from openerp.osv import fields,osv
from openerp import tools
AVAILABLE_PRIORITIES = [
('5', 'Lowest'),
('4', 'Low'),
('3', 'Normal'),
('2', 'High'),
('1', 'Highest')
('0', 'Low'),
('1', 'Normal'),
('2', 'High')
]

View File

@ -59,7 +59,7 @@ class crm_helpdesk(osv.osv):
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
'planned_revenue': fields.float('Planned Revenue'),
'planned_cost': fields.float('Planned Costs'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'probability': fields.float('Probability (%)'),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="['|',('section_id','=',False),('section_id','=',section_id),\
@ -83,7 +83,7 @@ class crm_helpdesk(osv.osv):
'state': lambda *a: 'draft',
'date': fields.datetime.now,
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],
'priority': '1',
}
def on_change_partner_id(self, cr, uid, ids, partner_id, context=None):

View File

@ -5,7 +5,7 @@
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="base.main_company"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="state">draft</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="date" eval="time.strftime('%Y-%m-04 11:10:36')"/>
@ -17,7 +17,7 @@
<field eval="1" name="active"/>
<field name="user_id" ref="base.user_demo"/>
<field name="company_id" ref="base.main_company"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="state">draft</field>
<field name="section_id" ref="crm.section_sales_department"/>
<field name="date" eval="time.strftime('%Y-%m-12 11:12:09')"/>
@ -42,7 +42,7 @@
<field name="partner_id" ref="base.res_partner_2"/>
<field name="user_id" ref="base.user_root"/>
<field name="company_id" ref="base.main_company"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="state">draft</field>
<field name="date" eval="time.strftime('%Y-%m-12 11:15:17')"/>
<field name="name">How to create a new module</field>

View File

@ -51,7 +51,7 @@
<field name="email_from"/>
</group>
<group string="Categorization">
<field name="priority"/>
<field name="priority" widget="priority"/>
<field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]" context="{'object_name': 'crm.helpdesk'}"/>
<field name="channel_id"/>
</group>

View File

@ -25,12 +25,11 @@ from openerp.tools.translate import _
AVAILABLE_PRIORITIES = [
('', ''),
('5', 'Not Good'),
('4', 'On Average'),
('0', 'Bad'),
('1', 'Below Average'),
('2', 'Average'),
('3', 'Good'),
('2', 'Very Good'),
('1', 'Excellent')
('4', 'Excellent')
]
class hr_recruitment_source(osv.osv):
@ -489,21 +488,6 @@ class hr_applicant(osv.Model):
dict_act_window['view_mode'] = 'form,tree'
return dict_act_window
def set_priority(self, cr, uid, ids, priority, *args):
"""Set applicant priority
"""
return self.write(cr, uid, ids, {'priority': priority})
def set_high_priority(self, cr, uid, ids, *args):
"""Set applicant priority to high
"""
return self.set_priority(cr, uid, ids, '1')
def set_normal_priority(self, cr, uid, ids, *args):
"""Set applicant priority to normal
"""
return self.set_priority(cr, uid, ids, '3')
def get_empty_list_help(self, cr, uid, help, context=None):
context['empty_list_help_model'] = 'hr.job'
context['empty_list_help_id'] = context.get('default_job_id', None)

View File

@ -75,7 +75,7 @@
<field name="type_id" ref="degree_licenced"/>
<field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">4</field>
<field name="priority">2</field>
<field name="partner_name">David Armstrong</field>
<field name="stage_id" ref="stage_job2"/>
<field name="partner_phone">33968745</field>

View File

@ -130,7 +130,7 @@
<field name="date_action"/>
<field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/>
</div>
<field name="priority"/>
<field name="priority" widget="priority"/>
<field name="source_id"/>
<field name="reference"/>
</group>
@ -293,22 +293,11 @@
<field name="title_action"/>
</div>
<div style="width:240px"><field name="categ_ids"/></div>
<div class="oe_kanban_right">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16" title="Good"/>
</a>
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16" title="Good"/>
</a>
<a type="object" name="set_priority" args="['2']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16" title="Very Good"/>
</a>
<a type="object" name="set_priority" args="['1']">
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16" title="Excellent"/>
</a>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
<div class="pull-left" groups="base.group_user">
<field name="priority" widget="priority"/>
</div>
</div>
<div class="oe_kanban_footer_left" style="margin-top:5px;">
<t t-raw="record.message_summary.raw_value"/>

View File

@ -38,21 +38,7 @@
<field name="categ_ids"/>
<div class="oe_right">
Creation: <field name="create_date"/>
<span class="oe_kanban_highlight">
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['2']" title="High Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['1']" title="Highest Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
</span>
<field name="priority" widget="priority"/>
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
<span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
</t>

View File

@ -565,6 +565,7 @@ class task(osv.osv):
},
'kanban_state': {
'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',
'project.mt_task_ready': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done',
},
}
@ -740,18 +741,18 @@ class task(osv.osv):
'active': fields.function(_is_template, store=True, string='Not a Template Task', type='boolean', help="This field is computed automatically and have the same behavior than the boolean 'active' field: if the task is linked to a template or unactivated project, it will be hidden unless specifically asked."),
'name': fields.char('Task Summary', track_visibility='onchange', size=128, required=True, select=True),
'description': fields.text('Description'),
'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True),
'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True,
domain="[('project_ids', '=', project_id)]"),
'categ_ids': fields.many2many('project.category', string='Tags'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
'kanban_state': fields.selection([('normal', 'In Progress'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
track_visibility='onchange',
help="A task's kanban state indicates special situations affecting it:\n"
" * Normal is the default situation\n"
" * Blocked indicates something is preventing the progress of this task\n"
" * Ready for next stage indicates the task is ready to be pulled to the next stage",
readonly=True, required=False),
required=False),
'create_date': fields.datetime('Create Date', readonly=True, select=True),
'write_date': fields.datetime('Last Modification Date', readonly=True, select=True), #not displayed in the view but it might be useful with base_action_rule module (and it needs to be defined first for that)
'date_start': fields.datetime('Starting Date',select=True),
@ -799,7 +800,7 @@ class task(osv.osv):
'project_id': _get_default_project_id,
'date_last_stage_update': fields.datetime.now,
'kanban_state': 'normal',
'priority': '2',
'priority': '1',
'progress': 0,
'sequence': 10,
'active': True,
@ -808,17 +809,7 @@ class task(osv.osv):
'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx),
}
_order = "priority, sequence, date_start, name, id"
def set_high_priority(self, cr, uid, ids, *args):
"""Set task priority to high
"""
return self.write(cr, uid, ids, {'priority' : '0'})
def set_normal_priority(self, cr, uid, ids, *args):
"""Set task priority to normal
"""
return self.write(cr, uid, ids, {'priority' : '2'})
def _check_recursion(self, cr, uid, ids, context=None):
for id in ids:
visited_branch = set()
@ -1003,16 +994,6 @@ class task(osv.osv):
def set_remaining_time_10(self, cr, uid, ids, context=None):
return self.set_remaining_time(cr, uid, ids, 10.0, context)
def set_kanban_state_blocked(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
def set_kanban_state_normal(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
def set_kanban_state_done(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
return False
def _store_history(self, cr, uid, ids, context=None):
for task in self.browse(cr, uid, ids, context=context):
self.pool.get('project.task.history').create(cr, uid, {

View File

@ -93,6 +93,12 @@
<field name="default" eval="False"/>
<field name="description">Task blocked</field>
</record>
<record id="mt_task_ready" model="mail.message.subtype">
<field name="name">Task Ready for Next Stage</field>
<field name="res_model">project.task</field>
<field name="default" eval="False"/>
<field name="description">Task Ready for Next Stage</field>
</record>
<record id="mt_task_stage" model="mail.message.subtype">
<field name="name">Stage Changed</field>
<field name="res_model">project.task</field>

View File

@ -110,7 +110,7 @@
<field name="planned_hours" eval="40.0"/>
<field name="remaining_hours" eval="40.0"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Prepare Requirements Document</field>
<field name="stage_id" ref="project_tt_analysis"/>
@ -120,7 +120,7 @@
<field name="planned_hours" eval="32.0"/>
<field name="remaining_hours" eval="32.0"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Make SRS</field>
<field name="stage_id" ref="project_tt_specification"/>
@ -129,7 +129,7 @@
<field name="planned_hours" eval="10.0"/>
<field name="remaining_hours" eval="10.0"/>
<field name="user_id" ref="base.user_root"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Budget Planning</field>
<field name="date_deadline" eval="time.strftime('%Y-%m-24')"/>
@ -140,7 +140,7 @@
<field name="planned_hours" eval="60.0"/>
<field name="remaining_hours" eval="60.0"/>
<field name="user_id" ref="base.user_demo"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="project_id" ref="project.project_project_1"/>
<field name="name">Develop module for Sale Management</field>
<field name="description">Use the account_budget module</field>

View File

@ -377,12 +377,11 @@
options="{'fold_field': 'fold'}"/>
</header>
<sheet string="Task">
<div class="oe_right">
<field name="kanban_state" class="oe_inline" widget="kanban_state_selection"/>
</div>
<h1>
<field name="name" placeholder="Task summary..." class="oe_inline"/>
<field name="kanban_state" invisible='1'/>
<button name="set_kanban_state_done" help="In Progress" attrs="{'invisible': [('kanban_state', 'in', ['done','blocked'])]}" type="object" icon="gtk-normal" class="oe_link oe_right"/>
<button name="set_kanban_state_blocked" help="Ready for Next Stage" attrs="{'invisible': [('kanban_state', 'in', ['normal','blocked'])]}" type="object" icon="gtk-yes" class="oe_link oe_right"/>
<button name="set_kanban_state_normal" help="Blocked" attrs="{'invisible': [('kanban_state', 'in', ['done','normal'])]}" type="object" icon="gtk-no" class="oe_link oe_right"/>
</h1>
<group>
<group>
@ -444,7 +443,7 @@
</page>
<page string="Extra Info">
<group col="4">
<field name="priority" groups="base.group_user"/>
<field name="priority" groups="base.group_user" widget="priority"/>
<field name="sequence"/>
<field name="partner_id"/>
<field name="company_id" groups="base.group_multi_company" widget="selection"/>
@ -515,16 +514,6 @@
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())" t-set="red">oe_kanban_text_red</t>
<span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
</div>
<div class="oe_kanban_bottom_right">
<t groups="base.group_user">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<a t-if="record.priority.raw_value > 0" type="object" string="Normal" name="set_high_priority" class="oe_e oe_star_off">7</a>
<a t-if="record.priority.raw_value == 0" type="object" string="Very Important" name="set_normal_priority" class="oe_e oe_star_on">7</a>
</t>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
</div>
<div class="oe_kanban_footer_left">
<span groups="project.group_time_work_estimation_tasks" title="Remaining hours">
<span class="oe_e">N</span>
@ -535,6 +524,13 @@
<t t-raw="record.message_summary.raw_value"/>
<field name="categ_ids"/>
</div>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
<div class="pull-left" groups="base.group_user">
<field name="kanban_state" widget="kanban_state_selection"/>
<field name="priority" widget="priority"/>
</div>
</div>
</div>
<div class="oe_clear"></div>
</div>

View File

@ -48,7 +48,7 @@ class report_project_task_user(osv.osv):
help="Number of Days to Open the task"),
'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
'nbr': fields.integer('# of tasks', readonly=True),
'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')],
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')],
string='Priority', readonly=True),
'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),
'company_id': fields.many2one('res.company', 'Company', readonly=True),

View File

@ -57,6 +57,7 @@ class project_issue(osv.Model):
},
'kanban_state': {
'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',
'project_issue.mt_issue_ready': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done',
},
}
@ -250,7 +251,7 @@ class project_issue(osv.Model):
" * Normal is the default situation\n"
" * Blocked indicates something is preventing the progress of this issue\n"
" * Ready for next stage indicates the issue is ready to be pulled to the next stage",
readonly=True, required=False),
required=False),
'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1),
'email_cc': fields.char('Watchers Emails', size=256, help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'date_open': fields.datetime('Opened', readonly=True,select=True),
@ -260,7 +261,7 @@ class project_issue(osv.Model):
'date_last_stage_update': fields.datetime('Last Stage Update', select=True),
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
'categ_ids': fields.many2many('project.category', string='Tags'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
'stage_id': fields.many2one ('project.task.type', 'Stage',
track_visibility='onchange', select=True,
@ -295,7 +296,7 @@ class project_issue(osv.Model):
'active': 1,
'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
'priority': crm.AVAILABLE_PRIORITIES[2][0],
'priority': '1',
'kanban_state': 'normal',
'date_last_stage_update': fields.datetime.now,
'user_id': lambda obj, cr, uid, context: uid,
@ -305,19 +306,6 @@ class project_issue(osv.Model):
'stage_id': _read_group_stage_ids
}
def set_priority(self, cr, uid, ids, priority, *args):
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 copy(self, cr, uid, id, default=None, context=None):
issue = self.read(cr, uid, id, ['name'], context=context)
if not default:
@ -375,15 +363,6 @@ class project_issue(osv.Model):
# Stage management
# -------------------------------------------------------
def set_kanban_state_blocked(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
def set_kanban_state_normal(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
def set_kanban_state_done(self, cr, uid, ids, context=None):
return self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):
""" Override of the base.stage method
Parameter of the stage search taken from the issue:

View File

@ -48,6 +48,12 @@ Access all issues from the top Project menu, and access the issues of a specific
<field name="default" eval="False"/>
<field name="description">Issue blocked</field>
</record>
<record id="mt_issue_ready" model="mail.message.subtype">
<field name="name">Issue Ready for Next Stage</field>
<field name="res_model">project.issue</field>
<field name="default" eval="False"/>
<field name="description">Issue Ready for Next Stage</field>
</record>
<record id="mt_issue_stage" model="mail.message.subtype">
<field name="name">Stage Changed</field>
<field name="res_model">project.issue</field>

View File

@ -35,7 +35,7 @@
<!-- Issues -->
<record id="crm_case_buginaccountsmodule0" model="project.issue">
<field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
<field name="priority">5</field>
<field name="priority">0</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_2"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -51,7 +51,7 @@
<record id="crm_case_programnotgivingproperoutput0" model="project.issue">
<field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_1"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -64,7 +64,7 @@
<record id="crm_case_outputincorrect0" model="project.issue">
<field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="user_id" ref="base.user_demo"/>
<field name="section_id" ref="crm.section_sales_department"/>
<field eval="1" name="active"/>
@ -79,7 +79,7 @@
<record id="crm_case_problemloadingpage0" model="project.issue">
<field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_14"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -92,7 +92,7 @@
<record id="crm_case_pagenotfound0" model="project.issue">
<field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_13"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -105,7 +105,7 @@
<record id="crm_case_programmingerror0" model="project.issue">
<field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_5"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -172,7 +172,7 @@
<record id="crm_case_newfeaturestobeadded0" model="project.issue">
<field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_8"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -199,7 +199,7 @@
<record id="crm_case_includeattendancesheetinproject0" model="project.issue">
<field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_10"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -213,7 +213,7 @@
<record id="crm_case_createnewobject0" model="project.issue">
<field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>
<field name="priority">3</field>
<field name="priority">1</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_6"/>
<field name="section_id" ref="crm.section_sales_department"/>
@ -226,7 +226,7 @@
<record id="crm_case_improvereportsinhrms0" model="project.issue">
<field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
<field name="priority">4</field>
<field name="priority">0</field>
<field name="user_id" ref="base.user_root"/>
<field name="partner_id" ref="base.res_partner_11"/>
<field name="section_id" ref="crm.section_sales_department"/>

View File

@ -52,13 +52,12 @@
options="{'fold_field': 'fold'}"/>
</header>
<sheet string="Issue">
<div class="oe_right">
<field name="kanban_state" class="oe_inline" widget="kanban_state_selection"/>
</div>
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" class="oe_inline"/>
<field name="kanban_state" invisible='1'/>
<button name="set_kanban_state_done" help="In Progress" attrs="{'invisible': [('kanban_state', 'in', ['done','blocked'])]}" type="object" icon="gtk-normal" class="oe_link oe_right"/>
<button name="set_kanban_state_blocked" help="Ready for Next Stage" attrs="{'invisible': [('kanban_state', 'in', ['normal','blocked'])]}" type="object" icon="gtk-yes" class="oe_link oe_right"/>
<button name="set_kanban_state_normal" help="Blocked" attrs="{'invisible': [('kanban_state', 'in', ['done','normal'])]}" type="object" icon="gtk-no" class="oe_link oe_right"/>
</h1>
<label for="categ_ids" class="oe_edit_only"/>
<field name="categ_ids" widget="many2many_tags"/>
@ -78,7 +77,7 @@
<group>
<field name="id"/>
<field name="version_id" groups="base.group_user"/>
<field name="priority" groups="base.group_user"/>
<field name="priority" groups="base.group_user" widget="priority"/>
<label for="task_id" groups="base.group_user"/>
<div groups="base.group_user">
<field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
@ -217,34 +216,15 @@
<field name="partner_id"/> <br/>
<field name="version_id"/>
</div>
<div class="oe_kanban_footer_left">
<field name="categ_ids"/>
<div class="oe_right">
<span class="oe_kanban_highlight" groups="base.group_user">
<a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
<a t-if="record.kanban_state.raw_value === 'done'" type="object" string="Ready for next stage" name="set_kanban_state_blocked" class="oe_kanban_status oe_kanban_status_green"> </a>
<a t-if="record.kanban_state.raw_value === 'blocked'" type="object" string="Blocked" name="set_kanban_state_normal" class="oe_kanban_status oe_kanban_status_red"> </a>
<t t-set="priority" t-value="record.priority.raw_value || 5"/>
<a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">
<img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['2']" title="High Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
<a type="object" name="set_priority" args="['1']" title="Highest Priority">
<img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
</a>
</span>
<t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
<span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
</t>
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar"/>
<div class="oe_kanban_bottom_right">
<img t-att-src="kanban_image('res.users', 'image_small', record.user_id.raw_value)" t-att-title="record.user_id.value" width="24" height="24" class="oe_kanban_avatar pull-right"/>
<div class="pull-left" groups="base.group_user">
<field name="kanban_state" widget="kanban_state_selection"/>
<field name="priority" widget="priority"/>
</div>
</div>
<div class="oe_kanban_footer_left">
<field name="categ_ids"/>
<t t-raw="record.message_summary.raw_value"/>
</div>
</div>

View File

@ -47,7 +47,7 @@ class project_issue_report(osv.osv):
'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
help="Number of Days to close the project issue"),
'company_id' : fields.many2one('res.company', 'Company'),
'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),
'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
'project_id':fields.many2one('project.project', 'Project',readonly=True),
'version_id': fields.many2one('project.issue.version', 'Version'),
'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True),