Visualizing Data in Odoo: How to Create a New View

Odoo Experience 2018 / Developers

215 views
0 Likes
0 0

Share on Social Networks

Share Link

Use permanent link to share in social media

Share with a friend

Please login to send this presentation by email!

Embed in your website

Select page to start with

14. Basic structure of a view

15. Basic structure of a view

23. Hello World!

26. Use a library

30. Use a library

31. Fetch and use Data

37. Fetch and use Data

38. Use the search view

43. Use the search view

44. Use the arch

48. Open a contact form

53. Use js_class

60. Extensions: js_class

3. View Client Action

2. Why a view? 1

6. Hello World View 2

52. Extend a view 3

61. Conclusion 4

7. First steps

24. Hello World! In renderer!

25. Hello World! In renderer!

27. Use a library In view!

32. Fetch and use Data In model!

33. Fetch and use Data In model!

34. Fetch and use Data In model!

35. Fetch and use Data In model!

39. Use the search view In model!

40. Use the search view In model!

45. Use the arch (In data.xml)

49. Open a contact form In renderer!

50. Open a contact form In renderer!

51. Open a contact form In renderer!

16. Basic structure of a view ● Import things

62. Conclusion ● At this point: a new view with approx. 130 loc

28. Use a library In renderer! In view!

29. Use a library In renderer! In view!

36. Fetch and use Data In model! In renderer!

46. Use the arch (In data.xml) In view!

54. Use js_class New jS module! Start again!

55. Use js_class New jS module! Start again!

17. Basic structure of a view ● Import things ● A view is... a view

18. Basic structure of a view ● Import things ● A view is... a view

41. Use the search view Fine! Just needs some protections (leaflet has already rendered the map) In model!

47. Use the arch (In data.xml) In view! In model!

56. Use js_class In controller! Start again! New jS module!

57. Use js_class In controller! Start again! New jS module!

42. Use the search view In renderer! Fine! Just needs some protections (leaflet has already rendered the map) In model!

58. Use js_class In controller! No need to declare view server side! Start again! New jS module!

59. Use js_class In controller! No need to declare view server side! In arch! Start again! New jS module!

1. Mathieu Duckerts-Antoine (DAM) • R&D Developer Visualizing Data In Odoo: How to create a new view EXPERIENCE 2018

19. Basic structure of a view ● Import things ● A view is... a view ● MVC pattern

65. Thank you. #odooexperience 2018 EXPERIENCE 2018 View code available at https://github.com/Polymorphe57/hello_world_view_code

20. Basic structure of a view ● Import things ● A view is... a view ● MVC pattern (with V=R!)

4. View Some constraints but Framework support Client Action

21. Basic structure of a view ● Import things ● A view is... a view ● MVC pattern (with V=R!) ● Export things

22. Basic structure of a view ● Import things ● A view is... a view ● MVC pattern (with V=R!) ● Export things ● Nice result but... empty

63. Conclusion ● At this point: a new view with approx. 130 loc ● Things to be done: ○ Write tests ○ Write documentation ○ Make customization easy by studio ○ write rng file for arch control

64. Conclusion ● At this point: a new view with approx. 130 loc ● Things to be done: ○ Write tests ○ Write documentation ○ Make customization easy by studio ○ write rng file for arch control ● Rather easy and fast to create a new view

5. View Some constraints but Framework support Client Action Lot of liberties but Lot of work

8. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure

9. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure ● make server recognize the new view type

10. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure ● make server recognize the new view type

11. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure ● make server recognize the new view type ● define assets bundles (js, scss)

12. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure ● make server recognize the new view type ● define assets bundles (js, scss)

13. First steps . └── hello_world_view ├── __init__.py ├── __manifest__.py ├── models │ ├── __init__.py │ ├── ir_action.py │ └── ir_ui_view.py ├── static │ └── src │ ├── js │ │ └── hello_world_view.js │ └── scss │ └── hello_world_view.scss └── views ├── assets.xml └── data.xml ● create basic addon structure ● make server recognize the new view type ● define assets bundles (js, scss)

Views

  • 215 Total Views
  • 0 Website Views
  • 215 Embedded Views

Actions

  • 0 Social Shares
  • 0 Likes
  • 0 Dislikes
  • 0 Comments

Share count

  • 0 Facebook
  • 0 Twitter
  • 0 LinkedIn
  • 0 Google+