diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-20 13:52:55 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-20 13:52:55 +0530 |
| commit | 4e307d022c8fbdba848b8a4f57d668a4b6bd036f (patch) | |
| tree | 249f8361bac695c0bec0c844d964194202d680a0 /addons/wiki/wizard | |
| parent | 6e34e7c52a3f37876b627fb5c80ac79d3c614807 (diff) | |
| parent | c2f85df411949653257c5b51f1578a1e40709510 (diff) | |
[MERGE]: Merge with lp:openobject-addons
bzr revid: rpa@tinyerp.com-20101215042654-04ccazkz5v57ml3j
bzr revid: rpa@tinyerp.com-20101216043335-ji5h61dra451cml4
bzr revid: rpa@tinyerp.com-20101220082255-1g3ea50rkjlacwqw
Diffstat (limited to 'addons/wiki/wizard')
| -rw-r--r-- | addons/wiki/wizard/wiki_create_menu.py | 4 | ||||
| -rw-r--r-- | addons/wiki/wizard/wiki_make_index.py | 6 | ||||
| -rw-r--r-- | addons/wiki/wizard/wiki_show_diff.py | 2 | ||||
| -rw-r--r-- | addons/wiki/wizard/wiki_wiki_page_open.py | 6 |
4 files changed, 13 insertions, 5 deletions
diff --git a/addons/wiki/wizard/wiki_create_menu.py b/addons/wiki/wizard/wiki_create_menu.py index 7cee4f88e96..f95c1e2dffd 100644 --- a/addons/wiki/wizard/wiki_create_menu.py +++ b/addons/wiki/wizard/wiki_create_menu.py @@ -31,7 +31,7 @@ class wiki_create_menu(osv.osv_memory): 'menu_parent_id': fields.many2one('ir.ui.menu', 'Parent Menu', required=True), } - def wiki_menu_create(self, cr, uid, ids, context): + def wiki_menu_create(self, cr, uid, ids, context=None): """ Create Menu On the base of Group id and Action id @param cr: the current row, from the database cursor, @@ -39,6 +39,8 @@ class wiki_create_menu(osv.osv_memory): @param ids: List of create menu’s IDs """ + if context is None: + context = {} obj_wiki_group = self.pool.get('wiki.groups') obj_view = self.pool.get('ir.ui.view') obj_menu = self.pool.get('ir.ui.menu') diff --git a/addons/wiki/wizard/wiki_make_index.py b/addons/wiki/wizard/wiki_make_index.py index 98cc001fe8c..6b159b7ac30 100644 --- a/addons/wiki/wizard/wiki_make_index.py +++ b/addons/wiki/wizard/wiki_make_index.py @@ -27,7 +27,7 @@ class wiki_make_index(osv.osv_memory): _name = "wiki.make.index" _description = "Create Index" - def wiki_do_index(self, cr, uid, ids, context): + def wiki_do_index(self, cr, uid, ids, context=None): """ Makes Index according to page hierarchy @param cr: the current row, from the database cursor, @@ -35,9 +35,11 @@ class wiki_make_index(osv.osv_memory): @param ids: list of wiki index’s IDs """ + if context is None: + context = {} data = context and context.get('active_ids', []) or [] - for index_obj in self.browse(cr, uid, ids): + for index_obj in self.browse(cr, uid, ids, context=context): wiki_pool = self.pool.get('wiki.wiki') cr.execute("Select id, section from wiki_wiki where id IN %s \ order by section ", (tuple(data),)) diff --git a/addons/wiki/wizard/wiki_show_diff.py b/addons/wiki/wizard/wiki_show_diff.py index 43f3f698611..278c91064df 100644 --- a/addons/wiki/wizard/wiki_show_diff.py +++ b/addons/wiki/wizard/wiki_show_diff.py @@ -33,6 +33,8 @@ class showdiff(osv.osv_memory): """ @param cr: the current row, from the database cursor, @param uid: the current user’s ID for security checks, """ + if context is None: + context = {} history = self.pool.get('wiki.wiki.history') ids = context.get('active_ids', []) diff --git a/addons/wiki/wizard/wiki_wiki_page_open.py b/addons/wiki/wizard/wiki_wiki_page_open.py index 4eafe45cd35..1fe4f8acc49 100644 --- a/addons/wiki/wizard/wiki_wiki_page_open.py +++ b/addons/wiki/wizard/wiki_wiki_page_open.py @@ -27,7 +27,7 @@ class wiki_wiki_page_open(osv.osv_memory): _name = "wiki.wiki.page.open" _description = "wiz open page" - def open_wiki_page(self, cr, uid, ids, context): + def open_wiki_page(self, cr, uid, ids, context=None): """ Opens Wiki Page of Group @param cr: the current row, from the database cursor, @@ -35,8 +35,10 @@ class wiki_wiki_page_open(osv.osv_memory): @param ids: List of open wiki page’s IDs @return: dictionay of open wiki window on give group id """ + if context is None: + context = {} group_ids = context.get('active_ids', []) - for group in self.pool.get('wiki.groups').browse(cr, uid, group_ids): + for group in self.pool.get('wiki.groups').browse(cr, uid, group_ids, context=context): value = { 'domain': "[('group_id','=',%d)]" % (group.id), 'name': 'Wiki Page', |
