Merge lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba into lp:openobject-addons

Proposed by Mahendra Barad(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba
Merge into: lp:openobject-addons
Diff against target: 2018 lines (+574/-252)
34 files modified
crm/crm.py (+30/-5)
crm/crm_lead.py (+1/-15)
crm/crm_lead_data.xml (+24/-0)
crm/crm_lead_demo.xml (+15/-15)
crm/crm_lead_view.xml (+14/-7)
crm/crm_phonecall.py (+2/-2)
crm/crm_phonecall_demo.xml (+5/-5)
crm/crm_phonecall_view.xml (+1/-1)
crm/crm_view.xml (+49/-1)
crm/report/crm_phonecall_report.py (+1/-1)
crm_claim/crm_claim.py (+2/-2)
crm_claim/crm_claim_demo.xml (+6/-6)
crm_claim/crm_claim_view.xml (+1/-1)
crm_claim/report/crm_claim_report.py (+3/-5)
crm_helpdesk/crm_helpdesk.py (+2/-2)
crm_helpdesk/crm_helpdesk_demo.xml (+3/-3)
crm_helpdesk/crm_helpdesk_view.xml (+1/-1)
hr_recruitment/hr_recruitment.py (+30/-20)
hr_recruitment/hr_recruitment_data.xml (+24/-0)
hr_recruitment/hr_recruitment_demo.xml (+1/-1)
hr_recruitment/hr_recruitment_view.xml (+58/-17)
project/project.py (+62/-29)
project/project_data.xml (+33/-0)
project/project_demo.xml (+7/-4)
project/project_view.xml (+91/-31)
project/report/project_report.py (+1/-1)
project/static/src/css/project.css (+4/-0)
project/static/src/js/project.js (+10/-0)
project_issue/project_issue.py (+26/-27)
project_issue/project_issue_data.xml (+6/-0)
project_issue/project_issue_demo.xml (+13/-10)
project_issue/project_issue_view.xml (+46/-38)
project_issue/report/project_issue_report.py (+1/-1)
project_timesheet/project_timesheet_view.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-widget-tooltip-mba
Reviewer Review Type Date Requested Status
Richard Mathot (Odoo, formerly OpenERP) Pending
Review via email: mp+217431@code.launchpad.net

This proposal supersedes a proposal from 2014-04-14.

Description of the change

Hello ,
I have removed .THIS file.
Thanks

To post a comment you must log in.
Revision history for this message
Richard Mathot (Odoo, formerly OpenERP) (rim-openerp) wrote : Posted in a previous version of this proposal

A .THIS file has been left in the code... please remove it
(we will review the code later)

review: Needs Fixing
9074. By Mahendra Barad(OpenERP)

[Merge]with trunk

9075. By Mahendra Barad(OpenERP)

[IMP]improve resolved conflict code

9076. By Mahendra Barad(OpenERP)

[Merge]with trunk

Unmerged revisions

9076. By Mahendra Barad(OpenERP)

[Merge]with trunk

9075. By Mahendra Barad(OpenERP)

[IMP]improve resolved conflict code

9074. By Mahendra Barad(OpenERP)

[Merge]with trunk

9073. By Mahendra Barad(OpenERP)

[IMP]remove .THIS file

9072. By Mahendra Barad(OpenERP)

[IMP]improve the tooltip

9071. By Mahendra Barad(OpenERP)

[Merge]with trunk

9070. By Mahendra Barad(OpenERP)

[Merge]with trunk

9069. By Mahendra Barad(OpenERP)

[IMP]currency symbol in kanban

9068. By Mahendra Barad(OpenERP)

[IMP]demo data

9067. By Mahendra Barad(OpenERP)

[Add]data for legends

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'crm/crm.py'
--- crm/crm.py 2014-02-11 11:09:36 +0000
+++ crm/crm.py 2014-05-07 10:11:23 +0000
@@ -28,11 +28,11 @@
28from openerp.osv import osv28from openerp.osv import osv
2929
30AVAILABLE_PRIORITIES = [30AVAILABLE_PRIORITIES = [
31 ('1', 'Highest'),31 ('0', 'Very Low'),
32 ('2', 'High'),32 ('1', 'Low'),
33 ('3', 'Normal'),33 ('2', 'Normal'),
34 ('4', 'Low'),34 ('3', 'High'),
35 ('5', 'Lowest'),35 ('4', 'Very High'),
36]36]
3737
38class crm_case_channel(osv.osv):38class crm_case_channel(osv.osv):
@@ -57,6 +57,26 @@
57 _description = "Stage of case"57 _description = "Stage of case"
58 _rec_name = 'name'58 _rec_name = 'name'
59 _order = "sequence"59 _order = "sequence"
60
61 def _get_tooltips(self, cr, uid, ids, field, args, context=None):
62 res = {}
63 for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context):
64 value = ""
65 img = "<img src='/web/static/src/img/icons/star-on.png'/>"
66 if rec['legend_star1']:
67 value += img +' '+ rec['legend_star1'] + "<br/>"
68 if rec['legend_star2']:
69 value += img + img +' '+ rec['legend_star2'] + "<br/>"
70 if rec['legend_star3']:
71 value += img + img + img +' '+ rec['legend_star3'] + "<br/>"
72 if rec['legend_star4']:
73 value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>"
74 if rec['requirements']:
75 value += rec['requirements']
76 tooltip = {'tooltip': value}
77 tooltip.update(rec)
78 res[rec['id']] = tooltip
79 return res
6080
61 _columns = {81 _columns = {
62 'name': fields.char('Stage Name', size=64, required=True, translate=True),82 'name': fields.char('Stage Name', size=64, required=True, translate=True),
@@ -64,6 +84,7 @@
64 'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),84 'probability': fields.float('Probability (%)', required=True, help="This percentage depicts the default/average probability of the Case for this stage to be a success"),
65 'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."),85 'on_change': fields.boolean('Change Probability Automatically', help="Setting this stage will change the probability automatically on the opportunity."),
66 'requirements': fields.text('Requirements'),86 'requirements': fields.text('Requirements'),
87 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ),
67 'section_ids': fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', string='Sections',88 'section_ids': fields.many2many('crm.case.section', 'section_stage_rel', 'stage_id', 'section_id', string='Sections',
68 help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),89 help="Link between stages and sales teams. When set, this limitate the current stage to the selected sales teams."),
69 'case_default': fields.boolean('Default to New Sales Team',90 'case_default': fields.boolean('Default to New Sales Team',
@@ -76,6 +97,10 @@
76 ('both', 'Both')],97 ('both', 'Both')],
77 string='Type', size=16, required=True,98 string='Type', size=16, required=True,
78 help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."),99 help="This field is used to distinguish stages related to Leads from stages related to Opportunities, or to specify stages available for both types."),
100 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
101 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
102 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'),
103 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'),
79 }104 }
80105
81 _defaults = {106 _defaults = {
82107
=== modified file 'crm/crm_lead.py'
--- crm/crm_lead.py 2014-05-02 13:07:53 +0000
+++ crm/crm_lead.py 2014-05-07 10:11:23 +0000
@@ -278,6 +278,7 @@
278 'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True),278 'partner_address_name': fields.related('partner_id', 'name', type='char', string='Partner Contact Name', readonly=True),
279 'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True),279 'partner_address_email': fields.related('partner_id', 'email', type='char', string='Partner Contact Email', readonly=True),
280 'company_currency': fields.related('company_id', 'currency_id', type='many2one', string='Currency', readonly=True, relation="res.currency"),280 'company_currency': fields.related('company_id', 'currency_id', type='many2one', string='Currency', readonly=True, relation="res.currency"),
281 'company_currency_symbol': fields.related('company_id', 'currency_id', 'symbol', type='char', string='Symbol', readonly=True, relation="res.currency"),
281 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),282 'user_email': fields.related('user_id', 'email', type='char', string='User Email', readonly=True),
282 'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),283 'user_login': fields.related('user_id', 'login', type='char', string='User Login', readonly=True),
283284
@@ -458,21 +459,6 @@
458 self.write(cr, uid, [case.id], data, context=context)459 self.write(cr, uid, [case.id], data, context=context)
459 return True460 return True
460461
461 def set_priority(self, cr, uid, ids, priority, context=None):
462 """ Set lead priority
463 """
464 return self.write(cr, uid, ids, {'priority': priority}, context=context)
465
466 def set_high_priority(self, cr, uid, ids, context=None):
467 """ Set lead priority to high
468 """
469 return self.set_priority(cr, uid, ids, '1', context=context)
470
471 def set_normal_priority(self, cr, uid, ids, context=None):
472 """ Set lead priority to normal
473 """
474 return self.set_priority(cr, uid, ids, '3', context=context)
475
476 def _merge_get_result_type(self, cr, uid, opps, context=None):462 def _merge_get_result_type(self, cr, uid, opps, context=None):
477 """463 """
478 Define the type of the result of the merge. If at least one of the464 Define the type of the result of the merge. If at least one of the
479465
=== modified file 'crm/crm_lead_data.xml'
--- crm/crm_lead_data.xml 2014-02-21 11:29:15 +0000
+++ crm/crm_lead_data.xml 2014-05-07 10:11:23 +0000
@@ -10,6 +10,10 @@
10 <field name="on_change">1</field>10 <field name="on_change">1</field>
11 <field name="sequence">1</field>11 <field name="sequence">1</field>
12 <field name="type">both</field>12 <field name="type">both</field>
13 <field name="legend_star1">Low priority</field>
14 <field name="legend_star2">Normal priority</field>
15 <field name="legend_star3">High priority</field>
16 <field name="legend_star4">Highest priority</field>
13 </record>17 </record>
14 <record model="crm.case.stage" id="stage_lead2">18 <record model="crm.case.stage" id="stage_lead2">
15 <field name="name">Dead</field>19 <field name="name">Dead</field>
@@ -26,6 +30,10 @@
26 <field name="on_change">1</field>30 <field name="on_change">1</field>
27 <field name="sequence">40</field>31 <field name="sequence">40</field>
28 <field name="type">opportunity</field>32 <field name="type">opportunity</field>
33 <field name="legend_star1">Low priority</field>
34 <field name="legend_star2">Normal priority</field>
35 <field name="legend_star3">High priority</field>
36 <field name="legend_star4">Highest priority</field>
29 </record>37 </record>
30 <record model="crm.case.stage" id="stage_lead4">38 <record model="crm.case.stage" id="stage_lead4">
31 <field name="name">Proposition</field>39 <field name="name">Proposition</field>
@@ -33,6 +41,10 @@
33 <field name="probability">40</field>41 <field name="probability">40</field>
34 <field name="sequence">50</field>42 <field name="sequence">50</field>
35 <field name="type">opportunity</field>43 <field name="type">opportunity</field>
44 <field name="legend_star1">Low priority</field>
45 <field name="legend_star2">Normal priority</field>
46 <field name="legend_star3">High priority</field>
47 <field name="legend_star4">Highest priority</field>
36 </record>48 </record>
37 <record model="crm.case.stage" id="stage_lead5">49 <record model="crm.case.stage" id="stage_lead5">
38 <field name="name">Negotiation</field>50 <field name="name">Negotiation</field>
@@ -40,6 +52,10 @@
40 <field name="probability">60</field>52 <field name="probability">60</field>
41 <field name="sequence">60</field>53 <field name="sequence">60</field>
42 <field name="type">opportunity</field>54 <field name="type">opportunity</field>
55 <field name="legend_star1">Low priority</field>
56 <field name="legend_star2">Normal priority</field>
57 <field name="legend_star3">High priority</field>
58 <field name="legend_star4">Highest priority</field>
43 </record>59 </record>
44 <record model="crm.case.stage" id="stage_lead6">60 <record model="crm.case.stage" id="stage_lead6">
45 <field name="name">Won</field>61 <field name="name">Won</field>
@@ -49,6 +65,10 @@
49 <field name="on_change">1</field>65 <field name="on_change">1</field>
50 <field name="sequence">70</field>66 <field name="sequence">70</field>
51 <field name="type">opportunity</field>67 <field name="type">opportunity</field>
68 <field name="legend_star1">Low priority</field>
69 <field name="legend_star2">Normal priority</field>
70 <field name="legend_star3">High priority</field>
71 <field name="legend_star4">Highest priority</field>
52 </record>72 </record>
53 <record model="crm.case.stage" id="stage_lead7">73 <record model="crm.case.stage" id="stage_lead7">
54 <field name="name">Lost</field>74 <field name="name">Lost</field>
@@ -58,6 +78,10 @@
58 <field name="on_change">1</field>78 <field name="on_change">1</field>
59 <field name="sequence">80</field>79 <field name="sequence">80</field>
60 <field name="type">opportunity</field>80 <field name="type">opportunity</field>
81 <field name="legend_star1">Low priority</field>
82 <field name="legend_star2">Normal priority</field>
83 <field name="legend_star3">High priority</field>
84 <field name="legend_star4">Highest priority</field>
61 </record>85 </record>
62 86
63 <record model="crm.case.section" id="section_sales_department">87 <record model="crm.case.section" id="section_sales_department">
6488
=== modified file 'crm/crm_lead_demo.xml'
--- crm/crm_lead_demo.xml 2013-10-27 12:31:04 +0000
+++ crm/crm_lead_demo.xml 2014-05-07 10:11:23 +0000
@@ -54,7 +54,7 @@
54 <field name="type_id" ref="type_lead7"/>54 <field name="type_id" ref="type_lead7"/>
55 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>55 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
56 <field name="channel_id" ref="crm_case_channel_website"/>56 <field name="channel_id" ref="crm_case_channel_website"/>
57 <field name="priority">4</field>57 <field name="priority">1</field>
58 <field name="section_id" ref="section_sales_department"/>58 <field name="section_id" ref="section_sales_department"/>
59 <field name="user_id" ref="base.user_root"/>59 <field name="user_id" ref="base.user_root"/>
60 <field name="stage_id" ref="stage_lead1"/>60 <field name="stage_id" ref="stage_lead1"/>
@@ -104,7 +104,7 @@
104 <field name="type_id" ref="type_lead8"/>104 <field name="type_id" ref="type_lead8"/>
105 <field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>105 <field name="categ_ids" eval="[(6, 0, [categ_oppor5])]"/>
106 <field name="channel_id" ref=""/>106 <field name="channel_id" ref=""/>
107 <field name="priority">3</field>107 <field name="priority">2</field>
108 <field name="section_id" ref="crm_case_section_2"/>108 <field name="section_id" ref="crm_case_section_2"/>
109 <field name="user_id" ref="base.user_demo"/>109 <field name="user_id" ref="base.user_demo"/>
110 <field name="stage_id" ref="stage_lead6"/>110 <field name="stage_id" ref="stage_lead6"/>
@@ -129,7 +129,7 @@
129 <field name="type_id" ref="type_lead3"/>129 <field name="type_id" ref="type_lead3"/>
130 <field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>130 <field name="categ_ids" eval="[(6, 0, [categ_oppor1])]"/>
131 <field name="channel_id" ref="crm_case_channel_website"/>131 <field name="channel_id" ref="crm_case_channel_website"/>
132 <field name="priority">3</field>132 <field name="priority">2</field>
133 <field name="section_id" ref="crm_case_section_1"/>133 <field name="section_id" ref="crm_case_section_1"/>
134 <field name="user_id" ref=""/>134 <field name="user_id" ref=""/>
135 <field name="stage_id" ref="stage_lead1"/>135 <field name="stage_id" ref="stage_lead1"/>
@@ -156,7 +156,7 @@
156 <field name="type_id" ref="type_lead3"/>156 <field name="type_id" ref="type_lead3"/>
157 <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>157 <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
158 <field name="channel_id" ref=""/>158 <field name="channel_id" ref=""/>
159 <field name="priority">3</field>159 <field name="priority">2</field>
160 <field name="section_id" ref="crm_case_section_2"/>160 <field name="section_id" ref="crm_case_section_2"/>
161 <field name="user_id" ref=""/>161 <field name="user_id" ref=""/>
162 <field name="stage_id" ref="stage_lead1"/>162 <field name="stage_id" ref="stage_lead1"/>
@@ -174,7 +174,7 @@
174 <field name="type_id" ref="type_lead8"/>174 <field name="type_id" ref="type_lead8"/>
175 <field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>175 <field name="categ_ids" eval="[(6, 0, [categ_oppor4])]"/>
176 <field name="channel_id" ref=""/>176 <field name="channel_id" ref=""/>
177 <field name="priority">5</field>177 <field name="priority">0</field>
178 <field name="section_id" ref="crm_case_section_2"/>178 <field name="section_id" ref="crm_case_section_2"/>
179 <field name="user_id" ref="base.user_root"/>179 <field name="user_id" ref="base.user_root"/>
180 <field name="stage_id" ref="stage_lead1"/>180 <field name="stage_id" ref="stage_lead1"/>
@@ -193,7 +193,7 @@
193 <field name="type_id" ref="type_lead5"/>193 <field name="type_id" ref="type_lead5"/>
194 <field name="categ_ids" eval="[(6, 0, [categ_oppor6,categ_oppor8])]"/>194 <field name="categ_ids" eval="[(6, 0, [categ_oppor6,categ_oppor8])]"/>
195 <field name="channel_id" ref=""/>195 <field name="channel_id" ref=""/>
196 <field name="priority">4</field>196 <field name="priority">1</field>
197 <field name="section_id" ref="section_sales_department"/>197 <field name="section_id" ref="section_sales_department"/>
198 <field name="user_id" ref="base.user_root"/>198 <field name="user_id" ref="base.user_root"/>
199 <field name="stage_id" ref="stage_lead1"/>199 <field name="stage_id" ref="stage_lead1"/>
@@ -253,7 +253,7 @@
253 <field name="type_id" ref="type_lead3"/>253 <field name="type_id" ref="type_lead3"/>
254 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>254 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
255 <field name="channel_id" ref="crm_case_channel_direct"/>255 <field name="channel_id" ref="crm_case_channel_direct"/>
256 <field name="priority">3</field>256 <field name="priority">2</field>
257 <field name="section_id" ref="crm_case_section_1"/>257 <field name="section_id" ref="crm_case_section_1"/>
258 <field name="user_id" ref=""/>258 <field name="user_id" ref=""/>
259 <field name="stage_id" ref="stage_lead1"/>259 <field name="stage_id" ref="stage_lead1"/>
@@ -331,7 +331,7 @@
331 <field name="type_id" ref="type_lead3"/>331 <field name="type_id" ref="type_lead3"/>
332 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>332 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
333 <field name="channel_id" ref="crm_case_channel_website"/>333 <field name="channel_id" ref="crm_case_channel_website"/>
334 <field name="priority">3</field>334 <field name="priority">2</field>
335 <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>335 <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
336 <field eval="time.strftime('%Y-%m-10')" name="date_action"/>336 <field eval="time.strftime('%Y-%m-10')" name="date_action"/>
337 <field name="title_action">Send Catalogue by Email</field>337 <field name="title_action">Send Catalogue by Email</field>
@@ -404,7 +404,7 @@
404 <field name="type_id" ref="type_lead3"/>404 <field name="type_id" ref="type_lead3"/>
405 <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>405 <field name="categ_ids" eval="[(6, 0, [categ_oppor3,categ_oppor4])]"/>
406 <field name="channel_id" ref="crm_case_channel_website"/>406 <field name="channel_id" ref="crm_case_channel_website"/>
407 <field name="priority">4</field>407 <field name="priority">1</field>
408 <field eval="time.strftime('%Y-%m-8')" name="date_deadline"/>408 <field eval="time.strftime('%Y-%m-8')" name="date_deadline"/>
409 <field eval="time.strftime('%Y-%m-3')" name="date_action"/>409 <field eval="time.strftime('%Y-%m-3')" name="date_action"/>
410 <field name="title_action">Send price list regarding our interventions</field>410 <field name="title_action">Send price list regarding our interventions</field>
@@ -431,7 +431,7 @@
431 <field name="partner_id" ref="base.res_partner_4"/>431 <field name="partner_id" ref="base.res_partner_4"/>
432 <field name="type_id" ref="type_lead8"/>432 <field name="type_id" ref="type_lead8"/>
433 <field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/>433 <field name="categ_ids" eval="[(6, 0, [categ_oppor4,categ_oppor6])]"/>
434 <field name="priority">4</field>434 <field name="priority">1</field>
435 <field eval="time.strftime('%Y-%m-13')" name="date_deadline"/>435 <field eval="time.strftime('%Y-%m-13')" name="date_deadline"/>
436 <field eval="time.strftime('%Y-%m-4')" name="date_action"/>436 <field eval="time.strftime('%Y-%m-4')" name="date_action"/>
437 <field name="title_action">Call to define real needs about training</field>437 <field name="title_action">Call to define real needs about training</field>
@@ -492,7 +492,7 @@
492 <field name="type_id" ref="type_lead2"/>492 <field name="type_id" ref="type_lead2"/>
493 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>493 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
494 <field name="channel_id" ref="crm_case_channel_phone"/>494 <field name="channel_id" ref="crm_case_channel_phone"/>
495 <field name="priority">3</field>495 <field name="priority">2</field>
496 <field name="section_id" ref="crm_case_section_2"/>496 <field name="section_id" ref="crm_case_section_2"/>
497 <field name="user_id" ref="base.user_root"/>497 <field name="user_id" ref="base.user_root"/>
498 <field name="stage_id" ref="crm.stage_lead4"/>498 <field name="stage_id" ref="crm.stage_lead4"/>
@@ -510,7 +510,7 @@
510 <field name="type_id" ref="type_lead7"/>510 <field name="type_id" ref="type_lead7"/>
511 <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>511 <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
512 <field name="channel_id" ref="crm_case_channel_email"/>512 <field name="channel_id" ref="crm_case_channel_email"/>
513 <field name="priority">3</field>513 <field name="priority">1</field>
514 <field name="section_id" ref="crm_case_section_2"/>514 <field name="section_id" ref="crm_case_section_2"/>
515 <field name="user_id" ref="base.user_root"/>515 <field name="user_id" ref="base.user_root"/>
516 <field name="stage_id" ref="crm.stage_lead5"/>516 <field name="stage_id" ref="crm.stage_lead5"/>
@@ -525,7 +525,7 @@
525 <field name="type_id" ref="type_lead5"/>525 <field name="type_id" ref="type_lead5"/>
526 <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>526 <field name="categ_ids" eval="[(6, 0, [categ_oppor3])]"/>
527 <field name="channel_id" ref="crm_case_channel_direct"/>527 <field name="channel_id" ref="crm_case_channel_direct"/>
528 <field name="priority">5</field>528 <field name="priority">0</field>
529 <field name="section_id" ref="section_sales_department"/>529 <field name="section_id" ref="section_sales_department"/>
530 <field name="user_id" ref="base.user_demo"/>530 <field name="user_id" ref="base.user_demo"/>
531 <field name="stage_id" ref="crm.stage_lead5"/>531 <field name="stage_id" ref="crm.stage_lead5"/>
@@ -543,7 +543,7 @@
543 <field name="type_id" ref="type_lead8"/>543 <field name="type_id" ref="type_lead8"/>
544 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>544 <field name="categ_ids" eval="[(6, 0, [categ_oppor7])]"/>
545 <field name="channel_id" ref="crm_case_channel_website"/>545 <field name="channel_id" ref="crm_case_channel_website"/>
546 <field name="priority">5</field>546 <field name="priority">0</field>
547 <field eval="time.strftime('%Y-%m-6')" name="date_deadline"/>547 <field eval="time.strftime('%Y-%m-6')" name="date_deadline"/>
548 <field name="section_id" ref="section_sales_department"/>548 <field name="section_id" ref="section_sales_department"/>
549 <field name="user_id" ref="base.user_root"/>549 <field name="user_id" ref="base.user_root"/>
@@ -588,7 +588,7 @@
588 <field name="type_id" ref="type_lead3"/>588 <field name="type_id" ref="type_lead3"/>
589 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>589 <field name="categ_ids" eval="[(6, 0, [categ_oppor2])]"/>
590 <field name="channel_id" ref="crm_case_channel_website"/>590 <field name="channel_id" ref="crm_case_channel_website"/>
591 <field name="priority">3</field>591 <field name="priority">2</field>
592 <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>592 <field eval="time.strftime('%Y-%m-23')" name="date_deadline"/>
593 <field eval="time.strftime('%Y-%m-10')" name="date_action"/>593 <field eval="time.strftime('%Y-%m-10')" name="date_action"/>
594 <field name="title_action">Send Catalogue by Email</field>594 <field name="title_action">Send Catalogue by Email</field>
595595
=== modified file 'crm/crm_lead_view.xml'
--- crm/crm_lead_view.xml 2014-05-02 13:22:58 +0000
+++ crm/crm_lead_view.xml 2014-05-07 10:11:23 +0000
@@ -158,7 +158,7 @@
158 <field name="type" invisible="1"/>158 <field name="type" invisible="1"/>
159 </group>159 </group>
160 <group>160 <group>
161 <field name="priority"/>161 <field name="priority" widget="priority"/>
162 <field name="categ_ids"162 <field name="categ_ids"
163 widget="many2many_tags"163 widget="many2many_tags"
164 domain="[('object_id.model','=','crm.lead')]"164 domain="[('object_id.model','=','crm.lead')]"
@@ -261,7 +261,7 @@
261 <field name="model">crm.lead</field>261 <field name="model">crm.lead</field>
262 <field name="arch" type="xml">262 <field name="arch" type="xml">
263 <kanban default_group_by="stage_id">263 <kanban default_group_by="stage_id">
264 <field name="stage_id"/>264 <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
265 <field name="color"/>265 <field name="color"/>
266 <field name="priority"/>266 <field name="priority"/>
267 <field name="planned_revenue" sum="Expected Revenues"/>267 <field name="planned_revenue" sum="Expected Revenues"/>
@@ -290,7 +290,7 @@
290 <b><field name="name"/></b>290 <b><field name="name"/></b>
291 <t t-if="record.planned_revenue.raw_value">291 <t t-if="record.planned_revenue.raw_value">
292 - <b><t t-esc="record.planned_revenue.value"/>292 - <b><t t-esc="record.planned_revenue.value"/>
293 <field name="company_currency"/></b>293 <field name="company_currency_symbol"/></b>
294 </t>294 </t>
295 </div>295 </div>
296 <div>296 <div>
@@ -303,9 +303,16 @@
303 <field name="title_action"/>303 <field name="title_action"/>
304 </div>304 </div>
305 <div class="oe_kanban_bottom_right">305 <div class="oe_kanban_bottom_right">
306 <a t-if="record.priority.raw_value == 1" type="object" name="set_normal_priority" class="oe_e oe_star_on">7</a>306 <table>
307 <a t-if="record.priority.raw_value != 1" type="object" name="set_high_priority" class="oe_e oe_star_off">7</a>307 <tr>
308 <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"/>308 <td groups="base.group_user">
309 <field name="priority" widget="priority"/>
310 </td>
311 <td>
312 <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"/>
313 </td>
314 </tr>
315 </table>
309 </div>316 </div>
310 <div class="oe_kanban_footer_left">317 <div class="oe_kanban_footer_left">
311 <t t-raw="record.message_summary.raw_value"/>318 <t t-raw="record.message_summary.raw_value"/>
@@ -430,7 +437,7 @@
430 <field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/>437 <field name="title_action" class="oe_inline" nolabel="1" placeholder="e.g. Call for proposal"/>
431 </div>438 </div>
432 <field name="date_deadline"/>439 <field name="date_deadline"/>
433 <field name="priority"/>440 <field name="priority" widget="priority"/>
434 </group>441 </group>
435442
436 <group>443 <group>
437444
=== modified file 'crm/crm_phonecall.py'
--- crm/crm_phonecall.py 2014-03-24 13:56:21 +0000
+++ crm/crm_phonecall.py 2014-05-07 10:11:23 +0000
@@ -70,7 +70,7 @@
70 ('object_id.model', '=', 'crm.phonecall')]"),70 ('object_id.model', '=', 'crm.phonecall')]"),
71 'partner_phone': fields.char('Phone', size=32),71 'partner_phone': fields.char('Phone', size=32),
72 'partner_mobile': fields.char('Mobile', size=32),72 'partner_mobile': fields.char('Mobile', size=32),
73 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),73 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
74 'date_closed': fields.datetime('Closed', readonly=True),74 'date_closed': fields.datetime('Closed', readonly=True),
75 'date': fields.datetime('Date'),75 'date': fields.datetime('Date'),
76 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'),76 'opportunity_id': fields.many2one ('crm.lead', 'Lead/Opportunity'),
@@ -85,7 +85,7 @@
8585
86 _defaults = {86 _defaults = {
87 'date': fields.datetime.now,87 'date': fields.datetime.now,
88 'priority': crm.AVAILABLE_PRIORITIES[2][0],88 'priority': '1',
89 'state': _get_default_state,89 'state': _get_default_state,
90 'user_id': lambda self, cr, uid, ctx: uid,90 'user_id': lambda self, cr, uid, ctx: uid,
91 'active': 191 'active': 1
9292
=== modified file 'crm/crm_phonecall_demo.xml'
--- crm/crm_phonecall_demo.xml 2013-10-27 12:31:04 +0000
+++ crm/crm_phonecall_demo.xml 2014-05-07 10:11:23 +0000
@@ -6,7 +6,7 @@
6 <record id="crm_phonecall_1" model="crm.phonecall">6 <record id="crm_phonecall_1" model="crm.phonecall">
7 <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>7 <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
8 <field name="partner_id" ref="base.res_partner_11"/>8 <field name="partner_id" ref="base.res_partner_11"/>
9 <field eval="'3'" name="priority"/>9 <field eval="'1'" name="priority"/>
10 <field name="user_id" ref="base.user_root"/>10 <field name="user_id" ref="base.user_root"/>
11 <field name="name">Left the message</field>11 <field name="name">Left the message</field>
12 <field name="state">done</field>12 <field name="state">done</field>
@@ -19,7 +19,7 @@
19 <record id="crm_phonecall_2" model="crm.phonecall">19 <record id="crm_phonecall_2" model="crm.phonecall">
20 <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>20 <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
21 <field name="partner_id" ref="base.res_partner_7"/>21 <field name="partner_id" ref="base.res_partner_7"/>
22 <field eval="'4'" name="priority"/>22 <field eval="'0'" name="priority"/>
23 <field name="user_id" ref="base.user_root"/>23 <field name="user_id" ref="base.user_root"/>
24 <field name="name">Need more information on the proposed deal</field>24 <field name="name">Need more information on the proposed deal</field>
25 <field name="state">done</field>25 <field name="state">done</field>
@@ -44,7 +44,7 @@
44 </record>44 </record>
45 <record id="crm_phonecall_4" model="crm.phonecall">45 <record id="crm_phonecall_4" model="crm.phonecall">
46 <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>46 <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
47 <field eval="'3'" name="priority"/>47 <field eval="'1'" name="priority"/>
48 <field name="user_id" ref="base.user_root"/>48 <field name="user_id" ref="base.user_root"/>
49 <field name="name">Wanted information about pricing of laptops</field>49 <field name="name">Wanted information about pricing of laptops</field>
50 <field name="state">done</field>50 <field name="state">done</field>
@@ -58,7 +58,7 @@
58 <record id="crm_phonecall_5" model="crm.phonecall">58 <record id="crm_phonecall_5" model="crm.phonecall">
59 <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>59 <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
60 <field name="partner_id" ref="base.res_partner_5"/>60 <field name="partner_id" ref="base.res_partner_5"/>
61 <field eval="'3'" name="priority"/>61 <field eval="'1'" name="priority"/>
62 <field name="user_id" ref="base.user_root"/>62 <field name="user_id" ref="base.user_root"/>
63 <field name="name">More information on the proposed deal</field>63 <field name="name">More information on the proposed deal</field>
64 <field name="state">pending</field>64 <field name="state">pending</field>
@@ -69,7 +69,7 @@
69 <field eval="2.08" name="duration"/>69 <field eval="2.08" name="duration"/>
70 </record>70 </record>
71 <record id="crm_phonecall_6" model="crm.phonecall">71 <record id="crm_phonecall_6" model="crm.phonecall">
72 <field eval="'3'" name="priority"/>72 <field eval="'1'" name="priority"/>
73 <field name="user_id" ref="base.user_root"/>73 <field name="user_id" ref="base.user_root"/>
74 <field name="name">Proposal for discount offer</field>74 <field name="name">Proposal for discount offer</field>
75 <field name="state">open</field>75 <field name="state">open</field>
7676
=== modified file 'crm/crm_phonecall_view.xml'
--- crm/crm_phonecall_view.xml 2014-05-02 13:07:53 +0000
+++ crm/crm_phonecall_view.xml 2014-05-07 10:11:23 +0000
@@ -103,7 +103,7 @@
103 <field name="categ_id" widget="selection"103 <field name="categ_id" widget="selection"
104 domain="[('object_id.model', '=', 'crm.phonecall')]"/>104 domain="[('object_id.model', '=', 'crm.phonecall')]"/>
105 <field name="partner_mobile"/>105 <field name="partner_mobile"/>
106 <field name="priority"/>106 <field name="priority" widget="priority"/>
107 <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/>107 <field name="opportunity_id" on_change="on_change_opportunity(opportunity_id)"/>
108 </group>108 </group>
109 <field name="description" placeholder="Description..."/>109 <field name="description" placeholder="Description..."/>
110110
=== modified file 'crm/crm_view.xml'
--- crm/crm_view.xml 2013-12-10 09:33:07 +0000
+++ crm/crm_view.xml 2014-05-07 10:11:23 +0000
@@ -107,9 +107,57 @@
107 </group>107 </group>
108108
109 </group>109 </group>
110 <div attrs="{'invisible':[('type','=', 'lead')]}">
111 <separator string="Legend"/>
112 <p>The legend will appear as tooltip of each column of the opportunities pipe.</p>
113 <div>
114 <group col="3">
115 <div width="57">
116 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
117 </div>
118 <div width="400">
119 <field name="legend_star1"/>
120 </div>
121 <div></div>
122 </group>
123 </div>
124 <div>
125 <group col="3">
126 <div width="57">
127 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
128 </div>
129 <div width="400">
130 <field name="legend_star2"/>
131 </div>
132 <div></div>
133 </group>
134 </div>
135 <div>
136 <group col="3">
137 <div width="57">
138 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span>
139 </div>
140 <div width="400">
141 <field name="legend_star3"/>
142 </div>
143 <div></div>
144 </group>
145 </div>
146 <div>
147 <group col="3">
148 <div width="57">
149 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span>
150 </div>
151 <div width="400">
152 <field name="legend_star4"/>
153 </div>
154 <div></div>
155 </group>
156 </div>
157 </div>
158 <field name="section_ids" invisible="1"/>
110 <separator string="Requirements"/>159 <separator string="Requirements"/>
111 <field name="requirements" nolabel="1"/>160 <field name="requirements" nolabel="1"/>
112 <field name="section_ids" invisible="1"/>
113 </form>161 </form>
114 </field>162 </field>
115 </record>163 </record>
116164
=== modified file 'crm/report/crm_phonecall_report.py'
--- crm/report/crm_phonecall_report.py 2014-01-29 09:56:55 +0000
+++ crm/report/crm_phonecall_report.py 2014-05-07 10:11:23 +0000
@@ -42,7 +42,7 @@
42 _columns = {42 _columns = {
43 'user_id':fields.many2one('res.users', 'User', readonly=True),43 'user_id':fields.many2one('res.users', 'User', readonly=True),
44 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),44 'section_id':fields.many2one('crm.case.section', 'Section', readonly=True),
45 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),45 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
46 'nbr': fields.integer('# of Cases', readonly=True),46 'nbr': fields.integer('# of Cases', readonly=True),
47 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),47 'state': fields.selection(AVAILABLE_STATES, 'Status', size=16, readonly=True),
48 'create_date': fields.datetime('Create Date', readonly=True, select=True),48 'create_date': fields.datetime('Create Date', readonly=True, select=True),
4949
=== modified file 'crm_claim/crm_claim.py'
--- crm_claim/crm_claim.py 2014-03-24 05:09:21 +0000
+++ crm_claim/crm_claim.py 2014-05-07 10:11:23 +0000
@@ -88,7 +88,7 @@
88 'categ_id': fields.many2one('crm.case.categ', 'Category', \88 'categ_id': fields.many2one('crm.case.categ', 'Category', \
89 domain="[('section_id','=',section_id),\89 domain="[('section_id','=',section_id),\
90 ('object_id.model', '=', 'crm.claim')]"),90 ('object_id.model', '=', 'crm.claim')]"),
91 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),91 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
92 'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),92 'type_action': fields.selection([('correction','Corrective Action'),('prevention','Preventive Action')], 'Action Type'),
93 'user_id': fields.many2one('res.users', 'Responsible'),93 'user_id': fields.many2one('res.users', 'Responsible'),
94 'user_fault': fields.char('Trouble Responsible', size=64),94 'user_fault': fields.char('Trouble Responsible', size=64),
@@ -111,7 +111,7 @@
111 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),111 'section_id': lambda s, cr, uid, c: s._get_default_section_id(cr, uid, c),
112 'date': fields.datetime.now,112 'date': fields.datetime.now,
113 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),113 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.case', context=c),
114 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],114 'priority': '1',
115 'active': lambda *a: 1,115 'active': lambda *a: 1,
116 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c)116 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c)
117 }117 }
118118
=== modified file 'crm_claim/crm_claim_demo.xml'
--- crm_claim/crm_claim_demo.xml 2012-11-29 22:26:45 +0000
+++ crm_claim/crm_claim_demo.xml 2014-05-07 10:11:23 +0000
@@ -9,7 +9,7 @@
9 <record id="crm_claim_1" model="crm.claim">9 <record id="crm_claim_1" model="crm.claim">
10 <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>10 <field eval="time.strftime('%Y-%m-04 10:45:36')" name="date"/>
11 <field name="partner_id" ref="base.res_partner_11"/>11 <field name="partner_id" ref="base.res_partner_11"/>
12 <field eval="&quot;3&quot;" name="priority"/>12 <field eval="&quot;1&quot;" name="priority"/>
13 <field name="user_id" ref="base.user_root"/>13 <field name="user_id" ref="base.user_root"/>
14 <field eval="&quot;Problem with the delivery of goods&quot;" name="name"/>14 <field eval="&quot;Problem with the delivery of goods&quot;" name="name"/>
15 <field name="section_id" ref="crm.section_sales_department"/>15 <field name="section_id" ref="crm.section_sales_department"/>
@@ -21,7 +21,7 @@
21 <record id="crm_claim_2" model="crm.claim">21 <record id="crm_claim_2" model="crm.claim">
22 <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>22 <field eval="time.strftime('%Y-%m-11 11:19:25')" name="date"/>
23 <field name="partner_id" ref="base.res_partner_6"/>23 <field name="partner_id" ref="base.res_partner_6"/>
24 <field eval="&quot;4&quot;" name="priority"/>24 <field eval="&quot;0&quot;" name="priority"/>
25 <field name="user_id" ref="base.user_root"/>25 <field name="user_id" ref="base.user_root"/>
26 <field eval="&quot;Damaged Products&quot;" name="name"/>26 <field eval="&quot;Damaged Products&quot;" name="name"/>
27 <field name="section_id" ref="crm.section_sales_department"/>27 <field name="section_id" ref="crm.section_sales_department"/>
@@ -46,7 +46,7 @@
46 <record id="crm_claim_4" model="crm.claim">46 <record id="crm_claim_4" model="crm.claim">
47 <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>47 <field eval="time.strftime('%Y-%m-21 14:10:23')" name="date"/>
48 <field name="partner_id" ref="base.res_partner_18"/>48 <field name="partner_id" ref="base.res_partner_18"/>
49 <field eval="&quot;3&quot;" name="priority"/>49 <field eval="&quot;1&quot;" name="priority"/>
50 <field name="user_id" ref="base.user_root"/>50 <field name="user_id" ref="base.user_root"/>
51 <field eval="&quot;Product quality not maintained&quot;" name="name"/>51 <field eval="&quot;Product quality not maintained&quot;" name="name"/>
52 <field name="section_id" ref="crm.section_sales_department"/>52 <field name="section_id" ref="crm.section_sales_department"/>
@@ -58,7 +58,7 @@
58 <record id="crm_claim_5" model="crm.claim">58 <record id="crm_claim_5" model="crm.claim">
59 <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>59 <field eval="time.strftime('%Y-%m-28 16:20:43')" name="date"/>
60 <field name="partner_id" ref="base.res_partner_5"/>60 <field name="partner_id" ref="base.res_partner_5"/>
61 <field eval="&quot;3&quot;" name="priority"/>61 <field eval="&quot;1&quot;" name="priority"/>
62 <field name="user_id" ref="base.user_root"/>62 <field name="user_id" ref="base.user_root"/>
63 <field eval="&quot;Some products missing&quot;" name="name"/>63 <field eval="&quot;Some products missing&quot;" name="name"/>
64 <field name="section_id" ref="crm.section_sales_department"/>64 <field name="section_id" ref="crm.section_sales_department"/>
@@ -69,7 +69,7 @@
69 69
70 <record id="crm_claim_6" model="crm.claim">70 <record id="crm_claim_6" model="crm.claim">
71 <field name="partner_id" ref="base.res_partner_9"/>71 <field name="partner_id" ref="base.res_partner_9"/>
72 <field eval="&quot;3&quot;" name="priority"/>72 <field eval="&quot;1&quot;" name="priority"/>
73 <field name="user_id" ref="base.user_root"/>73 <field name="user_id" ref="base.user_root"/>
74 <field eval="&quot;Problem with the delivery of assignments&quot;" name="name"/>74 <field eval="&quot;Problem with the delivery of assignments&quot;" name="name"/>
75 <field name="section_id" ref="crm.section_sales_department"/>75 <field name="section_id" ref="crm.section_sales_department"/>
@@ -82,7 +82,7 @@
82 82
83 <record id="crm_claim_7" model="crm.claim">83 <record id="crm_claim_7" model="crm.claim">
84 <field name="partner_id" ref="base.res_partner_19"/>84 <field name="partner_id" ref="base.res_partner_19"/>
85 <field eval="&quot;3&quot;" name="priority"/>85 <field eval="&quot;1&quot;" name="priority"/>
86 <field name="user_id" ref="base.user_root"/>86 <field name="user_id" ref="base.user_root"/>
87 <field eval="&quot;Documents unclear&quot;" name="name"/>87 <field eval="&quot;Documents unclear&quot;" name="name"/>
88 <field name="section_id" ref="crm.section_sales_department"/>88 <field name="section_id" ref="crm.section_sales_department"/>
8989
=== modified file 'crm_claim/crm_claim_view.xml'
--- crm_claim/crm_claim_view.xml 2013-10-27 12:31:04 +0000
+++ crm_claim/crm_claim_view.xml 2014-05-07 10:11:23 +0000
@@ -107,7 +107,7 @@
107 </group>107 </group>
108 <group colspan="4" col="4" groups="base.group_user">108 <group colspan="4" col="4" groups="base.group_user">
109 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>109 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'base.group_sale_salesman_all_leads']}"/>
110 <field name="priority"/>110 <field name="priority" widget="priority"/>
111 <field name="section_id" groups="base.group_multi_salesteams"/>111 <field name="section_id" groups="base.group_multi_salesteams"/>
112 <field name="date_deadline"/>112 <field name="date_deadline"/>
113 </group>113 </group>
114114
=== modified file 'crm_claim/report/crm_claim_report.py'
--- crm_claim/report/crm_claim_report.py 2013-10-27 12:31:04 +0000
+++ crm_claim/report/crm_claim_report.py 2014-05-07 10:11:23 +0000
@@ -23,11 +23,9 @@
23from openerp import tools23from openerp import tools
2424
25AVAILABLE_PRIORITIES = [25AVAILABLE_PRIORITIES = [
26 ('5', 'Lowest'),26 ('0', 'Low'),
27 ('4', 'Low'),27 ('1', 'Normal'),
28 ('3', 'Normal'),28 ('2', 'High')
29 ('2', 'High'),
30 ('1', 'Highest')
31]29]
3230
3331
3432
=== modified file 'crm_helpdesk/crm_helpdesk.py'
--- crm_helpdesk/crm_helpdesk.py 2013-11-27 15:32:57 +0000
+++ crm_helpdesk/crm_helpdesk.py 2014-05-07 10:11:23 +0000
@@ -59,7 +59,7 @@
59 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),59 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
60 'planned_revenue': fields.float('Planned Revenue'),60 'planned_revenue': fields.float('Planned Revenue'),
61 'planned_cost': fields.float('Planned Costs'),61 'planned_cost': fields.float('Planned Costs'),
62 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),62 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
63 'probability': fields.float('Probability (%)'),63 'probability': fields.float('Probability (%)'),
64 'categ_id': fields.many2one('crm.case.categ', 'Category', \64 'categ_id': fields.many2one('crm.case.categ', 'Category', \
65 domain="['|',('section_id','=',False),('section_id','=',section_id),\65 domain="['|',('section_id','=',False),('section_id','=',section_id),\
@@ -83,7 +83,7 @@
83 'state': lambda *a: 'draft',83 'state': lambda *a: 'draft',
84 'date': fields.datetime.now,84 'date': fields.datetime.now,
85 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),85 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
86 'priority': lambda *a: crm.AVAILABLE_PRIORITIES[2][0],86 'priority': '1',
87 }87 }
8888
89 def on_change_partner_id(self, cr, uid, ids, partner_id, context=None):89 def on_change_partner_id(self, cr, uid, ids, partner_id, context=None):
9090
=== modified file 'crm_helpdesk/crm_helpdesk_demo.xml'
--- crm_helpdesk/crm_helpdesk_demo.xml 2012-11-29 22:26:45 +0000
+++ crm_helpdesk/crm_helpdesk_demo.xml 2014-05-07 10:11:23 +0000
@@ -5,7 +5,7 @@
5 <field eval="1" name="active"/>5 <field eval="1" name="active"/>
6 <field name="user_id" ref="base.user_root"/>6 <field name="user_id" ref="base.user_root"/>
7 <field name="company_id" ref="base.main_company"/>7 <field name="company_id" ref="base.main_company"/>
8 <field name="priority">3</field>8 <field name="priority">1</field>
9 <field name="state">draft</field>9 <field name="state">draft</field>
10 <field name="section_id" ref="crm.section_sales_department"/>10 <field name="section_id" ref="crm.section_sales_department"/>
11 <field name="date" eval="time.strftime('%Y-%m-04 11:10:36')"/>11 <field name="date" eval="time.strftime('%Y-%m-04 11:10:36')"/>
@@ -17,7 +17,7 @@
17 <field eval="1" name="active"/>17 <field eval="1" name="active"/>
18 <field name="user_id" ref="base.user_demo"/>18 <field name="user_id" ref="base.user_demo"/>
19 <field name="company_id" ref="base.main_company"/>19 <field name="company_id" ref="base.main_company"/>
20 <field name="priority">3</field>20 <field name="priority">1</field>
21 <field name="state">draft</field>21 <field name="state">draft</field>
22 <field name="section_id" ref="crm.section_sales_department"/>22 <field name="section_id" ref="crm.section_sales_department"/>
23 <field name="date" eval="time.strftime('%Y-%m-12 11:12:09')"/>23 <field name="date" eval="time.strftime('%Y-%m-12 11:12:09')"/>
@@ -42,7 +42,7 @@
42 <field name="partner_id" ref="base.res_partner_2"/>42 <field name="partner_id" ref="base.res_partner_2"/>
43 <field name="user_id" ref="base.user_root"/>43 <field name="user_id" ref="base.user_root"/>
44 <field name="company_id" ref="base.main_company"/>44 <field name="company_id" ref="base.main_company"/>
45 <field name="priority">3</field>45 <field name="priority">1</field>
46 <field name="state">draft</field>46 <field name="state">draft</field>
47 <field name="date" eval="time.strftime('%Y-%m-12 11:15:17')"/>47 <field name="date" eval="time.strftime('%Y-%m-12 11:15:17')"/>
48 <field name="name">How to create a new module</field>48 <field name="name">How to create a new module</field>
4949
=== modified file 'crm_helpdesk/crm_helpdesk_view.xml'
--- crm_helpdesk/crm_helpdesk_view.xml 2014-04-17 11:26:55 +0000
+++ crm_helpdesk/crm_helpdesk_view.xml 2014-05-07 10:11:23 +0000
@@ -51,7 +51,7 @@
51 <field name="email_from"/>51 <field name="email_from"/>
52 </group>52 </group>
53 <group string="Categorization">53 <group string="Categorization">
54 <field name="priority"/>54 <field name="priority" widget="priority"/>
55 <field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]" context="{'object_name': 'crm.helpdesk'}"/>55 <field name="categ_id" domain="[('object_id.model', '=', 'crm.helpdesk')]" context="{'object_name': 'crm.helpdesk'}"/>
56 <field name="channel_id"/>56 <field name="channel_id"/>
57 </group>57 </group>
5858
=== modified file 'hr_recruitment/hr_recruitment.py'
--- hr_recruitment/hr_recruitment.py 2014-04-17 06:53:56 +0000
+++ hr_recruitment/hr_recruitment.py 2014-05-07 10:11:23 +0000
@@ -25,12 +25,11 @@
2525
2626
27AVAILABLE_PRIORITIES = [27AVAILABLE_PRIORITIES = [
28 ('', ''),28 ('0', 'Bad'),
29 ('5', 'Not Good'),29 ('1', 'Below Average'),
30 ('4', 'On Average'),30 ('2', 'Average'),
31 ('3', 'Good'),31 ('3', 'Good'),
32 ('2', 'Very Good'),32 ('4', 'Excellent')
33 ('1', 'Excellent')
34]33]
3534
36class hr_recruitment_source(osv.osv):35class hr_recruitment_source(osv.osv):
@@ -46,6 +45,27 @@
46 _name = "hr.recruitment.stage"45 _name = "hr.recruitment.stage"
47 _description = "Stage of Recruitment"46 _description = "Stage of Recruitment"
48 _order = 'sequence'47 _order = 'sequence'
48
49 def _get_tooltips(self, cr, uid, ids, field, args, context=None):
50 res = {}
51 for rec in self.read(cr, uid, ids, ['legend_star1','legend_star2','legend_star3','legend_star4','requirements'], context=context):
52 value = ""
53 img = "<img src='/web/static/src/img/icons/star-on.png'/>"
54 if rec['legend_star1']:
55 value += img +' '+ rec['legend_star1'] + "<br/>"
56 if rec['legend_star2']:
57 value += img + img +' '+ rec['legend_star2'] + "<br/>"
58 if rec['legend_star3']:
59 value += img + img + img +' '+ rec['legend_star3'] + "<br/>"
60 if rec['legend_star4']:
61 value += img + img + img + img +' '+ rec['legend_star4'] + "<br/>"
62 if rec['requirements']:
63 value += rec['requirements']
64 tooltip = {'tooltip': value}
65 tooltip.update(rec)
66 res[rec['id']] = tooltip
67 return res
68
49 _columns = {69 _columns = {
50 'name': fields.char('Name', size=64, required=True, translate=True),70 'name': fields.char('Name', size=64, required=True, translate=True),
51 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),71 'sequence': fields.integer('Sequence', help="Gives the sequence order when displaying a list of stages."),
@@ -55,6 +75,11 @@
55 'fold': fields.boolean('Folded in Kanban View',75 'fold': fields.boolean('Folded in Kanban View',
56 help='This stage is folded in the kanban view when'76 help='This stage is folded in the kanban view when'
57 'there are no records in that stage to display.'),77 'there are no records in that stage to display.'),
78 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header" ),
79 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
80 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
81 'legend_star3':fields.char('Legend Star3', help='This tooltip will appear on kanban view column header.'),
82 'legend_star4':fields.char('Legend Star4', help='This tooltip will appear on kanban view column header.'),
58 }83 }
59 _defaults = {84 _defaults = {
60 'sequence': 1,85 'sequence': 1,
@@ -489,21 +514,6 @@
489 dict_act_window['view_mode'] = 'form,tree'514 dict_act_window['view_mode'] = 'form,tree'
490 return dict_act_window515 return dict_act_window
491516
492 def set_priority(self, cr, uid, ids, priority, *args):
493 """Set applicant priority
494 """
495 return self.write(cr, uid, ids, {'priority': priority})
496
497 def set_high_priority(self, cr, uid, ids, *args):
498 """Set applicant priority to high
499 """
500 return self.set_priority(cr, uid, ids, '1')
501
502 def set_normal_priority(self, cr, uid, ids, *args):
503 """Set applicant priority to normal
504 """
505 return self.set_priority(cr, uid, ids, '3')
506
507 def get_empty_list_help(self, cr, uid, help, context=None):517 def get_empty_list_help(self, cr, uid, help, context=None):
508 context['empty_list_help_model'] = 'hr.job'518 context['empty_list_help_model'] = 'hr.job'
509 context['empty_list_help_id'] = context.get('default_job_id', None)519 context['empty_list_help_id'] = context.get('default_job_id', None)
510520
=== modified file 'hr_recruitment/hr_recruitment_data.xml'
--- hr_recruitment/hr_recruitment_data.xml 2014-02-12 09:56:06 +0000
+++ hr_recruitment/hr_recruitment_data.xml 2014-05-07 10:11:23 +0000
@@ -92,30 +92,54 @@
92 <record model="hr.recruitment.stage" id="stage_job1">92 <record model="hr.recruitment.stage" id="stage_job1">
93 <field name="name">Initial Qualification</field>93 <field name="name">Initial Qualification</field>
94 <field name="sequence">1</field>94 <field name="sequence">1</field>
95 <field name="legend_star1">Average</field>
96 <field name="legend_star2">Correspond to the job requirements</field>
97 <field name="legend_star3">Nice to have skills</field>
98 <field name="legend_star4">Excellent</field>
95 </record>99 </record>
96 <record model="hr.recruitment.stage" id="stage_job2">100 <record model="hr.recruitment.stage" id="stage_job2">
97 <field name="name">First Interview</field>101 <field name="name">First Interview</field>
98 <field name="template_id" ref="applicant_interest"/>102 <field name="template_id" ref="applicant_interest"/>
99 <field name="sequence">2</field>103 <field name="sequence">2</field>
104 <field name="legend_star1">Average</field>
105 <field name="legend_star2">Good</field>
106 <field name="legend_star3">Very Good</field>
107 <field name="legend_star4">Excellent</field>
100 </record>108 </record>
101 <record model="hr.recruitment.stage" id="stage_job3">109 <record model="hr.recruitment.stage" id="stage_job3">
102 <field name="name">Second Interview</field>110 <field name="name">Second Interview</field>
103 <field name="sequence">3</field>111 <field name="sequence">3</field>
112 <field name="legend_star1">Average</field>
113 <field name="legend_star2">Good at required skills</field>
114 <field name="legend_star3">Expert in required skills</field>
115 <field name="legend_star4">Excellent in all the skills</field>
104 </record>116 </record>
105 <record model="hr.recruitment.stage" id="stage_job4">117 <record model="hr.recruitment.stage" id="stage_job4">
106 <field name="name">Contract Proposed</field>118 <field name="name">Contract Proposed</field>
107 <field name="sequence">4</field>119 <field name="sequence">4</field>
120 <field name="legend_star1">Average</field>
121 <field name="legend_star2">Good</field>
122 <field name="legend_star3">Very Good</field>
123 <field name="legend_star4">Excellent</field>
108 </record>124 </record>
109 <record model="hr.recruitment.stage" id="stage_job5">125 <record model="hr.recruitment.stage" id="stage_job5">
110 <field name="name">Contract Signed</field>126 <field name="name">Contract Signed</field>
111 <field name="sequence">5</field>127 <field name="sequence">5</field>
112 <field name="fold" eval="True"/>128 <field name="fold" eval="True"/>
129 <field name="legend_star1">Average</field>
130 <field name="legend_star2">Good</field>
131 <field name="legend_star3">Very Good</field>
132 <field name="legend_star4">Excellent</field>
113 </record>133 </record>
114 <record model="hr.recruitment.stage" id="stage_job6">134 <record model="hr.recruitment.stage" id="stage_job6">
115 <field name="name">Refused</field>135 <field name="name">Refused</field>
116 <field name="sequence">6</field>136 <field name="sequence">6</field>
117 <field name="template_id" ref="applicant_refuse"/>137 <field name="template_id" ref="applicant_refuse"/>
118 <field name="fold" eval="True"/>138 <field name="fold" eval="True"/>
139 <field name="legend_star1">Average</field>
140 <field name="legend_star2">Good</field>
141 <field name="legend_star3">Very Good</field>
142 <field name="legend_star4">Excellent</field>
119 </record>143 </record>
120144
121 <record id="mail_alias_jobs" model="mail.alias">145 <record id="mail_alias_jobs" model="mail.alias">
122146
=== modified file 'hr_recruitment/hr_recruitment_demo.xml'
--- hr_recruitment/hr_recruitment_demo.xml 2014-02-12 09:56:06 +0000
+++ hr_recruitment/hr_recruitment_demo.xml 2014-05-07 10:11:23 +0000
@@ -75,7 +75,7 @@
75 <field name="type_id" ref="degree_licenced"/>75 <field name="type_id" ref="degree_licenced"/>
76 <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/>76 <field name="categ_ids" eval="[(6,0,[ref('tag_applicant_reserve')])]"/>
77 <field name="user_id" ref="base.user_root"/>77 <field name="user_id" ref="base.user_root"/>
78 <field name="priority">4</field>78 <field name="priority">2</field>
79 <field name="partner_name">David Armstrong</field>79 <field name="partner_name">David Armstrong</field>
80 <field name="stage_id" ref="stage_job2"/>80 <field name="stage_id" ref="stage_job2"/>
81 <field name="partner_phone">33968745</field>81 <field name="partner_phone">33968745</field>
8282
=== modified file 'hr_recruitment/hr_recruitment_view.xml'
--- hr_recruitment/hr_recruitment_view.xml 2014-04-15 15:01:46 +0000
+++ hr_recruitment/hr_recruitment_view.xml 2014-05-07 10:11:23 +0000
@@ -130,7 +130,7 @@
130 <field name="date_action"/>130 <field name="date_action"/>
131 <field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/>131 <field name="title_action" class="oe_inline" placeholder="e.g. Call for interview"/>
132 </div>132 </div>
133 <field name="priority"/>133 <field name="priority" widget="priority"/>
134 <field name="source_id"/>134 <field name="source_id"/>
135 <field name="reference"/>135 <field name="reference"/>
136 </group>136 </group>
@@ -246,7 +246,7 @@
246 <field name="model">hr.applicant</field>246 <field name="model">hr.applicant</field>
247 <field name="arch" type="xml">247 <field name="arch" type="xml">
248 <kanban default_group_by="stage_id">248 <kanban default_group_by="stage_id">
249 <field name="stage_id"/>249 <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
250 <field name="color"/>250 <field name="color"/>
251 <field name="priority"/>251 <field name="priority"/>
252 <field name="survey"/>252 <field name="survey"/>
@@ -294,21 +294,16 @@
294 </div>294 </div>
295 <div style="width:240px"><field name="categ_ids"/></div>295 <div style="width:240px"><field name="categ_ids"/></div>
296 <div class="oe_kanban_right">296 <div class="oe_kanban_right">
297 <t t-set="priority" t-value="record.priority.raw_value || 5"/>297 <table>
298 <a type="object" name="set_priority" args="['3']" t-if="priority gt 3">298 <tr>
299 <img src="/web/static/src/img/icons/star-off.png" width="16" height="16" title="Good"/>299 <td groups="base.group_user">
300 </a>300 <field name="priority" widget="priority"/>
301 <a type="object" name="set_priority" args="['5']" t-if="priority lte 3">301 </td>
302 <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16" title="Good"/>302 <td>
303 </a>303 <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"/>
304 <a type="object" name="set_priority" args="['2']">304 </td>
305 <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16" title="Very Good"/>305 </tr>
306 </a>306 </table>
307 <a type="object" name="set_priority" args="['1']">
308 <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16" title="Excellent"/>
309 </a>
310 <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"/>
311
312 </div>307 </div>
313 <div class="oe_kanban_footer_left" style="margin-top:5px;">308 <div class="oe_kanban_footer_left" style="margin-top:5px;">
314 <t t-raw="record.message_summary.raw_value"/>309 <t t-raw="record.message_summary.raw_value"/>
@@ -553,6 +548,52 @@
553 <field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]"/>548 <field name="template_id" domain= "[('model_id.model', '=', 'hr.applicant')]"/>
554 </group>549 </group>
555 </group>550 </group>
551 <separator string="Legend"/>
552 <p>The legend will appear as tooltip of each column of the opportunities pipe.</p>
553 <div>
554 <group col="3">
555 <div width="57">
556 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
557 </div>
558 <div width="400">
559 <field name="legend_star1"/>
560 </div>
561 <div></div>
562 </group>
563 </div>
564 <div>
565 <group col="3">
566 <div width="57">
567 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
568 </div>
569 <div width="400">
570 <field name="legend_star2"/>
571 </div>
572 <div></div>
573 </group>
574 </div>
575 <div>
576 <group col="3">
577 <div width="57">
578 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">777</span>
579 </div>
580 <div width="400">
581 <field name="legend_star3"/>
582 </div>
583 <div></div>
584 </group>
585 </div>
586 <div>
587 <group col="3">
588 <div width="57">
589 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7777</span>
590 </div>
591 <div width="400">
592 <field name="legend_star4"/>
593 </div>
594 <div></div>
595 </group>
596 </div>
556 <separator string="Requirements"/>597 <separator string="Requirements"/>
557 <field name="requirements"/>598 <field name="requirements"/>
558 </sheet>599 </sheet>
559600
=== modified file 'project/project.py'
--- project/project.py 2014-04-10 14:51:31 +0000
+++ project/project.py 2014-05-07 10:11:23 +0000
@@ -34,6 +34,29 @@
34 _name = 'project.task.type'34 _name = 'project.task.type'
35 _description = 'Task Stage'35 _description = 'Task Stage'
36 _order = 'sequence'36 _order = 'sequence'
37
38 def _get_tooltips(self, cr, uid, ids, field, args, context=None):
39 res = {}
40 for rec in self.read(cr, uid, ids, ['legend_blocked', 'legend_done', 'legend_star1','legend_star2','description'],context=context):
41 value = ""
42 star = "<img src='/web/static/src/img/icons/star-on.png'/>"
43 if rec['legend_blocked']:
44 img = "<img src='/web/static/src/img/icons/gtk-no.png'/>"
45 value += img +' '+ rec['legend_blocked'] + "<br/>"
46 if rec['legend_done']:
47 img = "<img src='/web/static/src/img/icons/gtk-yes.png'/> "
48 value += img +' '+ rec['legend_done'] + "<br/>"
49 if rec['legend_star1']:
50 value += star +' '+ rec['legend_star1'] + "<br/>"
51 if rec['legend_star2']:
52 value += star + star +' '+ rec['legend_star2'] + "<br/>"
53 if rec['description']:
54 value += rec['description']
55 tooltip = {'tooltip': value}
56 tooltip.update(rec)
57 res[rec['id']] = tooltip
58 return res
59
37 _columns = {60 _columns = {
38 'name': fields.char('Stage Name', required=True, size=64, translate=True),61 'name': fields.char('Stage Name', required=True, size=64, translate=True),
39 'description': fields.text('Description'),62 'description': fields.text('Description'),
@@ -41,6 +64,16 @@
41 'case_default': fields.boolean('Default for New Projects',64 'case_default': fields.boolean('Default for New Projects',
42 help="If you check this field, this stage will be proposed by default on each new project. It will not assign this stage to existing projects."),65 help="If you check this field, this stage will be proposed by default on each new project. It will not assign this stage to existing projects."),
43 'project_ids': fields.many2many('project.project', 'project_task_type_rel', 'type_id', 'project_id', 'Projects'),66 'project_ids': fields.many2many('project.project', 'project_task_type_rel', 'type_id', 'project_id', 'Projects'),
67 'kanban_column_tooltip': fields.function(_get_tooltips, string='Tooltips', type="char", help="This tooltips will display on kanban stage header"),
68 'legend_blocked': fields.char('Legend Red', help='This tooltip will appear on kanban view column header.'),
69 'legend_done':fields.char('Legend Green', help='This tooltip will appear on kanban view column header.'),
70 'legend_star1':fields.char('Legend Star', help='This tooltip will appear on kanban view column header.'),
71 'legend_star2':fields.char('Legend Star2', help='This tooltip will appear on kanban view column header.'),
72 'type': fields.selection([('task', 'Task'),
73 ('issue', 'Issue'),
74 ('both', 'Both')],
75 string='Type', size=16, required=True,
76 help="This field is used to distinguish stages related to Issues and Tasks, or to specify stages available for both types."),
44 'fold': fields.boolean('Folded in Kanban View',77 'fold': fields.boolean('Folded in Kanban View',
45 help='This stage is folded in the kanban view when'78 help='This stage is folded in the kanban view when'
46 'there are no records in that stage to display.'),79 'there are no records in that stage to display.'),
@@ -54,6 +87,9 @@
5487
55 _defaults = {88 _defaults = {
56 'sequence': 1,89 'sequence': 1,
90 'fold': False,
91 'case_default': True,
92 'type': 'both',
57 'project_ids': _get_default_project_ids,93 'project_ids': _get_default_project_ids,
58 }94 }
59 _order = 'sequence'95 _order = 'sequence'
@@ -543,9 +579,19 @@
543 # if alias_model has been changed, update alias_model_id accordingly579 # if alias_model has been changed, update alias_model_id accordingly
544 if vals.get('alias_model'):580 if vals.get('alias_model'):
545 model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', vals.get('alias_model', 'project.task'))])581 model_ids = self.pool.get('ir.model').search(cr, uid, [('model', '=', vals.get('alias_model', 'project.task'))])
546 vals.update(alias_model_id=model_ids[0])582 if model_ids and len(model_ids):
583 vals.update(alias_model_id=model_ids[0])
547 return super(project, self).write(cr, uid, ids, vals, context=context)584 return super(project, self).write(cr, uid, ids, vals, context=context)
548585
586 def project_tasks_action(self, cr, uid, ids, context=None):
587 data_obj = self.pool.get('ir.model.data')
588 action_obj =self.pool.get('ir.actions.act_window')
589
590 action_id = data_obj.get_object_reference(cr, uid, 'project', 'act_project_project_2_project_task_all')[1]
591 action = action_obj.read(cr, uid, action_id, [], context)
592 res = self.read(cr, uid, ids, ['task_label'], context)[0]
593 action['name'] = res['task_label']
594 return action
549595
550class task(osv.osv):596class task(osv.osv):
551 _name = "project.task"597 _name = "project.task"
@@ -565,6 +611,7 @@
565 },611 },
566 'kanban_state': {612 'kanban_state': {
567 'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',613 'project.mt_task_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',
614 'project.mt_task_done': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done',
568 },615 },
569 }616 }
570617
@@ -583,7 +630,7 @@
583 def _get_default_stage_id(self, cr, uid, context=None):630 def _get_default_stage_id(self, cr, uid, context=None):
584 """ Gives default stage_id """631 """ Gives default stage_id """
585 project_id = self._get_default_project_id(cr, uid, context=context)632 project_id = self._get_default_project_id(cr, uid, context=context)
586 return self.stage_find(cr, uid, [], project_id, [('fold', '=', False)], context=context)633 return self.stage_find(cr, uid, [], project_id, [('sequence', '=', 1),('type', 'in',['task','both'])], context=context)
587634
588 def _resolve_project_id_from_context(self, cr, uid, context=None):635 def _resolve_project_id_from_context(self, cr, uid, context=None):
589 """ Returns ID of project based on the value of 'default_project_id'636 """ Returns ID of project based on the value of 'default_project_id'
@@ -611,7 +658,9 @@
611 project_id = self._resolve_project_id_from_context(cr, uid, context=context)658 project_id = self._resolve_project_id_from_context(cr, uid, context=context)
612 if project_id:659 if project_id:
613 search_domain += ['|', ('project_ids', '=', project_id)]660 search_domain += ['|', ('project_ids', '=', project_id)]
614 search_domain += [('id', 'in', ids)]661 search_domain += [('id', 'in', ids),('type', 'in', ['task', 'both'])]
662 else:
663 search_domain += [('id', 'in', ids)]
615 stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)664 stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
616 result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)665 result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
617 # restore order of the search666 # restore order of the search
@@ -740,18 +789,18 @@
740 '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."),789 '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."),
741 'name': fields.char('Task Summary', track_visibility='onchange', size=128, required=True, select=True),790 'name': fields.char('Task Summary', track_visibility='onchange', size=128, required=True, select=True),
742 'description': fields.text('Description'),791 'description': fields.text('Description'),
743 'priority': fields.selection([('4','Very Low'), ('3','Low'), ('2','Medium'), ('1','Important'), ('0','Very important')], 'Priority', select=True),792 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True),
744 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),793 'sequence': fields.integer('Sequence', select=True, help="Gives the sequence order when displaying a list of tasks."),
745 'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True,794 'stage_id': fields.many2one('project.task.type', 'Stage', track_visibility='onchange', select=True,
746 domain="[('project_ids', '=', project_id)]"),795 domain="[('project_ids', '=', project_id), ('type', 'in', ['task','both'])]"),
747 'categ_ids': fields.many2many('project.category', string='Tags'),796 'categ_ids': fields.many2many('project.category', string='Tags'),
748 'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',797 'kanban_state': fields.selection([('normal', 'In Progress'),('blocked', 'Blocked'),('done', 'Ready')], 'Kanban State',
749 track_visibility='onchange',798 track_visibility='onchange',
750 help="A task's kanban state indicates special situations affecting it:\n"799 help="A task's kanban state indicates special situations affecting it:\n"
751 " * Normal is the default situation\n"800 " * Normal is the default situation\n"
752 " * Blocked indicates something is preventing the progress of this task\n"801 " * Blocked indicates something is preventing the progress of this task\n"
753 " * Ready for next stage indicates the task is ready to be pulled to the next stage",802 " * Ready for next stage indicates the task is ready to be pulled to the next stage",
754 readonly=True, required=False),803 required=False),
755 'create_date': fields.datetime('Create Date', readonly=True, select=True),804 'create_date': fields.datetime('Create Date', readonly=True, select=True),
756 '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)805 '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)
757 'date_start': fields.datetime('Starting Date',select=True),806 'date_start': fields.datetime('Starting Date',select=True),
@@ -799,7 +848,7 @@
799 'project_id': _get_default_project_id,848 'project_id': _get_default_project_id,
800 'date_last_stage_update': fields.datetime.now,849 'date_last_stage_update': fields.datetime.now,
801 'kanban_state': 'normal',850 'kanban_state': 'normal',
802 'priority': '2',851 'priority': '1',
803 'progress': 0,852 'progress': 0,
804 'sequence': 10,853 'sequence': 10,
805 'active': True,854 'active': True,
@@ -808,17 +857,7 @@
808 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx),857 'partner_id': lambda self, cr, uid, ctx=None: self._get_default_partner(cr, uid, context=ctx),
809 }858 }
810 _order = "priority, sequence, date_start, name, id"859 _order = "priority, sequence, date_start, name, id"
811860
812 def set_high_priority(self, cr, uid, ids, *args):
813 """Set task priority to high
814 """
815 return self.write(cr, uid, ids, {'priority' : '0'})
816
817 def set_normal_priority(self, cr, uid, ids, *args):
818 """Set task priority to normal
819 """
820 return self.write(cr, uid, ids, {'priority' : '2'})
821
822 def _check_recursion(self, cr, uid, ids, context=None):861 def _check_recursion(self, cr, uid, ids, context=None):
823 for id in ids:862 for id in ids:
824 visited_branch = set()863 visited_branch = set()
@@ -1003,16 +1042,6 @@
1003 def set_remaining_time_10(self, cr, uid, ids, context=None):1042 def set_remaining_time_10(self, cr, uid, ids, context=None):
1004 return self.set_remaining_time(cr, uid, ids, 10.0, context)1043 return self.set_remaining_time(cr, uid, ids, 10.0, context)
10051044
1006 def set_kanban_state_blocked(self, cr, uid, ids, context=None):
1007 return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
1008
1009 def set_kanban_state_normal(self, cr, uid, ids, context=None):
1010 return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
1011
1012 def set_kanban_state_done(self, cr, uid, ids, context=None):
1013 self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
1014 return False
1015
1016 def _store_history(self, cr, uid, ids, context=None):1045 def _store_history(self, cr, uid, ids, context=None):
1017 for task in self.browse(cr, uid, ids, context=context):1046 for task in self.browse(cr, uid, ids, context=context):
1018 self.pool.get('project.task.history').create(cr, uid, {1047 self.pool.get('project.task.history').create(cr, uid, {
@@ -1193,7 +1222,11 @@
1193 _columns = {1222 _columns = {
1194 'use_tasks': fields.boolean('Tasks',help="If checked, this contract will be available in the project menu and you will be able to manage tasks or track issues"),1223 'use_tasks': fields.boolean('Tasks',help="If checked, this contract will be available in the project menu and you will be able to manage tasks or track issues"),
1195 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),1224 'company_uom_id': fields.related('company_id', 'project_time_mode_id', type='many2one', relation='product.uom'),
1225 'task_label': fields.char('Use Task as', size=128, help="Gives label to tasks on project's kanaban view.", required=True)
1196 }1226 }
1227 _defaults = {
1228 'task_label': 'Tasks'
1229 }
11971230
1198 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):1231 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
1199 res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, date_start=date_start, context=context)1232 res = super(account_analytic_account, self).on_change_template(cr, uid, ids, template_id, date_start=date_start, context=context)
12001233
=== modified file 'project/project_data.xml'
--- project/project_data.xml 2014-02-21 11:27:04 +0000
+++ project/project_data.xml 2014-05-07 10:11:23 +0000
@@ -31,32 +31,56 @@
31 <field name="sequence">1</field>31 <field name="sequence">1</field>
32 <field name="name">Analysis</field>32 <field name="name">Analysis</field>
33 <field name="case_default" eval="True"/>33 <field name="case_default" eval="True"/>
34 <field name="legend_blocked">There is a problem in analysis.</field>
35 <field name="legend_done">Ready for the next stage.</field>
36 <field name="legend_star1">High priority for the analysis.</field>
37 <field name="legend_star2">Highest priority for the analysis.</field>
34 </record>38 </record>
35 <record id="project_tt_specification" model="project.task.type">39 <record id="project_tt_specification" model="project.task.type">
36 <field name="sequence">10</field>40 <field name="sequence">10</field>
37 <field name="name">Specification</field>41 <field name="name">Specification</field>
38 <field name="case_default" eval="True"/>42 <field name="case_default" eval="True"/>
43 <field name="legend_blocked">Need more info about customer’s needs.</field>
44 <field name="legend_done">Ready for the next stage.</field>
45 <field name="legend_star1">High priority for the specification.</field>
46 <field name="legend_star2">Highest priority for the specification.</field>
39 </record>47 </record>
40 <record id="project_tt_design" model="project.task.type">48 <record id="project_tt_design" model="project.task.type">
41 <field name="sequence">11</field>49 <field name="sequence">11</field>
42 <field name="name">Design</field>50 <field name="name">Design</field>
43 <field name="case_default" eval="True"/>51 <field name="case_default" eval="True"/>
52 <field name="legend_blocked">Design is not valid.</field>
53 <field name="legend_done">Ready for the next stage.</field>
54 <field name="legend_star1">High priority for the design.</field>
55 <field name="legend_star2">Highest priority for the design.</field>
44 </record>56 </record>
45 <record id="project_tt_development" model="project.task.type">57 <record id="project_tt_development" model="project.task.type">
46 <field name="sequence">12</field>58 <field name="sequence">12</field>
47 <field name="name">Development</field>59 <field name="name">Development</field>
48 <field name="case_default" eval="True"/>60 <field name="case_default" eval="True"/>
61 <field name="legend_blocked">Need help from the specification team.</field>
62 <field name="legend_done">Ready for the next stage.</field>
63 <field name="legend_star1">High priority for the development.</field>
64 <field name="legend_star2">Highest priority for the development.</field>
49 </record>65 </record>
50 <record id="project_tt_testing" model="project.task.type">66 <record id="project_tt_testing" model="project.task.type">
51 <field name="sequence">13</field>67 <field name="sequence">13</field>
52 <field name="name">Testing</field>68 <field name="name">Testing</field>
53 <field name="case_default" eval="True"/>69 <field name="case_default" eval="True"/>
70 <field name="legend_blocked">Test is failed.</field>
71 <field name="legend_done">Test result is achieved.</field>
72 <field name="legend_star1">High priority for the testing.</field>
73 <field name="legend_star2">Highest priority for the testing.</field>
54 </record>74 </record>
55 <record id="project_tt_merge" model="project.task.type">75 <record id="project_tt_merge" model="project.task.type">
56 <field name="sequence">14</field>76 <field name="sequence">14</field>
57 <field name="name">Merge</field>77 <field name="name">Merge</field>
58 <field name="case_default" eval="False"/>78 <field name="case_default" eval="False"/>
59 <field name="fold" eval="True"/>79 <field name="fold" eval="True"/>
80 <field name="legend_blocked">TConflict in any file.</field>
81 <field name="legend_done">Ready for the next stage.</field>
82 <field name="legend_star1">High priority for the merging.</field>
83 <field name="legend_star2">Highest priority for the merging.</field>
60 </record>84 </record>
61 <record id="project_tt_deployment" model="project.task.type">85 <record id="project_tt_deployment" model="project.task.type">
62 <field name="sequence">20</field>86 <field name="sequence">20</field>
@@ -69,6 +93,9 @@
69 <field name="name">Cancelled</field>93 <field name="name">Cancelled</field>
70 <field name="case_default" eval="True"/>94 <field name="case_default" eval="True"/>
71 <field name="fold" eval="True"/>95 <field name="fold" eval="True"/>
96 <field name="legend_done">Ready to reopen.</field>
97 <field name="legend_star1">High priority for the reopen.</field>
98 <field name="legend_star2">Highest priority for the reopen.</field>
72 </record>99 </record>
73 </data>100 </data>
74101
@@ -93,6 +120,12 @@
93 <field name="default" eval="False"/>120 <field name="default" eval="False"/>
94 <field name="description">Task blocked</field>121 <field name="description">Task blocked</field>
95 </record>122 </record>
123 <record id="mt_project_task_done" model="mail.message.subtype">
124 <field name="name">Task Done</field>
125 <field name="res_model">project.task</field>
126 <field name="default" eval="False"/>
127 <field name="description">Task Done</field>
128 </record>
96 <record id="mt_task_stage" model="mail.message.subtype">129 <record id="mt_task_stage" model="mail.message.subtype">
97 <field name="name">Stage Changed</field>130 <field name="name">Stage Changed</field>
98 <field name="res_model">project.task</field>131 <field name="res_model">project.task</field>
99132
=== modified file 'project/project_demo.xml'
--- project/project_demo.xml 2013-11-27 15:32:57 +0000
+++ project/project_demo.xml 2014-05-07 10:11:23 +0000
@@ -67,6 +67,7 @@
67 <field name="alias_model">project.task</field>67 <field name="alias_model">project.task</field>
68 <field name="privacy_visibility">employees</field>68 <field name="privacy_visibility">employees</field>
69 <field name="members" eval="[(4, ref('base.user_root')), (4, ref('base.user_demo'))]"/>69 <field name="members" eval="[(4, ref('base.user_root')), (4, ref('base.user_demo'))]"/>
70 <field name="task_label">Trainings</field>
70 </record>71 </record>
7172
72 <record id="project_project_3" model="project.project">73 <record id="project_project_3" model="project.project">
@@ -82,6 +83,7 @@
82 <field name="alias_model">project.task</field>83 <field name="alias_model">project.task</field>
83 <field name="privacy_visibility">employees</field>84 <field name="privacy_visibility">employees</field>
84 <field name="members" eval="[(4, ref('base.user_root')), (4,ref('base.user_demo'))]"/>85 <field name="members" eval="[(4, ref('base.user_root')), (4,ref('base.user_demo'))]"/>
86 <field name="task_label">Designs</field>
85 </record>87 </record>
8688
87 <record id="project_project_4" model="project.project">89 <record id="project_project_4" model="project.project">
@@ -98,6 +100,7 @@
98 <field name="members" eval="[(6, 0, [100 <field name="members" eval="[(6, 0, [
99 ref('base.user_root'),101 ref('base.user_root'),
100 ref('base.user_demo')])]"/>102 ref('base.user_demo')])]"/>
103 <field name="task_label">Databases</field>
101 </record>104 </record>
102105
103 <record id="project_project_5" model="project.project">106 <record id="project_project_5" model="project.project">
@@ -110,7 +113,7 @@
110 <field name="planned_hours" eval="40.0"/>113 <field name="planned_hours" eval="40.0"/>
111 <field name="remaining_hours" eval="40.0"/>114 <field name="remaining_hours" eval="40.0"/>
112 <field name="user_id" ref="base.user_demo"/>115 <field name="user_id" ref="base.user_demo"/>
113 <field name="priority">4</field>116 <field name="priority">0</field>
114 <field name="project_id" ref="project.project_project_1"/>117 <field name="project_id" ref="project.project_project_1"/>
115 <field name="name">Prepare Requirements Document</field>118 <field name="name">Prepare Requirements Document</field>
116 <field name="stage_id" ref="project_tt_analysis"/>119 <field name="stage_id" ref="project_tt_analysis"/>
@@ -120,7 +123,7 @@
120 <field name="planned_hours" eval="32.0"/>123 <field name="planned_hours" eval="32.0"/>
121 <field name="remaining_hours" eval="32.0"/>124 <field name="remaining_hours" eval="32.0"/>
122 <field name="user_id" ref="base.user_demo"/>125 <field name="user_id" ref="base.user_demo"/>
123 <field name="priority">4</field>126 <field name="priority">0</field>
124 <field name="project_id" ref="project.project_project_1"/>127 <field name="project_id" ref="project.project_project_1"/>
125 <field name="name">Make SRS</field>128 <field name="name">Make SRS</field>
126 <field name="stage_id" ref="project_tt_specification"/>129 <field name="stage_id" ref="project_tt_specification"/>
@@ -129,7 +132,7 @@
129 <field name="planned_hours" eval="10.0"/>132 <field name="planned_hours" eval="10.0"/>
130 <field name="remaining_hours" eval="10.0"/>133 <field name="remaining_hours" eval="10.0"/>
131 <field name="user_id" ref="base.user_root"/>134 <field name="user_id" ref="base.user_root"/>
132 <field name="priority">4</field>135 <field name="priority">0</field>
133 <field name="project_id" ref="project.project_project_1"/>136 <field name="project_id" ref="project.project_project_1"/>
134 <field name="name">Budget Planning</field>137 <field name="name">Budget Planning</field>
135 <field name="date_deadline" eval="time.strftime('%Y-%m-24')"/>138 <field name="date_deadline" eval="time.strftime('%Y-%m-24')"/>
@@ -140,7 +143,7 @@
140 <field name="planned_hours" eval="60.0"/>143 <field name="planned_hours" eval="60.0"/>
141 <field name="remaining_hours" eval="60.0"/>144 <field name="remaining_hours" eval="60.0"/>
142 <field name="user_id" ref="base.user_demo"/>145 <field name="user_id" ref="base.user_demo"/>
143 <field name="priority">4</field>146 <field name="priority">0</field>
144 <field name="project_id" ref="project.project_project_1"/>147 <field name="project_id" ref="project.project_project_1"/>
145 <field name="name">Develop module for Sale Management</field>148 <field name="name">Develop module for Sale Management</field>
146 <field name="description">Use the account_budget module</field>149 <field name="description">Use the account_budget module</field>
147150
=== modified file 'project/project_view.xml'
--- project/project_view.xml 2014-04-15 12:14:04 +0000
+++ project/project_view.xml 2014-05-07 10:11:23 +0000
@@ -87,14 +87,14 @@
87 <h1>87 <h1>
88 <field name="name" string="Project Name"/>88 <field name="name" string="Project Name"/>
89 </h1>89 </h1>
90 <div name="options_active">90 <div name="options_active" class="oe_inline oe_left">
91 <field name="use_tasks" class="oe_inline"/>91 <field name="use_tasks" class="oe_from_boolean_align"/>
92 <label for="use_tasks"/>92 <label for="task_label" class="oe_edit_only"/>
93 <b><field name="task_label" class="oe_inline"/></b>
93 </div>94 </div>
94 </div>95 </div>
95 <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">96 <div class="oe_right oe_button_box" name="buttons" groups="base.group_user">
96 <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_tasks','=', 0)]}" 97 <button class="oe_inline oe_stat_button" type="object" attrs="{'invisible':[('use_tasks','=', 0)]}" name="project_tasks_action" icon="fa-tasks">
97 name="%(act_project_project_2_project_task_all)d" icon="fa-tasks">
98 <field string="Tasks" name="task_count" widget="statinfo"/>98 <field string="Tasks" name="task_count" widget="statinfo"/>
99 </button>99 </button>
100 <button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o">100 <button class="oe_inline oe_stat_button" name="attachment_tree_view" type="object" icon="fa-files-o">
@@ -125,9 +125,8 @@
125 </div>125 </div>
126 <label for="alias_model" string="Incoming Emails create"/>126 <label for="alias_model" string="Incoming Emails create"/>
127 <field name="alias_model" class="oe_inline" nolabel="1"/>127 <field name="alias_model" class="oe_inline" nolabel="1"/>
128 <field name="alias_contact" class="oe_inline"128 <field name="alias_contact" class="oe_inline" string="Accept Emails From"/>
129 string="Accept Emails From"/>129 </group>
130 </group>
131 </group>130 </group>
132 <notebook>131 <notebook>
133 <page string="Team" name="team">132 <page string="Team" name="team">
@@ -170,7 +169,13 @@
170 </group>169 </group>
171 </page>170 </page>
172 <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages">171 <page string="Project Stages" attrs="{'invisible': [('use_tasks', '=', False)]}" name="project_stages">
173 <field name="type_ids"/>172 <field name="type_ids">
173 <tree>
174 <field name="sequence" widget="handle"/>
175 <field name="name"/>
176 <field name="kanban_column_tooltip" widget="tooltiphtml"/>
177 </tree>
178 </field>
174 </page>179 </page>
175 </notebook>180 </notebook>
176 </sheet>181 </sheet>
@@ -264,9 +269,9 @@
264 <span class="oe_e oe_e_alias">%%</span><small><field name="alias_id"/></small>269 <span class="oe_e oe_e_alias">%%</span><small><field name="alias_id"/></small>
265 </div>270 </div>
266 <div class="oe_kanban_project_list">271 <div class="oe_kanban_project_list">
267 <a t-if="record.use_tasks.raw_value" name="%(act_project_project_2_project_task_all)d" type="action" style="margin-right: 10px">272 <a t-if="record.use_tasks.raw_value" name="project_tasks_action" type="object" style="margin-right: 10px">
268 <t t-raw="record.task_ids.raw_value.length"/> Tasks273 <span><field name="task_count"/> <field name="task_label"/></span>
269 </a>274 </a>
270 </div>275 </div>
271 <div class="oe_kanban_project_list">276 <div class="oe_kanban_project_list">
272 <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>277 <a t-if="record.doc_count.raw_value" name="attachment_tree_view" type="object" style="margin-right: 10px"> <field name="doc_count"/> Documents</a>
@@ -379,11 +384,10 @@
379 <sheet string="Task">384 <sheet string="Task">
380 <h1>385 <h1>
381 <field name="name" placeholder="Task summary..." class="oe_inline"/>386 <field name="name" placeholder="Task summary..." class="oe_inline"/>
382 <field name="kanban_state" invisible='1'/>
383 <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"/>
384 <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"/>
385 <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"/>
386 </h1>387 </h1>
388 <div class="oe_right">
389 <field name="kanban_state" class="oe_inline" widget="dropdown_selection"/>
390 </div>
387 <group>391 <group>
388 <group>392 <group>
389 <field name="project_id" domain="[('state', '!=', 'close')]" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>393 <field name="project_id" domain="[('state', '!=', 'close')]" on_change="onchange_project(project_id)" context="{'default_use_tasks':1}"/>
@@ -444,7 +448,7 @@
444 </page>448 </page>
445 <page string="Extra Info">449 <page string="Extra Info">
446 <group col="4">450 <group col="4">
447 <field name="priority" groups="base.group_user"/>451 <field name="priority" groups="base.group_user" widget="priority"/>
448 <field name="sequence"/>452 <field name="sequence"/>
449 <field name="partner_id"/>453 <field name="partner_id"/>
450 <field name="company_id" groups="base.group_multi_company" widget="selection"/>454 <field name="company_id" groups="base.group_multi_company" widget="selection"/>
@@ -477,7 +481,7 @@
477 <kanban default_group_by="stage_id" >481 <kanban default_group_by="stage_id" >
478 <field name="color"/>482 <field name="color"/>
479 <field name="priority"/>483 <field name="priority"/>
480 <field name="stage_id"/>484 <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
481 <field name="user_id"/>485 <field name="user_id"/>
482 <field name="user_email"/>486 <field name="user_email"/>
483 <field name="description"/>487 <field name="description"/>
@@ -515,16 +519,6 @@
515 <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>519 <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>
516 <span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>520 <span t-attf-class="#{red || ''}"><i><field name="date_deadline"/></i></span>
517 </div>521 </div>
518 <div class="oe_kanban_bottom_right">
519 <t groups="base.group_user">
520 <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>
521 <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>
522 <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>
523 <a t-if="record.priority.raw_value > 0" type="object" string="Normal" name="set_high_priority" class="oe_e oe_star_off">7</a>
524 <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>
525 </t>
526 <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"/>
527 </div>
528 <div class="oe_kanban_footer_left">522 <div class="oe_kanban_footer_left">
529 <span groups="project.group_time_work_estimation_tasks" title="Remaining hours">523 <span groups="project.group_time_work_estimation_tasks" title="Remaining hours">
530 <span class="oe_e">N</span>524 <span class="oe_e">N</span>
@@ -535,6 +529,21 @@
535 <t t-raw="record.message_summary.raw_value"/>529 <t t-raw="record.message_summary.raw_value"/>
536 <field name="categ_ids"/>530 <field name="categ_ids"/>
537 </div>531 </div>
532 <div class="oe_kanban_bottom_right">
533 <table>
534 <tr>
535 <td groups="base.group_user">
536 <field name="kanban_state" widget="dropdown_selection"/>
537 </td>
538 <td groups="base.group_user">
539 <field name="priority" widget="priority"/>
540 </td>
541 <td>
542 <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"/>
543 </td>
544 </tr>
545 </table>
546 </div>
538 </div>547 </div>
539 <div class="oe_clear"></div>548 <div class="oe_clear"></div>
540 </div>549 </div>
@@ -609,8 +618,11 @@
609 <field eval="18" name="priority"/>618 <field eval="18" name="priority"/>
610 <field name="arch" type="xml">619 <field name="arch" type="xml">
611 <xpath expr='//div[@name="project"]' position='inside'>620 <xpath expr='//div[@name="project"]' position='inside'>
612 <field name="use_tasks"/>621 <div name="options_active" class="oe_inline oe_left">
613 <label for="use_tasks"/>622 <field name="use_tasks" class="oe_from_boolean_align"/>
623 <label for="task_label" class="oe_edit_only"/>
624 <b><field name="task_label" class="oe_inline"/></b>
625 </div>
614 </xpath>626 </xpath>
615 </field>627 </field>
616 </record>628 </record>
@@ -688,6 +700,7 @@
688 <group>700 <group>
689 <group>701 <group>
690 <field name="name"/>702 <field name="name"/>
703 <field name="type" invisible="1"/>
691 <field name="sequence"/>704 <field name="sequence"/>
692 </group>705 </group>
693 <group>706 <group>
@@ -695,6 +708,53 @@
695 <field name="fold"/>708 <field name="fold"/>
696 </group>709 </group>
697 </group>710 </group>
711 <separator string="Legends"/>
712 <p>The legend will appear as tooltip of each column of the tasks/issues pipe.</p>
713 <div>
714 <group col="3">
715 <div width="35">
716 <span class='status error' title="This tooltip will appear on kanban view column header."/>
717 </div>
718 <div width="400">
719 <field name="legend_blocked" title="This tooltip will appear on kanban view column header."/>
720 </div>
721 <div></div>
722 </group>
723 </div>
724 <div>
725 <group col="3">
726 <div width="35">
727 <span class='status ok'/>
728 </div>
729 <div width="400">
730 <field name="legend_done"/>
731 </div>
732 <div></div>
733 </group>
734 </div>
735 <div>
736 <group col="3">
737 <div width="35">
738 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">7</span>
739 </div>
740 <div width="400">
741 <field name="legend_star1"/>
742 </div>
743 <div></div>
744 </group>
745 </div>
746 <div attrs="{'invisible':[('type','=', 'task')]}">
747 <group col="3">
748 <div width="35">
749 <span class="oe_e oe_star_on" title="This tooltip will appear on kanban view column header.">77</span>
750 </div>
751 <div width="400">
752 <field name="legend_star2"/>
753 </div>
754 <div></div>
755 </group>
756 </div>
757 <separator string="Description"/>
698 <field name="description" placeholder="Add a description..."/>758 <field name="description" placeholder="Add a description..."/>
699 </form>759 </form>
700 </field>760 </field>
@@ -733,7 +793,7 @@
733793
734 <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/>794 <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1" groups="base.group_no_one"/>
735795
736 <menuitem action="open_task_type_form" name="Task Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/>796 <menuitem action="open_task_type_form" name="Project Stages" id="menu_task_types_view" parent="base.menu_project_config_project" sequence="2"/>
737 <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/>797 <menuitem action="open_view_project_all" id="menu_projects" name="Projects" parent="menu_project_management" sequence="1"/>
738798
739799
740800
=== modified file 'project/report/project_report.py'
--- project/report/project_report.py 2014-01-29 15:24:40 +0000
+++ project/report/project_report.py 2014-05-07 10:11:23 +0000
@@ -48,7 +48,7 @@
48 help="Number of Days to Open the task"),48 help="Number of Days to Open the task"),
49 'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True),49 'delay_endings_days': fields.float('Overpassed Deadline', digits=(16,2), readonly=True),
50 'nbr': fields.integer('# of tasks', readonly=True),50 'nbr': fields.integer('# of tasks', readonly=True),
51 'priority': fields.selection([('4', 'Very Low'), ('3', 'Low'), ('2', 'Medium'), ('1', 'Urgent'), ('0', 'Very urgent')],51 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')],
52 string='Priority', readonly=True),52 string='Priority', readonly=True),
53 'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),53 'state': fields.selection([('draft', 'Draft'), ('open', 'In Progress'), ('pending', 'Pending'), ('cancelled', 'Cancelled'), ('done', 'Done')],'Status', readonly=True),
54 'company_id': fields.many2one('res.company', 'Company', readonly=True),54 'company_id': fields.many2one('res.company', 'Company', readonly=True),
5555
=== modified file 'project/static/src/css/project.css'
--- project/static/src/css/project.css 2013-10-27 12:31:04 +0000
+++ project/static/src/css/project.css 2014-05-07 10:11:23 +0000
@@ -62,4 +62,8 @@
62 -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);62 -box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
63}63}
6464
65.openerp .oe_form .oe_from_boolean_align{
66 vertical-align: middle;
67 margin-top: 2px;
68}
6569
6670
=== modified file 'project/static/src/js/project.js'
--- project/static/src/js/project.js 2014-04-17 09:05:15 +0000
+++ project/static/src/js/project.js 2014-05-07 10:11:23 +0000
@@ -42,4 +42,14 @@
42 }42 }
43 },43 },
44 });44 });
45
46 openerp.web.list.TooltipHtml = openerp.web.list.Column.extend({
47 format: function (row_data, options) {
48 if (row_data.kanban_column_tooltip !== undefined){
49 return row_data.kanban_column_tooltip.value.tooltip
50 }
51 }
52 });
53
54 openerp.web.list.columns.add('field.tooltiphtml', 'openerp.web.list.TooltipHtml');
45};55};
4656
=== modified file 'project_issue/project_issue.py'
--- project_issue/project_issue.py 2014-04-10 14:51:31 +0000
+++ project_issue/project_issue.py 2014-05-07 10:11:23 +0000
@@ -57,6 +57,7 @@
57 },57 },
58 'kanban_state': {58 'kanban_state': {
59 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',59 'project_issue.mt_issue_blocked': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'blocked',
60 'project_issue.mt_issue_done': lambda self, cr, uid, obj, ctx=None: obj.kanban_state == 'done',
60 },61 },
61 }62 }
6263
@@ -75,7 +76,7 @@
75 def _get_default_stage_id(self, cr, uid, context=None):76 def _get_default_stage_id(self, cr, uid, context=None):
76 """ Gives default stage_id """77 """ Gives default stage_id """
77 project_id = self._get_default_project_id(cr, uid, context=context)78 project_id = self._get_default_project_id(cr, uid, context=context)
78 return self.stage_find(cr, uid, [], project_id, [('fold', '=', False)], context=context)79 return self.stage_find(cr, uid, [], project_id, [('sequence','=',1),('type','in',['issue','both'])], context=context)
7980
80 def _resolve_project_id_from_context(self, cr, uid, context=None):81 def _resolve_project_id_from_context(self, cr, uid, context=None):
81 """ Returns ID of project based on the value of 'default_project_id'82 """ Returns ID of project based on the value of 'default_project_id'
@@ -108,7 +109,9 @@
108 project_id = self._resolve_project_id_from_context(cr, uid, context=context)109 project_id = self._resolve_project_id_from_context(cr, uid, context=context)
109 if project_id:110 if project_id:
110 search_domain += ['|', ('project_ids', '=', project_id)]111 search_domain += ['|', ('project_ids', '=', project_id)]
111 search_domain += [('id', 'in', ids)]112 search_domain += [('id', 'in', ids),('type', 'in', ['issue','both'])]
113 else:
114 search_domain += [('id', 'in', ids)]
112 # perform search115 # perform search
113 stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)116 stage_ids = stage_obj._search(cr, uid, search_domain, order=order, access_rights_uid=access_rights_uid, context=context)
114 result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)117 result = stage_obj.name_get(cr, access_rights_uid, stage_ids, context=context)
@@ -250,7 +253,7 @@
250 " * Normal is the default situation\n"253 " * Normal is the default situation\n"
251 " * Blocked indicates something is preventing the progress of this issue\n"254 " * Blocked indicates something is preventing the progress of this issue\n"
252 " * Ready for next stage indicates the issue is ready to be pulled to the next stage",255 " * Ready for next stage indicates the issue is ready to be pulled to the next stage",
253 readonly=True, required=False),256 required=False),
254 'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1),257 'email_from': fields.char('Email', size=128, help="These people will receive email.", select=1),
255 '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"),258 '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"),
256 'date_open': fields.datetime('Opened', readonly=True,select=True),259 'date_open': fields.datetime('Opened', readonly=True,select=True),
@@ -260,11 +263,11 @@
260 'date_last_stage_update': fields.datetime('Last Stage Update', select=True),263 'date_last_stage_update': fields.datetime('Last Stage Update', select=True),
261 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),264 'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
262 'categ_ids': fields.many2many('project.category', string='Tags'),265 'categ_ids': fields.many2many('project.category', string='Tags'),
263 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority', select=True),266 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority', select=True),
264 'version_id': fields.many2one('project.issue.version', 'Version'),267 'version_id': fields.many2one('project.issue.version', 'Version'),
265 'stage_id': fields.many2one ('project.task.type', 'Stage',268 'stage_id': fields.many2one ('project.task.type', 'Stage',
266 track_visibility='onchange', select=True,269 track_visibility='onchange', select=True,
267 domain="[('project_ids', '=', project_id)]"),270 domain="[('project_ids', '=', project_id),('type','in',['issue','both'])]"),
268 'project_id': fields.many2one('project.project', 'Project', track_visibility='onchange', select=True),271 'project_id': fields.many2one('project.project', 'Project', track_visibility='onchange', select=True),
269 'duration': fields.float('Duration'),272 'duration': fields.float('Duration'),
270 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),273 'task_id': fields.many2one('project.task', 'Task', domain="[('project_id','=',project_id)]"),
@@ -295,7 +298,7 @@
295 'active': 1,298 'active': 1,
296 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),299 'stage_id': lambda s, cr, uid, c: s._get_default_stage_id(cr, uid, c),
297 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),300 'company_id': lambda s, cr, uid, c: s.pool.get('res.company')._company_default_get(cr, uid, 'crm.helpdesk', context=c),
298 'priority': crm.AVAILABLE_PRIORITIES[2][0],301 'priority': '1',
299 'kanban_state': 'normal',302 'kanban_state': 'normal',
300 'date_last_stage_update': fields.datetime.now,303 'date_last_stage_update': fields.datetime.now,
301 'user_id': lambda obj, cr, uid, context: uid,304 'user_id': lambda obj, cr, uid, context: uid,
@@ -306,17 +309,9 @@
306 }309 }
307310
308 def set_priority(self, cr, uid, ids, priority, *args):311 def set_priority(self, cr, uid, ids, priority, *args):
309 return self.write(cr, uid, ids, {'priority' : priority})312 """Set lead priority
310313 """
311 def set_high_priority(self, cr, uid, ids, *args):314 return self.write(cr, uid, ids, {'priority' : str(priority)})
312 """Set lead priority to high
313 """
314 return self.set_priority(cr, uid, ids, '1')
315
316 def set_normal_priority(self, cr, uid, ids, *args):
317 """Set lead priority to normal
318 """
319 return self.set_priority(cr, uid, ids, '3')
320315
321 def copy(self, cr, uid, id, default=None, context=None):316 def copy(self, cr, uid, id, default=None, context=None):
322 issue = self.read(cr, uid, id, ['name'], context=context)317 issue = self.read(cr, uid, id, ['name'], context=context)
@@ -375,15 +370,6 @@
375 # Stage management370 # Stage management
376 # -------------------------------------------------------371 # -------------------------------------------------------
377372
378 def set_kanban_state_blocked(self, cr, uid, ids, context=None):
379 return self.write(cr, uid, ids, {'kanban_state': 'blocked'}, context=context)
380
381 def set_kanban_state_normal(self, cr, uid, ids, context=None):
382 return self.write(cr, uid, ids, {'kanban_state': 'normal'}, context=context)
383
384 def set_kanban_state_done(self, cr, uid, ids, context=None):
385 return self.write(cr, uid, ids, {'kanban_state': 'done'}, context=context)
386
387 def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):373 def stage_find(self, cr, uid, cases, section_id, domain=[], order='sequence', context=None):
388 """ Override of the base.stage method374 """ Override of the base.stage method
389 Parameter of the stage search taken from the issue:375 Parameter of the stage search taken from the issue:
@@ -403,7 +389,7 @@
403 # OR all section_ids and OR with case_default389 # OR all section_ids and OR with case_default
404 search_domain = []390 search_domain = []
405 if section_ids:391 if section_ids:
406 search_domain += [('|')] * (len(section_ids)-1)392 search_domain = [('|')] * (len(section_ids)-1)
407 for section_id in section_ids:393 for section_id in section_ids:
408 search_domain.append(('project_ids', '=', section_id))394 search_domain.append(('project_ids', '=', section_id))
409 search_domain += list(domain)395 search_domain += list(domain)
@@ -514,6 +500,15 @@
514 (_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])500 (_check_escalation, 'Error! You cannot assign escalation to the same project!', ['project_escalation_id'])
515 ]501 ]
516502
503 def project_issues_action(self, cr, uid, ids, context=None):
504 data_obj = self.pool.get('ir.model.data')
505 action_obj =self.pool.get('ir.actions.act_window')
506
507 action_id = data_obj.get_object_reference(cr, uid, 'project_issue', 'act_project_project_2_project_issue_all')[1]
508 action = action_obj.read(cr, uid, action_id, [], context)
509 res = self.read(cr, uid, ids, ['issue_label'], context)[0]
510 action['name'] = res['issue_label']
511 return action
517512
518class account_analytic_account(osv.Model):513class account_analytic_account(osv.Model):
519 _inherit = 'account.analytic.account'514 _inherit = 'account.analytic.account'
@@ -521,6 +516,10 @@
521516
522 _columns = {517 _columns = {
523 'use_issues': fields.boolean('Issues', help="Check this field if this project manages issues"),518 'use_issues': fields.boolean('Issues', help="Check this field if this project manages issues"),
519 'issue_label': fields.char('Use Issues as', size=128, help="Gives label to issues on project's kanaban view.", required=True),
520 }
521 _defaults = {
522 'issue_label': 'Issues',
524 }523 }
525524
526 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):525 def on_change_template(self, cr, uid, ids, template_id, date_start=False, context=None):
527526
=== modified file 'project_issue/project_issue_data.xml'
--- project_issue/project_issue_data.xml 2014-02-21 11:27:04 +0000
+++ project_issue/project_issue_data.xml 2014-05-07 10:11:23 +0000
@@ -48,6 +48,12 @@
48 <field name="default" eval="False"/>48 <field name="default" eval="False"/>
49 <field name="description">Issue blocked</field>49 <field name="description">Issue blocked</field>
50 </record>50 </record>
51 <record id="mt_issue_done" model="mail.message.subtype">
52 <field name="name">Issue Done</field>
53 <field name="res_model">project.issue</field>
54 <field name="default" eval="False"/>
55 <field name="description">Issue Done</field>
56 </record>
51 <record id="mt_issue_stage" model="mail.message.subtype">57 <record id="mt_issue_stage" model="mail.message.subtype">
52 <field name="name">Stage Changed</field>58 <field name="name">Stage Changed</field>
53 <field name="res_model">project.issue</field>59 <field name="res_model">project.issue</field>
5460
=== modified file 'project_issue/project_issue_demo.xml'
--- project_issue/project_issue_demo.xml 2012-11-29 22:26:45 +0000
+++ project_issue/project_issue_demo.xml 2014-05-07 10:11:23 +0000
@@ -6,12 +6,15 @@
6 <field name="use_issues" eval="True"/>6 <field name="use_issues" eval="True"/>
7 </record>7 </record>
8 <record id="project.project_project_2" model="project.project">8 <record id="project.project_project_2" model="project.project">
9 <field name="issue_label">Bugs</field>
9 <field name="use_issues" eval="True"/>10 <field name="use_issues" eval="True"/>
10 </record>11 </record>
11 <record id="project.project_project_3" model="project.project">12 <record id="project.project_project_3" model="project.project">
13 <field name="issue_label">Feedbacks</field>
12 <field name="use_issues" eval="True"/>14 <field name="use_issues" eval="True"/>
13 </record>15 </record>
14 <record id="project.project_project_4" model="project.project">16 <record id="project.project_project_4" model="project.project">
17 <field name="issue_label">Bugs</field>
15 <field name="use_issues" eval="True"/>18 <field name="use_issues" eval="True"/>
16 </record>19 </record>
17 <record id="project.project_project_5" model="project.project">20 <record id="project.project_project_5" model="project.project">
@@ -35,7 +38,7 @@
35 <!-- Issues -->38 <!-- Issues -->
36 <record id="crm_case_buginaccountsmodule0" model="project.issue">39 <record id="crm_case_buginaccountsmodule0" model="project.issue">
37 <field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>40 <field eval="time.strftime('%Y-%m-08 10:15:00')" name="date"/>
38 <field name="priority">5</field>41 <field name="priority">0</field>
39 <field name="user_id" ref="base.user_root"/>42 <field name="user_id" ref="base.user_root"/>
40 <field name="partner_id" ref="base.res_partner_2"/>43 <field name="partner_id" ref="base.res_partner_2"/>
41 <field name="section_id" ref="crm.section_sales_department"/>44 <field name="section_id" ref="crm.section_sales_department"/>
@@ -51,7 +54,7 @@
5154
52 <record id="crm_case_programnotgivingproperoutput0" model="project.issue">55 <record id="crm_case_programnotgivingproperoutput0" model="project.issue">
53 <field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>56 <field eval="time.strftime('%Y-%m-15 12:50:00')" name="date"/>
54 <field name="priority">3</field>57 <field name="priority">1</field>
55 <field name="user_id" ref="base.user_root"/>58 <field name="user_id" ref="base.user_root"/>
56 <field name="partner_id" ref="base.res_partner_1"/>59 <field name="partner_id" ref="base.res_partner_1"/>
57 <field name="section_id" ref="crm.section_sales_department"/>60 <field name="section_id" ref="crm.section_sales_department"/>
@@ -64,7 +67,7 @@
6467
65 <record id="crm_case_outputincorrect0" model="project.issue">68 <record id="crm_case_outputincorrect0" model="project.issue">
66 <field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>69 <field eval="time.strftime('%Y-%m-18 14:30:00')" name="date"/>
67 <field name="priority">4</field>70 <field name="priority">0</field>
68 <field name="user_id" ref="base.user_demo"/>71 <field name="user_id" ref="base.user_demo"/>
69 <field name="section_id" ref="crm.section_sales_department"/>72 <field name="section_id" ref="crm.section_sales_department"/>
70 <field eval="1" name="active"/>73 <field eval="1" name="active"/>
@@ -79,7 +82,7 @@
7982
80 <record id="crm_case_problemloadingpage0" model="project.issue">83 <record id="crm_case_problemloadingpage0" model="project.issue">
81 <field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>84 <field eval="time.strftime('%Y-%m-20 15:25:05')" name="date"/>
82 <field name="priority">3</field>85 <field name="priority">1</field>
83 <field name="user_id" ref="base.user_root"/>86 <field name="user_id" ref="base.user_root"/>
84 <field name="partner_id" ref="base.res_partner_14"/>87 <field name="partner_id" ref="base.res_partner_14"/>
85 <field name="section_id" ref="crm.section_sales_department"/>88 <field name="section_id" ref="crm.section_sales_department"/>
@@ -92,7 +95,7 @@
9295
93 <record id="crm_case_pagenotfound0" model="project.issue">96 <record id="crm_case_pagenotfound0" model="project.issue">
94 <field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>97 <field eval="time.strftime('%Y-%m-22 18:15:00')" name="date"/>
95 <field name="priority">3</field>98 <field name="priority">1</field>
96 <field name="user_id" ref="base.user_root"/>99 <field name="user_id" ref="base.user_root"/>
97 <field name="partner_id" ref="base.res_partner_13"/>100 <field name="partner_id" ref="base.res_partner_13"/>
98 <field name="section_id" ref="crm.section_sales_department"/>101 <field name="section_id" ref="crm.section_sales_department"/>
@@ -105,7 +108,7 @@
105108
106 <record id="crm_case_programmingerror0" model="project.issue">109 <record id="crm_case_programmingerror0" model="project.issue">
107 <field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>110 <field eval="time.strftime('%Y-%m-24 09:45:00')" name="date"/>
108 <field name="priority">3</field>111 <field name="priority">1</field>
109 <field name="user_id" ref="base.user_root"/>112 <field name="user_id" ref="base.user_root"/>
110 <field name="partner_id" ref="base.res_partner_5"/>113 <field name="partner_id" ref="base.res_partner_5"/>
111 <field name="section_id" ref="crm.section_sales_department"/>114 <field name="section_id" ref="crm.section_sales_department"/>
@@ -172,7 +175,7 @@
172175
173 <record id="crm_case_newfeaturestobeadded0" model="project.issue">176 <record id="crm_case_newfeaturestobeadded0" model="project.issue">
174 <field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>177 <field eval="time.strftime('%Y-%m-01 12:15:10')" name="date"/>
175 <field name="priority">4</field>178 <field name="priority">0</field>
176 <field name="user_id" ref="base.user_root"/>179 <field name="user_id" ref="base.user_root"/>
177 <field name="partner_id" ref="base.res_partner_8"/>180 <field name="partner_id" ref="base.res_partner_8"/>
178 <field name="section_id" ref="crm.section_sales_department"/>181 <field name="section_id" ref="crm.section_sales_department"/>
@@ -199,7 +202,7 @@
199202
200 <record id="crm_case_includeattendancesheetinproject0" model="project.issue">203 <record id="crm_case_includeattendancesheetinproject0" model="project.issue">
201 <field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>204 <field eval="time.strftime('%Y-%m-10 17:05:30')" name="date"/>
202 <field name="priority">3</field>205 <field name="priority">1</field>
203 <field name="user_id" ref="base.user_root"/>206 <field name="user_id" ref="base.user_root"/>
204 <field name="partner_id" ref="base.res_partner_10"/>207 <field name="partner_id" ref="base.res_partner_10"/>
205 <field name="section_id" ref="crm.section_sales_department"/>208 <field name="section_id" ref="crm.section_sales_department"/>
@@ -213,7 +216,7 @@
213216
214 <record id="crm_case_createnewobject0" model="project.issue">217 <record id="crm_case_createnewobject0" model="project.issue">
215 <field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>218 <field eval="time.strftime('%Y-%m-15 10:35:15')" name="date"/>
216 <field name="priority">3</field>219 <field name="priority">1</field>
217 <field name="user_id" ref="base.user_root"/>220 <field name="user_id" ref="base.user_root"/>
218 <field name="partner_id" ref="base.res_partner_6"/>221 <field name="partner_id" ref="base.res_partner_6"/>
219 <field name="section_id" ref="crm.section_sales_department"/>222 <field name="section_id" ref="crm.section_sales_department"/>
@@ -226,7 +229,7 @@
226229
227 <record id="crm_case_improvereportsinhrms0" model="project.issue">230 <record id="crm_case_improvereportsinhrms0" model="project.issue">
228 <field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>231 <field eval="time.strftime('%Y-%m-19 12:15:00')" name="date"/>
229 <field name="priority">4</field>232 <field name="priority">0</field>
230 <field name="user_id" ref="base.user_root"/>233 <field name="user_id" ref="base.user_root"/>
231 <field name="partner_id" ref="base.res_partner_11"/>234 <field name="partner_id" ref="base.res_partner_11"/>
232 <field name="section_id" ref="crm.section_sales_department"/>235 <field name="section_id" ref="crm.section_sales_department"/>
233236
=== modified file 'project_issue/project_issue_view.xml'
--- project_issue/project_issue_view.xml 2014-05-02 13:07:53 +0000
+++ project_issue/project_issue_view.xml 2014-05-07 10:11:23 +0000
@@ -55,11 +55,10 @@
55 <label for="name" class="oe_edit_only"/>55 <label for="name" class="oe_edit_only"/>
56 <h1>56 <h1>
57 <field name="name" class="oe_inline"/>57 <field name="name" class="oe_inline"/>
58 <field name="kanban_state" invisible='1'/>
59 <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"/>
60 <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"/>
61 <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"/>
62 </h1>58 </h1>
59 <div class="oe_right">
60 <field name="kanban_state" class="oe_inline" widget="dropdown_selection"/>
61 </div>
63 <label for="categ_ids" class="oe_edit_only"/>62 <label for="categ_ids" class="oe_edit_only"/>
64 <field name="categ_ids" widget="many2many_tags"/>63 <field name="categ_ids" widget="many2many_tags"/>
65 <group>64 <group>
@@ -78,7 +77,7 @@
78 <group>77 <group>
79 <field name="id"/>78 <field name="id"/>
80 <field name="version_id" groups="base.group_user"/>79 <field name="version_id" groups="base.group_user"/>
81 <field name="priority" groups="base.group_user"/>80 <field name="priority" groups="base.group_user" widget="priority"/>
82 <label for="task_id" groups="base.group_user"/>81 <label for="task_id" groups="base.group_user"/>
83 <div groups="base.group_user">82 <div groups="base.group_user">
84 <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>83 <field name="task_id" on_change="onchange_task_id(task_id)" class="oe_inline" context="{'default_project_id':project_id}"/>
@@ -186,7 +185,7 @@
186 <field name="model">project.issue</field>185 <field name="model">project.issue</field>
187 <field name="arch" type="xml">186 <field name="arch" type="xml">
188 <kanban default_group_by="stage_id">187 <kanban default_group_by="stage_id">
189 <field name="stage_id"/>188 <field name="stage_id" options='{"tooltip_on_group_by": "kanban_column_tooltip"}'/>
190 <field name="color"/>189 <field name="color"/>
191 <field name="priority"/>190 <field name="priority"/>
192 <field name="user_email"/>191 <field name="user_email"/>
@@ -220,28 +219,19 @@
220 <div class="oe_kanban_footer_left">219 <div class="oe_kanban_footer_left">
221 <field name="categ_ids"/>220 <field name="categ_ids"/>
222 <div class="oe_right">221 <div class="oe_right">
223 <span class="oe_kanban_highlight" groups="base.group_user">222 <table>
224 <a t-if="record.kanban_state.raw_value === 'normal'" type="object" string="In Progress" name="set_kanban_state_done" class="oe_kanban_status"> </a>223 <tr>
225 <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>224 <td groups="base.group_user">
226 <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>225 <field name="kanban_state" widget="dropdown_selection"/>
227 <t t-set="priority" t-value="record.priority.raw_value || 5"/>226 </td>
228 <a type="object" name="set_priority" args="['3']" t-if="priority gt 3" title="Normal Priority">227 <td groups="base.group_user">
229 <img src="/web/static/src/img/icons/star-off.png" width="16" height="16"/>228 <field name="priority" widget="priority"/>
230 </a>229 </td>
231 <a type="object" name="set_priority" args="['5']" t-if="priority lte 3" title="Normal Priority">230 <td>
232 <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 3 ? 'on' : 'off'}.png" width="16" height="16"/>231 <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"/>
233 </a>232 </td>
234 <a type="object" name="set_priority" args="['2']" title="High Priority">233 </tr>
235 <img t-attf-src="/web/static/src/img/icons/star-#{priority lte 2 ? 'on' : 'off'}.png" width="16" height="16"/>234 </table>
236 </a>
237 <a type="object" name="set_priority" args="['1']" title="Highest Priority">
238 <img t-attf-src="/web/static/src/img/icons/star-#{priority == 1 ? 'on' : 'off'}.png" width="16" height="16"/>
239 </a>
240 </span>
241 <t t-if="record.date_deadline.raw_value and record.date_deadline.raw_value lt (new Date())">
242 <span t-attf-class="oe_kanban_status oe_kaban_status_red"> </span>
243 </t>
244 <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"/>
245 </div>235 </div>
246 </div>236 </div>
247 <div class="oe_kanban_footer_left">237 <div class="oe_kanban_footer_left">
@@ -301,13 +291,16 @@
301 <field name="inherit_id" ref="project.edit_project"/>291 <field name="inherit_id" ref="project.edit_project"/>
302 <field name="arch" type="xml">292 <field name="arch" type="xml">
303 <xpath expr='//div[@name="options_active"]' position='inside'>293 <xpath expr='//div[@name="options_active"]' position='inside'>
304 <field name="use_issues" class="oe_inline"294 <div>
295 <field name="use_issues" class="oe_inline oe_from_boolean_align"
305 on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/>296 on_change="on_change_use_tasks_or_issues(use_tasks, use_issues)"/>
306 <label for="use_issues"/>297 <label for="issue_label" class="oe_edit_only"/>
298 <b><field name="issue_label" class="oe_inline"/></b>
299 </div>
307 </xpath>300 </xpath>
308 <xpath expr='//div[@name="buttons"]' position='inside'>301 <xpath expr='//div[@name="buttons"]' position='inside'>
309 <button class="oe_inline oe_stat_button" type="action" attrs="{'invisible':[('use_issues','=', 0)]}" 302 <button class="oe_inline oe_stat_button" type="object" attrs="{'invisible':[('use_issues','=', 0)]}"
310 name="%(act_project_project_2_project_issue_all)d" icon="fa-bug">303 name="project_issues_action" icon="fa-bug">
311 <field string="Issues" name="issue_count" widget="statinfo"/>304 <field string="Issues" name="issue_count" widget="statinfo"/>
312 </button>305 </button>
313 </xpath>306 </xpath>
@@ -320,6 +313,9 @@
320 <field name="sequence" position="before">313 <field name="sequence" position="before">
321 <field name="project_escalation_id"/>314 <field name="project_escalation_id"/>
322 </field>315 </field>
316 <xpath expr='//page[@name="project_stages"]' position="attributes">
317 <attribute name="attrs">{'invisible': [('use_issues', '=', False), ('use_tasks', '=', False)]}</attribute>
318 </xpath>
323 </field>319 </field>
324 </record>320 </record>
325321
@@ -334,10 +330,8 @@
334 </field>330 </field>
335 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">331 <xpath expr="//div[contains(@class, 'oe_kanban_project_list')]" position="inside">
336 <a t-if="record.use_issues.raw_value" style="margin-right: 10px"332 <a t-if="record.use_issues.raw_value" style="margin-right: 10px"
337 name="%(act_project_project_2_project_issue_all)d" type="action">333 name="project_issues_action" type="object">
338 <t t-raw="record.issue_ids.raw_value.length"/>334 <span><field name="issue_count"/> <field name="issue_label"/></span>
339 <span t-if="record.issue_ids.raw_value.length == 1">Issue</span>
340 <span t-if="record.issue_ids.raw_value.length > 1">Issues</span>
341 </a>335 </a>
342 </xpath>336 </xpath>
343 </field>337 </field>
@@ -350,8 +344,11 @@
350 <field eval="18" name="priority"/>344 <field eval="18" name="priority"/>
351 <field name="arch" type="xml">345 <field name="arch" type="xml">
352 <xpath expr='//div[@name="project"]' position='inside'>346 <xpath expr='//div[@name="project"]' position='inside'>
353 <field name="use_issues"/>347 <div class="oe_left">
354 <label for="use_issues"/>348 <field name="use_issues" class="oe_from_boolean_align"/>
349 <label for="issue_label" class="oe_edit_only"/>
350 <b><field name="issue_label" class="oe_inline"/></b>
351 </div>
355 </xpath>352 </xpath>
356 </field>353 </field>
357 </record>354 </record>
@@ -370,6 +367,17 @@
370 </field>367 </field>
371 </record>368 </record>
372369
370 <record id="view_project_task_type_form_inherited" model="ir.ui.view">
371 <field name="name">project.task.type.form.inherited</field>
372 <field name="model">project.task.type</field>
373 <field name="inherit_id" ref="project.task_type_edit"/>
374 <field name="arch" type="xml">
375 <xpath expr='//field[@name="type"]' position="attributes">
376 <attribute name="invisible">0</attribute>
377 </xpath>
378 </field>
379 </record>
380
373 <!-- res.partner -->381 <!-- res.partner -->
374 <record model="ir.ui.view" id="res_partner_issues_button_view">382 <record model="ir.ui.view" id="res_partner_issues_button_view">
375 <field name="name">res.partner.issues.button.view</field>383 <field name="name">res.partner.issues.button.view</field>
376384
=== modified file 'project_issue/report/project_issue_report.py'
--- project_issue/report/project_issue_report.py 2013-10-27 12:31:04 +0000
+++ project_issue/report/project_issue_report.py 2014-05-07 10:11:23 +0000
@@ -47,7 +47,7 @@
47 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",47 'delay_close': fields.float('Avg. Delay to Close', digits=(16,2), readonly=True, group_operator="avg",
48 help="Number of Days to close the project issue"),48 help="Number of Days to close the project issue"),
49 'company_id' : fields.many2one('res.company', 'Company'),49 'company_id' : fields.many2one('res.company', 'Company'),
50 'priority': fields.selection(crm.AVAILABLE_PRIORITIES, 'Priority'),50 'priority': fields.selection([('0','Low'), ('1','Normal'), ('2','High')], 'Priority'),
51 'project_id':fields.many2one('project.project', 'Project',readonly=True),51 'project_id':fields.many2one('project.project', 'Project',readonly=True),
52 'version_id': fields.many2one('project.issue.version', 'Version'),52 'version_id': fields.many2one('project.issue.version', 'Version'),
53 'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True),53 'user_id' : fields.many2one('res.users', 'Assigned to',readonly=True),
5454
=== modified file 'project_timesheet/project_timesheet_view.xml'
--- project_timesheet/project_timesheet_view.xml 2014-04-15 12:57:15 +0000
+++ project_timesheet/project_timesheet_view.xml 2014-05-07 10:11:23 +0000
@@ -25,7 +25,7 @@
25 <field name="model">project.project</field>25 <field name="model">project.project</field>
26 <field name="inherit_id" ref="project.edit_project"/>26 <field name="inherit_id" ref="project.edit_project"/>
27 <field name="arch" type="xml">27 <field name="arch" type="xml">
28 <xpath expr='//div[@name="options_active"]' position='inside'>28 <xpath expr='//div[@name="options_active"]' position='before'>
29 <field name="use_timesheets" class="oe_inline"/>29 <field name="use_timesheets" class="oe_inline"/>
30 <label for="use_timesheets"/>30 <label for="use_timesheets"/>
31 </xpath>31 </xpath>

Subscribers

People subscribed via source and target branches

to all changes: