test_website_blog.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. -
  2. In order to test the document_page in OpenERP, I create a new page to blog blog_blog_1
  3. -
  4. !record {model: blog.post, id: test_page0}:
  5. name: Test Page0
  6. blog_id: blog_blog_1
  7. content: 'Test content
  8. The Odoo wiki allows you to manage your enterprise contents using wiki
  9. restructured texts. This module provides a collaborative way to manage internal
  10. FAQs, quality manuals, technical references, etc.'
  11. -
  12. !record {model: blog.post, id: test_page0}:
  13. content: 'Test updated content
  14. The Odoo wiki allows you to manage your enterprise contents using wiki
  15. restructured texts. This module provides a collaborative way to manage internal
  16. FAQs, quality manuals, technical references, etc.
  17. Wiki text can easily be edited
  18. '
  19. -
  20. I check the page history for the current page by clicking on "Page History".After that find difference between history.
  21. -
  22. !python {model: blog.post.history.show_diff}: |
  23. hist_obj = model.pool.get('blog.post.history')
  24. ids = hist_obj.search(cr, uid, [('post_id', '=', ref("test_page0"))])
  25. model.get_diff(cr, uid, {'active_ids': ids[:] })