3 from openerp.osv import osv, fields
5 class theme(osv.Model):
9 "name": fields.char(string="Title", size=64, required=True),
10 "description": fields.text(string="Description"),
11 "questions": fields.one2many("faq.question" , "theme_id", string="Questions"),
14 class question(osv.Model):
15 _name = "faq.question"
18 "name": fields.char(string="Title", size=64, required=True),
19 "description": fields.text(string="Description"),
20 "theme_id": fields.many2one("faq.theme", string="Theme", required=True),
21 "answers": fields.one2many("faq.answer" , "question_id", string="Answers"),
24 class answer(osv.Model):
28 "name": fields.char(string="Title", size=64, required=True),
29 "description": fields.text(string="Description"),
30 "question_id": fields.many2one("faq.question", string="Question", required=True),