Merge lp:~vauxoo/xmind-openerp/7.0-xo-dev-julio into lp:xmind-openerp

Proposed by Julio Serna-http://www.vauxoo.com
Status: Merged
Merged at revision: 65
Proposed branch: lp:~vauxoo/xmind-openerp/7.0-xo-dev-julio
Merge into: lp:xmind-openerp
Diff against target: 71 lines (+18/-5)
2 files modified
xmind/__openerp__.py (+2/-1)
xmind/wizard/xmind.py (+16/-4)
To merge this branch: bzr merge lp:~vauxoo/xmind-openerp/7.0-xo-dev-julio
Reviewer Review Type Date Requested Status
Julio Serna-http://www.vauxoo.com Needs Resubmitting
Moisés López - http://www.vauxoo.com Disapprove
Review via email: mp+165006@code.launchpad.net

Description of the change

modifica función para re calcular el wbs_code cuando se termina de crear los proyectos, se asigna secuencia a los proyectos con recorrido postorder

To post a comment you must log in.
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Tiene conflicto

review: Disapprove
66. By Julio Serna-http://www.vauxoo.com

[FIX] resolved conflicts

Revision history for this message
Julio Serna-http://www.vauxoo.com (hearthebreaker) wrote :

se resolvió conflictos

review: Needs Resubmitting
Revision history for this message
Moisés López - http://www.vauxoo.com (moylop260) wrote :

Aprobado, lo puedes mergear. Por favor.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'xmind/__openerp__.py'
--- xmind/__openerp__.py 2013-03-26 05:50:01 +0000
+++ xmind/__openerp__.py 2013-05-22 04:59:28 +0000
@@ -29,7 +29,8 @@
29 'document',29 'document',
30 'document_page',30 'document_page',
31 'user_story',31 'user_story',
32 'project'],32 'project',
33 'project_wbs'],
33 "author" : "Vauxoo",34 "author" : "Vauxoo",
34 "description" : """35 "description" : """
35Import an xmind file to openerp:36Import an xmind file to openerp:
3637
=== modified file 'xmind/wizard/xmind.py'
--- xmind/wizard/xmind.py 2013-05-16 04:11:00 +0000
+++ xmind/wizard/xmind.py 2013-05-22 04:59:28 +0000
@@ -60,17 +60,16 @@
60 [('xmind_id', '=',60 [('xmind_id', '=',
61 node.get_correlation_id())])61 node.get_correlation_id())])
6262
63 def create_project(self, cr, uid, node, wbs, parent_id=False, context=None):63 def create_project(self, cr, uid, node, wbs, parent_id=False, wbs_sequence=1, context=None):
64 project_obj = self.pool.get('project.project')64 project_obj = self.pool.get('project.project')
65 analytic_id = parent_id and project_obj.browse(cr, uid,65 analytic_id = parent_id and project_obj.browse(cr, uid,
66 [parent_id], context=context)[0].analytic_account_id.id or parent_id66 [parent_id], context=context)[0].analytic_account_id.id or parent_id
67
68 project_dict = {'name': node.get_title(),67 project_dict = {'name': node.get_title(),
69 'parent_id': analytic_id,68 'parent_id': analytic_id,
70 'description': node.get_note() and node.get_note() or False,69 'description': node.get_note() and node.get_note() or False,
71 'xmind_id': node.get_correlation_id(),70 'xmind_id': node.get_correlation_id(),
71 'priority': wbs_sequence,
72 'privacy_visibility':'employees',72 'privacy_visibility':'employees',
73 'priority':1,
74 }73 }
75 _logger.info("Working with %s" % (project_dict))74 _logger.info("Working with %s" % (project_dict))
76 created_projects = []75 created_projects = []
@@ -90,7 +89,8 @@
90 for ch in subtopics:89 for ch in subtopics:
91 created_projects.append(created_id)90 created_projects.append(created_id)
92 wbs += 191 wbs += 1
93 self.create_project(cr, uid, ch, wbs, created_id)92 wbs_sequence += 1
93 self.create_project(cr, uid, ch, wbs, created_id, wbs_sequence)
94 wbs -= 194 wbs -= 1
95 return created_projects95 return created_projects
9696
@@ -137,6 +137,17 @@
137 if project_main:137 if project_main:
138 c = self.create_project(cr, uid, project_main, 0)138 c = self.create_project(cr, uid, project_main, 0)
139 self.get_all_levels(cr, uid, ids, context=context)139 self.get_all_levels(cr, uid, ids, context=context)
140
141 project_main_ids = project_obj.search(cr, uid,
142 [('xmind_id', '=', project_main.get_correlation_id()),
143 ('parent_id','=',False)])
144
145 project_ids = project_obj._get_wbs_code(cr, uid,
146 project_main_ids, context=context)
147
148 project_obj._get_current_wbs(cr, uid, project_ids, 'wbs_code',
149 args=None, context=context)
150
140 #creating attachment151 #creating attachment
141 if wz_brw:152 if wz_brw:
142 self.create_attachment(cr, uid, wz_brw.xmind, 153 self.create_attachment(cr, uid, wz_brw.xmind,
@@ -144,4 +155,5 @@
144 'xmind_name': project_main.get_title(),155 'xmind_name': project_main.get_title(),
145 'xmind_id': project_main.get_correlation_id(),156 'xmind_id': project_main.get_correlation_id(),
146 'res_model': 'project.project'})157 'res_model': 'project.project'})
158
147 return True159 return True

Subscribers

People subscribed via source and target branches

to all changes: