odoo/addons/gamification/plan_view.xml

181 lines
9.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
<data>
<record id="goal_plan_list_action" model="ir.actions.act_window">
<field name="name">Goal Plans</field>
<field name="res_model">gamification.goal.plan</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
<p class="oe_view_nocontent_create">
Click to create a goal plan.
</p>
<p>
Goal plans allow to create and assign to users easily a list of goals.
A goal plan is a predifined list of goals types with a target value.
The plan can use a period (weekly, monthly...) for automatic creation of goals.
The goals are created for the specified users or memeber of the group.
</p>
</field>
</record>
<record id="goal_plan_list_view" model="ir.ui.view">
<field name="name">Goal Plans List</field>
<field name="model">gamification.goal.plan</field>
<field name="arch" type="xml">
<tree string="Goal types" colors="blue:state == 'draft';grey:state == 'done'">
<field name="name"/>
<field name="period"/>
<field name="state" invisible="1"/>
</tree>
</field>
</record>
<record id="goals_from_plan_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>
</record>
<record id="goal_plan_form_view" model="ir.ui.view">
<field name="name">Goal Plan Form</field>
<field name="model">gamification.goal.plan</field>
<field name="arch" type="xml">
<form string="Goal types" version="7.0">
<header>
<button string="Manual Start" type="object" name="action_start" states="draft" class="oe_highlight"/>
<button string="Check Plan" type="object" name="action_check" states="inprogress"/>
<button string="Close Plan" type="object" name="action_close" states="inprogress" class="oe_highlight"/>
<button string="Reset to Draft" type="object" name="action_cancel" states="inprogress"/>
<button string="Reset Completion" type="object" name="action_reset" states="done"/>
<button string="Report Progress" type="object" name="action_report_progress" states="inprogress,done" groups="base.group_no_one"/>
<field name="state" widget="statusbar"/>
</header>
<sheet>
<div class="oe_title">
<label for="name" class="oe_edit_only"/>
<h1>
<field name="name" attrs="{'readonly':[('state','!=','draft')]}"/>
</h1>
</div>
<!-- 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"/>
</div>
<group>
<group colspan="4">
<field name="start_date" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="period" attrs="{'readonly':[('state','!=','draft')]}"/>
<field name="remind_update_delay"/>
</group>
<group string="Notify" colspan="4">
<label for="visibility_mode"/>
<div>
<field name="visibility_mode" colspan="2" />
<group name="visibility_mode_help" class="oe_grey oe_edit_only" colspan="1">
<p attrs="{'invisible': [('visibility_mode','!=','board')]}">
In Leaderboard mode, the reports will contain the progress of users of this plan.
</p>
<p attrs="{'invisible': [('visibility_mode','!=','progressbar')]}">
In Personal Progressbar mode, the progress of each user can only be seen by himself and the followers of this plan.
</p>
</group>
</div>
<field name="report_message_frequency" />
<field name="report_header" />
<label for="report_message_group_id"/>
<div>
<field name="report_message_group_id" />
<group name="report_help" class="oe_grey oe_edit_only" col="2" colspan="2">
<p attrs="{'invisible': [('report_message_group_id','!=',False)]}">
Select a group that will receive a copy of the reports.
</p>
<p attrs="{'invisible': [('report_message_group_id','=',False)]}">
A copy of the report that user recieve will be sent to this group.
</p>
</group>
</div>
</group>
</group>
<group string="Planlines">
<field name="planline_ids" nolabel="1">
<tree string="Planline List" version="7.0" editable="bottom" >
<field name="type_id"/>
<field name="target_goal"/>
</tree>
</field>
</group>
<group string="Subscription">
<group colspan="4">
<field name="autojoin_group_id" />
</group>
<group colspan="4">
<field name="user_ids" widget="many2many_kanban">
<kanban quick_create="false" create="true">
<field name="name"/>
<templates>
<t t-name="kanban-box">
<div style="position: relative">
<a t-if="! read_only_mode" type="delete" style="position: absolute; right: 0; padding: 4px; diplay: inline-block">X</a>
<div class="oe_module_vignette">
<div class="oe_module_desc">
<field name="name"/>
</div>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/>
</div>
</form>
</field>
</record>
<!-- Planline -->
<record id="goal_planline_list_view" model="ir.ui.view">
<field name="name">Goal planline list</field>
<field name="model">gamification.goal.planline</field>
<field name="arch" type="xml">
<tree string="planline list" >
<field name="type_id"/>
<field name="target_goal"/>
</tree>
</field>
</record>
<record id="goal_plan_search_view" model="ir.ui.view">
<field name="name">Goal Plan Search</field>
<field name="model">gamification.goal.plan</field>
<field name="arch" type="xml">
<search string="Search Goal Plans">
<filter name="draft_inprogress" string="Non-closed Plans"
domain="[('state', 'in', ('inprogress', 'draft'))]"/>
<field name="name"/>
<group expand="0" string="Group By...">
<filter string="State" domain="[]" context="{'group_by':'state'}"/>
<filter string="Period" domain="[]" context="{'group_by':'period'}"/>
</group>
</search>
</field>
</record>
</data>
</openerp>