Merge lp:~therp-nl/openobject-addons/6.1-lp1154493-wiki_set_group_id into lp:openobject-addons/6.1

Proposed by Stefan Rijnhart (Opener)
Status: Needs review
Proposed branch: lp:~therp-nl/openobject-addons/6.1-lp1154493-wiki_set_group_id
Merge into: lp:openobject-addons/6.1
Diff against target: 35 lines (+3/-0)
3 files modified
wiki/wiki.py (+1/-0)
wiki/wizard/wiki_create_menu.py (+1/-0)
wiki/wizard/wiki_wiki_page_open.py (+1/-0)
To merge this branch: bzr merge lp:~therp-nl/openobject-addons/6.1-lp1154493-wiki_set_group_id
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+153086@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

7184. By Stefan Rijnhart (Opener)

[FIX] Set group id for new wiki items

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'wiki/wiki.py'
2--- wiki/wiki.py 2012-03-28 06:02:25 +0000
3+++ wiki/wiki.py 2013-03-13 09:23:22 +0000
4@@ -81,6 +81,7 @@
5 }
6 group = self.browse(cr, uid, group_id, context=context)
7 value['domain'] = "[('group_id','=',%d)]" % (group.id)
8+ value['context'] = "{'default_group_id': %d}" % (group.id)
9 if group.method == 'page':
10 value['res_id'] = group.home.id
11 elif group.method == 'list':
12
13=== modified file 'wiki/wizard/wiki_create_menu.py'
14--- wiki/wizard/wiki_create_menu.py 2011-01-14 00:11:01 +0000
15+++ wiki/wizard/wiki_create_menu.py 2013-03-13 09:23:22 +0000
16@@ -66,6 +66,7 @@
17 }
18 group = obj_wiki_group.browse(cr, uid, group_id, context=context)
19 value['domain'] = "[('group_id','=',%d)]" % (group.id)
20+ value['context'] = "{'default_group_id': %d}" % (group.id)
21 if group.method == 'page':
22 value['res_id'] = group.home.id
23 elif group.method == 'list':
24
25=== modified file 'wiki/wizard/wiki_wiki_page_open.py'
26--- wiki/wizard/wiki_wiki_page_open.py 2011-01-14 00:11:01 +0000
27+++ wiki/wizard/wiki_wiki_page_open.py 2013-03-13 09:23:22 +0000
28@@ -41,6 +41,7 @@
29 for group in self.pool.get('wiki.groups').browse(cr, uid, group_ids, context=context):
30 value = {
31 'domain': "[('group_id','=',%d)]" % (group.id),
32+ 'context': "{'default_group_id': %d}" % (group.id),
33 'name': 'Wiki Page',
34 'view_type': 'form',
35 'view_mode': 'form,tree',