Merge lp:~openerp-dev/openobject-addons/6.1-opw-574389-ado into lp:openobject-addons/6.1

Proposed by Amit Dodiya (OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-opw-574389-ado
Merge into: lp:openobject-addons/6.1
Diff against target: 39 lines (+9/-3)
2 files modified
project_mailgate/project_mailgate.py (+4/-0)
project_mrp/project_mrp.py (+5/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-opw-574389-ado
Reviewer Review Type Date Requested Status
Amit Dodiya (OpenERP) (community) Needs Resubmitting
Naresh(OpenERP) (community) Needs Fixing
Xavier ALT Pending
Review via email: mp+104672@code.launchpad.net

Description of the change

Hello,

"[FIX] Error on delegate task"

Steps to reproduce:

1). Install project, project_mrp and project_mailgate modules.
2). Create a new task and try to delegate with pending / done state.

Regards,
Amit

To post a comment you must log in.
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

The line 36 in the diff wf_service.trg_write(uid, 'procurement.order', task.procurement_id.id, cr)

should be wf_service.trg_write(uid, 'procurement.order', task_data.procurement_id.id, cr)

otherwise you will have * undefined variable task *\

Thanks,
Naresh

review: Needs Fixing
Revision history for this message
Amit Dodiya (OpenERP) (ado-openerp) wrote :

Hello,

The code is changed.

Regards,
Amit

review: Needs Resubmitting
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

This bug was qualified as Not Relevant on Trunk (means that architecture on trunk has changed and so this bug has no meaning anymore). If this Merge Proposal could not be merged in v6.1 at the release of v7.0, it will be closed.

Thanks,
Naresh Soni

Unmerged revisions

6877. By Amit Dodiya<email address hidden>

[FIX] Error on delegate task

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'project_mailgate/project_mailgate.py'
--- project_mailgate/project_mailgate.py 2011-09-07 22:38:59 +0000
+++ project_mailgate/project_mailgate.py 2012-07-05 11:37:23 +0000
@@ -99,12 +99,16 @@
99 def do_pending(self, cr, uid, ids, context=None):99 def do_pending(self, cr, uid, ids, context=None):
100 res = super(project_tasks, self).do_pending(cr, uid, ids, context)100 res = super(project_tasks, self).do_pending(cr, uid, ids, context)
101 tasks = self.browse(cr, uid, ids, context=context)101 tasks = self.browse(cr, uid, ids, context=context)
102 if not isinstance(tasks,list):
103 tasks = [tasks]
102 self.message_append(cr, uid, tasks, _('Pending'), context=context)104 self.message_append(cr, uid, tasks, _('Pending'), context=context)
103 return res105 return res
104106
105 def do_close(self, cr, uid, ids, context=None):107 def do_close(self, cr, uid, ids, context=None):
106 res = super(project_tasks, self).do_close(cr, uid, ids, context)108 res = super(project_tasks, self).do_close(cr, uid, ids, context)
107 tasks = self.browse(cr, uid, ids, context=context)109 tasks = self.browse(cr, uid, ids, context=context)
110 if not isinstance(tasks,list):
111 tasks = [tasks]
108 for task in tasks:112 for task in tasks:
109 if task.state == 'done':113 if task.state == 'done':
110 self.message_append(cr, uid, tasks, _('Done'), context=context)114 self.message_append(cr, uid, tasks, _('Done'), context=context)
111115
=== modified file 'project_mrp/project_mrp.py'
--- project_mrp/project_mrp.py 2012-01-02 10:08:34 +0000
+++ project_mrp/project_mrp.py 2012-07-05 11:37:23 +0000
@@ -32,9 +32,11 @@
3232
33 def _validate_subflows(self, cr, uid, ids):33 def _validate_subflows(self, cr, uid, ids):
34 wf_service = netsvc.LocalService("workflow")34 wf_service = netsvc.LocalService("workflow")
35 for task in self.browse(cr, uid, ids):35 task_data = self.browse(cr, uid, ids)
36 if task.procurement_id:36 if isinstance(task_data, list):
37 wf_service.trg_write(uid, 'procurement.order', task.procurement_id.id, cr)37 task_data = task_data[0]
38 if task_data.procurement_id:
39 wf_service.trg_write(uid, 'procurement.order', task_data.procurement_id.id, cr)
3840
39 def do_close(self, cr, uid, ids, *args, **kwargs):41 def do_close(self, cr, uid, ids, *args, **kwargs):
40 res = super(project_task, self).do_close(cr, uid, ids, *args, **kwargs)42 res = super(project_task, self).do_close(cr, uid, ids, *args, **kwargs)