Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Simple Academy working example - website addon for Odoo V8 for beginners - call for review

By
Pedro Cachaca
on 9/25/14, 10:54 AM 3,446 views

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

 

 

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

?
Pedro Cachaca
on 9/25/14, 1:35 PM

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

Pedro Cachaca
on 9/25/14, 1:37 PM

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

Pedro Cachaca
on 9/25/14, 5:55 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 9/25/14, 10:54 AM
Seen: 3446 times
Last updated: 3/16/15, 8:10 AM