2 In order to test the document_page in OpenERP, I create a new page to category blog_category_1
4 !record {model: blog.post, id: test_page0}:
6 category_id: blog_category_1
9 The Open ERP wiki allows you to manage your enterprise contents using wiki
11 restructured texts. This module provides a collaborative way to manage internal
13 FAQs, quality manuals, technical references, etc.'
16 # I check the category index contains my page.
18 # !python {model: blog.post}: |
19 # res = self.read(cr, uid, [ref('blog_category_1')], ['display_content'])
20 # assert res[0]['display_content'].find('Test Page') > 1
22 !record {model: blog.post, id: test_page0}:
23 content: 'Test updated content
25 The Open ERP wiki allows you to manage your enterprise contents using wiki
27 restructured texts. This module provides a collaborative way to manage internal
29 FAQs, quality manuals, technical references, etc.
31 Wiki text can easily be edited
34 I check the page history for the current page by clicking on "Page History".After that find difference between history.
36 !python {model: blog.post.history.show_diff}: |
37 hist_obj = model.pool.get('blog.post.history')
38 ids = hist_obj.search(cr, uid, [('post_id', '=', ref("test_page0"))])
39 model.get_diff(cr, uid, {'active_ids': ids[:] })
41 # I click the "create menu" link and i fill the form.
43 # !record {model: document.page.create.menu, id: test_create_menu0}:
44 # menu_name: Wiki Test menu
45 # menu_parent_id: base.menu_base_partner
47 # I create a Menu by clicking on "create menu"
49 # !python {model: document.page.create.menu}: |
50 # ids = [ref("test_create_menu0")]
51 # context['active_id'] = ref('test_page0')
52 # self.document_page_menu_create(cr, uid, ids, context)