Merge lp:~vauxoo/addons-vauxoo/8.0-addons-vauxoo-project-conf-luist into lp:addons-vauxoo

Proposed by Luis Torres - http://www.vauxoo.com
Status: Merged
Merged at revision: 877
Proposed branch: lp:~vauxoo/addons-vauxoo/8.0-addons-vauxoo-project-conf-luist
Merge into: lp:addons-vauxoo
Diff against target: 111 lines (+20/-24)
4 files modified
project_conf/__openerp__.py (+7/-9)
project_conf/data/project_conf.xml (+0/-2)
project_conf/model/project.py (+9/-13)
project_conf/view/project_view.xml (+4/-0)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/8.0-addons-vauxoo-project-conf-luist
Reviewer Review Type Date Requested Status
Julio Serna-http://www.vauxoo.com Pending
Review via email: mp+237508@code.launchpad.net

Description of the change

Se migro el modulo project_conf de la versión 7 a la 8

To post a comment you must log in.
1153. By Luis Torres - http://www.vauxoo.com

[IMP][project_conf]Remove spaces

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project_conf/__openerp__.py'
2--- project_conf/__openerp__.py 2014-05-09 21:51:34 +0000
3+++ project_conf/__openerp__.py 2014-10-08 21:10:37 +0000
4@@ -24,10 +24,10 @@
5 ##############################################################################
6
7 {
8- "name" : "Project Configuration",
9- "version" : "0.1",
10- "depends" : ["base","project","email_template"],
11- "author" : ["Vauxoo",],
12+ "name": "Project Configuration",
13+ "version": "0.1",
14+ "depends": ["base", "project", "email_template"],
15+ "author": ["Vauxoo",],
16 "description" : """
17 Project Configuration
18 =====================
19@@ -70,11 +70,9 @@
20 """,
21 "website" : "http://vauxoo.com",
22 "category" : "Generic Modules",
23- "init_xml" : [
24- ],
25- "demo_xml" : [
26- ],
27- "update_xml" : [
28+ "demo": [
29+ ],
30+ "data": [
31 "data/project_conf.xml",
32 "view/project_view.xml",
33 ],
34
35=== modified file 'project_conf/data/project_conf.xml'
36--- project_conf/data/project_conf.xml 2013-11-25 20:55:51 +0000
37+++ project_conf/data/project_conf.xml 2014-10-08 21:10:37 +0000
38@@ -24,7 +24,6 @@
39 <record id="project_tt_backlog" model="project.task.type">
40 <field name="sequence">0</field>
41 <field name="name">Backlog</field>
42- <field name="state">draft</field>
43 <field name="case_default" eval="True"/>
44 </record>
45
46@@ -36,7 +35,6 @@
47 <record id="project_tt_leader" model="project.task.type">
48 <field name="sequence">6</field>
49 <field name="name">Testing Leader</field>
50- <field name="state">pending</field>
51 <field name="case_default" eval="True"/>
52 </record>
53
54
55=== modified file 'project_conf/model/project.py'
56--- project_conf/model/project.py 2014-09-17 22:48:59 +0000
57+++ project_conf/model/project.py 2014-10-08 21:10:37 +0000
58@@ -38,28 +38,24 @@
59 '''
60 context = context or {}
61 #Dont send context to dont get language of user in read method
62- #@ids in v8 is not a dictionary
63- #@stage deprecated in v8 by odoo
64- #~ if ids.get('stage_id'): #comment while is migrate to v8 this module
65- if {}.get('stage_id'):
66- type = self.pool.get('project.task.type').read(cr, uid, ids['stage_id'][0], ['name'])
67- if type.get('name', False) == 'Backlog':
68- self.send_mail_task(cr,uid,ids,'template_send_email_task_new',context)
69- elif type.get('name', False) == 'Testing Leader':
70- self.send_mail_task(cr,uid,ids,'template_send_email_task_end',context)
71+ if ids.stage_id:
72+ type = ids.stage_id.name or ''
73+ if type == 'Backlog':
74+ self.send_mail_task(cr, uid, ids, 'template_send_email_task_new', context)
75+ elif type == 'Testing Leader':
76+ self.send_mail_task(cr, uid, ids, 'template_send_email_task_end', context)
77
78- def send_mail_task(self,cr,uid,ids,template,context=None):
79+ def send_mail_task(self, cr, uid, ids, template, context=None):
80 imd_obj = self.pool.get('ir.model.data')
81 template_ids = imd_obj.search(
82 cr, uid, [('model', '=', 'email.template'), ('name', '=', template)])
83 if template_ids:
84 res_id = imd_obj.read(
85 cr, uid, template_ids, ['res_id'])[0]['res_id']
86-
87- followers = self.read(cr, uid, ids.get('id'), [
88+ ids = [ids.id]
89+ followers = self.read(cr, uid, ids[0], [
90 'message_follower_ids'])['message_follower_ids']
91
92- ids = [ids.get('id')]
93 body_html = self.pool.get('email.template').read(
94 cr, uid, res_id, ['body_html']).get('body_html')
95 context.update({'default_template_id': res_id,
96
97=== modified file 'project_conf/view/project_view.xml'
98--- project_conf/view/project_view.xml 2014-09-15 21:43:47 +0000
99+++ project_conf/view/project_view.xml 2014-10-08 21:10:37 +0000
100@@ -14,7 +14,11 @@
101 <field name="project_leader_id"/>
102 </xpath>
103 <xpath expr="//field[@name='date_deadline']" position="replace">
104+<!--
105 <field name="date_deadline" required="1" attrs="{'readonly':[('state','in',['done', 'cancelled'])]}"/>
106+ Is commented the attrs because the state field was depreciated in v8
107+-->
108+ <field name="date_deadline" required="1"/>
109 </xpath>
110 </field>
111 </record>