[IMP] menu and group by

bzr revid: mat@openerp.com-20130318150007-egx399cn4nybu7s8
This commit is contained in:
Martin Trigaux 2013-03-18 16:00:07 +01:00
parent 2cff801d1e
commit 4f723dba7f
4 changed files with 13 additions and 4 deletions

View File

@ -116,8 +116,8 @@
<field name="user_id"/>
<field name="type_id"/>
<group expand="0" string="Group By...">
<filter string="User" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Goal Type" domain="[]" context="{'group_by':'type_id'}"/>
<filter name="group_by_user" string="User" domain="[]" context="{'group_by':'user_id'}"/>
<filter name="group_by_type" string="Goal Type" domain="[]" context="{'group_by':'type_id'}"/>
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
<filter string="End Date" domain="[]" context="{'group_by':'end_date'}"/>
</group>

View File

@ -326,7 +326,7 @@ class gamification_goal_plan(osv.Model):
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid ,'gamification','goals_from_plan_act', context=context)
res['context'] = context
res['context'].update({
'default_id': related_goal_ids
'default_id': related_goal_ids,
})
res['domain'] = [('id','in', related_goal_ids)]
return res

View File

@ -63,7 +63,7 @@
<!-- action buttons -->
<div class="oe_right oe_button_box">
<button name="action_show_related_goals" type="object" string="Related Goals" help="show all the generated goals for this plan" context="{'group_by':'user_id'}"/>
<button name="action_show_related_goals" type="object" string="Related Goals" help="show all the generated goals for this plan" context="{'search_default_group_by_user': True}" />
</div>
<group>

View File

@ -413,9 +413,18 @@
<field name="act_window_id" ref="action_hr_evaluation_interview_tree"/>
</record>
<record id="goals_menu_groupby_act" model="ir.actions.act_window">
<field name="res_model">gamification.goal</field>
<field name="view_type">form</field>
<field name="name">Related Goals</field>
<field name="view_mode">kanban,tree,form</field>
<field name="context">{'search_default_group_by_type': True}</field>
</record>
<menuitem name="Interview Requests" parent="menu_eval_hr" id="menu_open_hr_evaluation_interview_requests"
action="action_hr_evaluation_interview_tree"/>
<menuitem id="gamification_plan_menu_hr" parent="menu_eval_hr" action="gamification.goal_plan_list_action" groups="gamification.group_goal_manager" />
<menuitem id="gamification_goal_menu_hr" parent="menu_eval_hr" action="goals_menu_groupby_act" groups="gamification.group_goal_manager"/>
<!-- Email Compose message Action-->
<act_window