2014-08-22 15:51:20 +00:00
|
|
|
# HG changeset patch
|
|
|
|
# Parent a6e217b1fbbc64111581c269629b1c25c23abb99
|
|
|
|
|
2014-08-26 15:28:29 +00:00
|
|
|
Index: addons/openacademy/models.py
|
2014-08-22 15:51:20 +00:00
|
|
|
===================================================================
|
2014-08-26 15:28:29 +00:00
|
|
|
--- addons.orig/openacademy/models.py 2014-08-26 17:25:57.515783409 +0200
|
|
|
|
+++ addons/openacademy/models.py 2014-08-26 17:25:57.511783409 +0200
|
2014-08-24 11:06:51 +00:00
|
|
|
@@ -8,6 +8,9 @@
|
2014-08-22 15:51:20 +00:00
|
|
|
name = fields.Char(string="Title", required=True)
|
|
|
|
description = fields.Text()
|
|
|
|
|
|
|
|
+ responsible_id = fields.Many2one('res.users',
|
|
|
|
+ ondelete='set null', string="Responsible", index=True)
|
|
|
|
+
|
|
|
|
|
|
|
|
class Session(models.Model):
|
|
|
|
_name = 'openacademy.session'
|
|
|
|
@@ -16,3 +19,7 @@
|
2014-08-24 11:06:51 +00:00
|
|
|
start_date = fields.Date()
|
2014-08-22 15:51:20 +00:00
|
|
|
duration = fields.Float(digits=(6, 2), help="Duration in days")
|
|
|
|
seats = fields.Integer(string="Number of seats")
|
2014-08-24 11:06:51 +00:00
|
|
|
+
|
2014-08-22 15:51:20 +00:00
|
|
|
+ instructor_id = fields.Many2one('res.partner', string="Instructor")
|
|
|
|
+ course_id = fields.Many2one('openacademy.course',
|
|
|
|
+ ondelete='cascade', string="Course", required=True)
|
2014-08-26 15:28:29 +00:00
|
|
|
Index: addons/openacademy/views/openacademy.xml
|
2014-08-22 15:51:20 +00:00
|
|
|
===================================================================
|
2014-08-26 15:28:29 +00:00
|
|
|
--- addons.orig/openacademy/views/openacademy.xml 2014-08-26 17:25:57.515783409 +0200
|
|
|
|
+++ addons/openacademy/views/openacademy.xml 2014-08-26 17:25:57.511783409 +0200
|
|
|
|
@@ -64,5 +64,16 @@
|
2014-08-22 15:51:20 +00:00
|
|
|
<!-- Full id location:
|
|
|
|
action="openacademy.course_list_action"
|
|
|
|
It is not required when it is the same module -->
|
|
|
|
+
|
|
|
|
+ <record model="ir.actions.act_window" id="session_list_action">
|
|
|
|
+ <field name="name">Sessions</field>
|
|
|
|
+ <field name="res_model">openacademy.session</field>
|
|
|
|
+ <field name="view_type">form</field>
|
|
|
|
+ <field name="view_mode">tree,form</field>
|
|
|
|
+ </record>
|
|
|
|
+
|
|
|
|
+ <menuitem id="session_menu" name="Sessions"
|
|
|
|
+ parent="openacademy_menu"
|
|
|
|
+ action="session_list_action"/>
|
|
|
|
</data>
|
|
|
|
</openerp>
|