forked from Yaltik/golem
[ADD]GOLEM Activity Session basic calendar view
This commit is contained in:
parent
e9fef7280a
commit
f71577b4e7
@ -71,6 +71,8 @@ class GolemActivitySession(models.Model):
|
|||||||
# TODO: to link with calendar.event
|
# TODO: to link with calendar.event
|
||||||
activity_id = fields.Many2one('golem.activity', string='Activity',
|
activity_id = fields.Many2one('golem.activity', string='Activity',
|
||||||
required=True)
|
required=True)
|
||||||
|
categ_id = fields.Many2one(string='Category',
|
||||||
|
related='activity_id.product_id.categ_id')
|
||||||
animator_id = fields.Many2one('res.partner', string='Animator')
|
animator_id = fields.Many2one('res.partner', string='Animator')
|
||||||
|
|
||||||
@api.onchange('activity_id')
|
@api.onchange('activity_id')
|
||||||
|
@ -105,6 +105,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</field>
|
</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- Calendars -->
|
||||||
|
<record id="calendar" model="ir.ui.view">
|
||||||
|
<field name="name">Activity sessions calendar view</field>
|
||||||
|
<field name="model">golem.activity.session</field>
|
||||||
|
<field name="arch" type="xml">
|
||||||
|
<calendar date_start="date_start" date_end="date_end"
|
||||||
|
color="categ_id" display="[name]">
|
||||||
|
<field name="name" />
|
||||||
|
</calendar>
|
||||||
|
</field>
|
||||||
|
</record>
|
||||||
|
|
||||||
<!-- Searches -->
|
<!-- Searches -->
|
||||||
<record id="searches" model="ir.ui.view">
|
<record id="searches" model="ir.ui.view">
|
||||||
<field name="name">GOLEM Activity Sessions Searches</field>
|
<field name="name">GOLEM Activity Sessions Searches</field>
|
||||||
@ -125,7 +137,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
<!-- Actions -->
|
<!-- Actions -->
|
||||||
<act_window id="session_action_list" name="GOLEM Activities Sessions List"
|
<act_window id="session_action_list" name="GOLEM Activities Sessions List"
|
||||||
res_model="golem.activity.session" view_mode="tree,form" />
|
res_model="golem.activity.session" view_mode="tree,form,calendar" />
|
||||||
<!-- Menus -->
|
<!-- Menus -->
|
||||||
<menuitem id="session_menu_list" name="Activities sessions"
|
<menuitem id="session_menu_list" name="Activities sessions"
|
||||||
parent="golem_activity.activity_menu" action="session_action_list"
|
parent="golem_activity.activity_menu" action="session_action_list"
|
||||||
|
Loading…
Reference in New Issue
Block a user