2013-03-11 09:39:30 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<openerp>
|
|
|
|
<data>
|
|
|
|
|
|
|
|
<!-- Goal views -->
|
|
|
|
<record id="badge_list_action" model="ir.actions.act_window">
|
|
|
|
<field name="name">Badges</field>
|
|
|
|
<field name="res_model">gamification.badge</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="help" type="html">
|
|
|
|
<p class="oe_view_nocontent_create">
|
|
|
|
Click to create a badge.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
A badge is a symbolic token granted to a user as a sign of reward.
|
|
|
|
It can be deserved automatically when some conditions are met or manually by users.
|
|
|
|
</p>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2013-03-11 16:57:16 +00:00
|
|
|
|
|
|
|
<record id="view_badge_wizard_grant" model="ir.ui.view">
|
|
|
|
<field name="name">Grant Badge User Form</field>
|
|
|
|
<field name="model">gamification.badge.user.wizard</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Grant Badge To" version="7.0">
|
|
|
|
Select the user that will receive this badge
|
|
|
|
<group>
|
|
|
|
<field name="user_id" />
|
|
|
|
<field name="badge_id" invisible="1"/>
|
|
|
|
</group>
|
|
|
|
<footer>
|
|
|
|
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
|
|
|
<button string="Cancel" special="cancel" class="oe_link"/>
|
|
|
|
</footer>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<act_window domain="[]" id="action_grant_wizard"
|
|
|
|
name="Grant Badge"
|
|
|
|
target="new"
|
|
|
|
res_model="gamification.badge.user.wizard"
|
|
|
|
context="{'default_badge_id': active_id, 'badge_id': active_id}"
|
|
|
|
view_type="form" view_mode="form"/>
|
|
|
|
|
2013-03-11 09:39:30 +00:00
|
|
|
<record id="badge_list_view" model="ir.ui.view">
|
|
|
|
<field name="name">Badge List</field>
|
|
|
|
<field name="model">gamification.badge</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree string="Badge List">
|
|
|
|
<field name="name"/>
|
|
|
|
<field name="stat_count"/>
|
2013-03-11 11:04:23 +00:00
|
|
|
<field name="stat_my"/>
|
2013-03-11 09:39:30 +00:00
|
|
|
<field name="rule_auth"/>
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<record id="badge_form_view" model="ir.ui.view">
|
|
|
|
<field name="name">Badge Form</field>
|
|
|
|
<field name="model">gamification.badge</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form string="Badge" version="7.0">
|
|
|
|
<sheet>
|
|
|
|
<div class="oe_right oe_button_box">
|
2013-03-12 11:38:08 +00:00
|
|
|
<button string="Send this Badge" type="action" name="%(action_grant_wizard)d" class="oe_highlight" />
|
|
|
|
<button string="Check Badge" type="object" name="check_automatic" groups="base.group_no_one" />
|
2013-03-11 09:39:30 +00:00
|
|
|
</div>
|
|
|
|
<field name="image" widget='image' class="oe_left oe_avatar"/>
|
|
|
|
<div class="oe_title">
|
|
|
|
<label for="name" class="oe_edit_only"/>
|
|
|
|
<h1>
|
|
|
|
<field name="name"/>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
<field name="description" />
|
2013-03-12 08:30:43 +00:00
|
|
|
<group string="User Rules">
|
|
|
|
<field name="rule_auth" string="Allowed to Grant" />
|
2013-03-11 16:57:16 +00:00
|
|
|
<field name="rule_auth_user_ids" attrs="{'invisible': [('rule_auth','!=','users')]}" widget="many2many_tags" />
|
|
|
|
<field name="rule_auth_badge_ids" attrs="{'invisible': [('rule_auth','!=','having')]}" widget="many2many_tags" />
|
2013-03-11 09:39:30 +00:00
|
|
|
<field name="rule_max"/>
|
2013-03-11 11:04:23 +00:00
|
|
|
<field name="rule_max_number" attrs="{'invisible': [('rule_max','=',False)]}"/>
|
2013-03-11 09:39:30 +00:00
|
|
|
</group>
|
2013-03-12 08:30:43 +00:00
|
|
|
<group string="Automatic Rules">
|
|
|
|
<field name="rule_automatic"/>
|
|
|
|
<field name="compute_code" attrs="{'invisible': [('rule_automatic','!=','python')]}"/>
|
|
|
|
<field name="goal_type_ids" attrs="{'invisible': [('rule_automatic','!=','goals')]}" widget="many2many_tags"/>
|
|
|
|
</group>
|
2013-03-11 09:39:30 +00:00
|
|
|
</sheet>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
</data>
|
|
|
|
</openerp>
|