use new API

This commit is contained in:
Giorgio Borelli
2014-11-11 13:25:05 +01:00
committed by Alberto Martínez
parent e782721770
commit 717c4c05ea
47 changed files with 296 additions and 6395 deletions

View File

@@ -30,13 +30,16 @@
Wiki text can easily be edited
'
-
I check the page history for the current page by clicking on "Page History".After that find difference between history.
-
!python {model: wizard.document.page.history.show_diff}: |
hist_obj = model.pool.get('document.page.history')
ids = hist_obj.search(cr, uid, [('page_id', '=', ref("test_page0"))])
model.get_diff(cr, uid, {'active_ids': ids[:] })
!python {model: wizard.document.page.history.show_diff, id: False}: |
hist_obj = self.env['document.page.history']
ids = hist_obj.search([('page_id', '=', ref("test_page0"))])
self.with_context(active_ids=[i.id for i in ids]).get_diff()
-
I click the "create menu" link and i fill the form.
-
@@ -46,9 +49,7 @@
-
I create a Menu by clicking on "create menu"
-
!python {model: document.page.create.menu}: |
ids = [ref("test_create_menu0")]
context['active_id'] = ref('test_page0')
self.document_page_menu_create(cr, uid, ids, context)
!python {model: document.page.create.menu, id: False}: |
menu = self.search([('id', '=', ref("test_create_menu0"))])
menu.with_context(active_id=[ref('test_page0')]).document_page_menu_create()