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/ (+4/-0)
project_mrp/ (+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:

Description of the change


"[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.


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',, cr)

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

otherwise you will have * undefined variable task *\


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


The code is changed.


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


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.

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
1=== modified file 'project_mailgate/'
2--- project_mailgate/ 2011-09-07 22:38:59 +0000
3+++ project_mailgate/ 2012-07-05 11:37:23 +0000
4@@ -99,12 +99,16 @@
5 def do_pending(self, cr, uid, ids, context=None):
6 res = super(project_tasks, self).do_pending(cr, uid, ids, context)
7 tasks = self.browse(cr, uid, ids, context=context)
8+ if not isinstance(tasks,list):
9+ tasks = [tasks]
10 self.message_append(cr, uid, tasks, _('Pending'), context=context)
11 return res
13 def do_close(self, cr, uid, ids, context=None):
14 res = super(project_tasks, self).do_close(cr, uid, ids, context)
15 tasks = self.browse(cr, uid, ids, context=context)
16+ if not isinstance(tasks,list):
17+ tasks = [tasks]
18 for task in tasks:
19 if task.state == 'done':
20 self.message_append(cr, uid, tasks, _('Done'), context=context)
22=== modified file 'project_mrp/'
23--- project_mrp/ 2012-01-02 10:08:34 +0000
24+++ project_mrp/ 2012-07-05 11:37:23 +0000
25@@ -32,9 +32,11 @@
27 def _validate_subflows(self, cr, uid, ids):
28 wf_service = netsvc.LocalService("workflow")
29- for task in self.browse(cr, uid, ids):
30- if task.procurement_id:
31- wf_service.trg_write(uid, 'procurement.order',, cr)
32+ task_data = self.browse(cr, uid, ids)
33+ if isinstance(task_data, list):
34+ task_data = task_data[0]
35+ if task_data.procurement_id:
36+ wf_service.trg_write(uid, 'procurement.order',, cr)
38 def do_close(self, cr, uid, ids, *args, **kwargs):
39 res = super(project_task, self).do_close(cr, uid, ids, *args, **kwargs)