Merge lp:~openerp-dev/openobject-addons/6.1-bug-994272-vba into lp:openobject-addons/6.1

Proposed by Anto
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/6.1-bug-994272-vba
Merge into: lp:openobject-addons/6.1
Diff against target: 22 lines (+12/-0)
1 file modified
project/project.py (+12/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/6.1-bug-994272-vba
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+131035@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Anto (abourguignon) wrote :

Unmerged revisions

6976. By Vijaykumar Baladaniya (OpenERP)

[FIX] Show project pick list proper at task creation time.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'project/project.py'
2--- project/project.py 2012-08-29 10:56:45 +0000
3+++ project/project.py 2012-10-23 15:41:35 +0000
4@@ -54,6 +54,18 @@
5 _description = "Project"
6 _inherits = {'account.analytic.account': "analytic_account_id"}
7
8+ def name_get(self, cr, uid, ids, context=None):
9+ if not len(ids):
10+ return []
11+ reads = self.read(cr, uid, ids, ['name','parent_id'], context=context)
12+ res = []
13+ for record in reads:
14+ name = record['name']
15+ if record['parent_id']:
16+ name = record['parent_id'][1]+' / '+name
17+ res.append((record['id'], name))
18+ return res
19+
20 def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False):
21 if user == 1:
22 return super(project, self).search(cr, user, args, offset=offset, limit=limit, order=order, context=context, count=count)