This question has been flagged

Hi I just built a simple version of the academy example module, repo on git pcachaca/Odoo Website Addon - Simple Academy example : https://github.com/pcachaca/Odoo-Website-Addon---Simple-Academy-example.git

This is a simple working version of the Academy Addon example for Odoo. It is a start for beginners - like me ;).

To show the academy page just go into website app of odoo, and go to url your_website_url/academy/

This addon includes a view.xml files, in order to be able to add datas on backend side of odoo, into academy top menu. The demo.xml file contains datas : the courses and teachers relations are not stated, so you can link a teacher to a course through the backend menu academy.

Next step:

I have above questions, to make this example more fun ;)

The 2 questions (in templates.xml file) : we show the courses done by a teacher : <div t-esc="teacher.course_ids"/>. But how to show the name of this course ? Something like teacher.course_ids.name .... but how to make this working ??? Same to show the name of the teacher for a course. >> SOLVED by using teacher.course_ids[0].name

The third question is : how to write into the demo.xml file the data about the relations Courses-Teachers (One2many and many2one).  ->> ALREADY SOLVED into commit n°4 :  in file demo.xml file, added <field name="teacher_id" ref="padilla"/> where padilla is the ID of the target, repeat for each courses.

Thanks for contributor to review and improve the code, in order to meet new API rules of odoo v8

THIS IS A SIMPLE ACADEMY EXAMPLE FOR BEGINNERS, THANKS FOR YOUR HELP ;)

Pcachaca

 

 

Avatar
Discard
Author

The third question has been solved (refer update of the text). Still remaining the 2 first questions : how to show the name of the course when we have

?
Author

when we have " t-esc="teacher.course_ids "

Author

Open Questions have been solved, refer to update in the question and commits in repo. Next step : Ask contributors to review and improve the code, in order to meet new API rules of odoo v8 THIS IS A SIMPLE ACADEMY EXAMPLE FOR BEGINNERS, THANKS FOR YOUR HELP ;) Pcachaca