# HG changeset patch # Parent 2ee7212e5de4702dff08d9b5e4268e7dc261d038 # Parent 4ca7b848bb60c3573de7ed41a28b4b65186a5725 diff --git a/academy/__manifest__.py b/academy/__manifest__.py --- a/academy/__manifest__.py +++ b/academy/__manifest__.py @@ -27,6 +27,7 @@ 'security/ir.model.access.csv', 'templates.xml', 'views.xml', + 'data.xml', ], # only loaded in demonstration mode 'demo': [ diff --git a/academy/data.xml b/academy/data.xml new file mode 100644 --- /dev/null +++ b/academy/data.xml @@ -0,0 +1,6 @@ + + + Courses + + + diff --git a/academy/demo.xml b/academy/demo.xml --- a/academy/demo.xml +++ b/academy/demo.xml @@ -10,4 +10,29 @@ Lester Vaughn + + Course 0 + + + True + 0 + service + + + Course 1 + + + True + 0 + service + + + Course 2 + + + True + 0 + service + + diff --git a/academy/models.py b/academy/models.py --- a/academy/models.py +++ b/academy/models.py @@ -8,11 +8,9 @@ class Teachers(models.Model): name = fields.Char() biography = fields.Html() - course_ids = fields.One2many('academy.courses', 'teacher_id', string="Courses") + course_ids = fields.One2many('product.template', 'teacher_id', string="Courses") class Courses(models.Model): - _name = 'academy.courses' - _inherit = 'mail.thread' + _inherit = 'product.template' - name = fields.Char() teacher_id = fields.Many2one('academy.teachers', string="Teacher") diff --git a/academy/security/ir.model.access.csv b/academy/security/ir.model.access.csv --- a/academy/security/ir.model.access.csv +++ b/academy/security/ir.model.access.csv @@ -1,3 +1,2 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink access_academy_teachers,access_academy_teachers,model_academy_teachers,,1,0,0,0 -access_academy_courses,access_academy_courses,model_academy_courses,,1,0,0,0 diff --git a/academy/views.xml b/academy/views.xml --- a/academy/views.xml +++ b/academy/views.xml @@ -26,55 +26,9 @@ - - Academy courses - academy.courses - - - Academy courses: search - academy.courses - - - - - - - - - Academy courses: list - academy.courses - - - - - - - - - Academy courses: form - academy.courses - -
- - -
- - -
-
-
-
- -