2 In order to test the document_page in OpenERP, I create a new document page type on Select Display Method Tree
4 !record {model: document.page.type, id: wiki_groups_wikigrouptest0}:
7 notes: I can Generate New Group for Select Display method = Tree.
9 Now I will create new Doucment page and assign Group test to this page
11 !record {model: document.page, id: wiki_wiki_openerpwikiediting0}:
12 name: OpenERP Wiki Test
13 content: '=The Open ERP wiki=
15 The Open ERP wiki allows you to manage your enterprise contents using wiki
17 restructured texts. This module provides a collaborative way to manage internal
19 FAQs, quality manuals, technical references, etc.'
22 Now I will update the wikipage with other text
24 !record {model: document.page, id: wiki_wiki_openerpwikiediting0}:
25 content: '=The Open ERP wiki=
27 The Open ERP wiki allows you to manage your enterprise contents using wiki
29 restructured texts. This module provides a collaborative way to manage internal
31 FAQs, quality manuals, technical references, etc.
33 Wiki text can easily be edited
36 I check the page history for the current page by clicking on "Page History".After that find difference between history.
38 !python {model: wizard.document.page.history.show_diff}: |
39 hist_obj = model.pool.get('document.page.history')
40 ids = hist_obj.search(cr, uid, [('document_id', '=', ref("wiki_wiki_openerpwikiediting0"))])
41 model.get_diff(cr, uid, {'active_ids': ids[:] })
43 I create a new Document page type on the Given Home Page
45 !record {model: document.page.type, id: wiki_groups_wikigroupediting0}:
46 name: Wiki Group Editing
47 home: document_page.wiki_wiki_quickstart0
49 I Open the page for click on "Open Document Page" button.
51 !python {model: document.page.type}: |
52 self.open_document_page(cr, uid, [ref("wiki_groups_wikigroupediting0")], context)
54 In order to create a menu I will create wizard data
56 !record {model: document.page.type, id: document_page.wiki_groups_wikiformatting0}:
57 home: document_page.wiki_wiki_main
59 I create a Menu by clicking on "create menu" button.
61 !record {model: document.page.create.menu, id: wiki_create_menu_0}:
62 menu_name: Wiki Test menu
63 menu_parent_id: base.menu_base_partner
65 I fill in the form and create the menu
67 !python {model: document.page.create.menu}: |
68 ids = self.search(cr, uid, [])
69 self.document_page_menu_create(cr, uid, ids, context)