[IMP] better messages
bzr revid: mat@openerp.com-20130410091437-jq5eq9cecvng8kj2
This commit is contained in:
parent
47e0b51da8
commit
4baed41a12
|
@ -207,6 +207,7 @@ class gamification_badge(osv.Model):
|
||||||
'rule_auth': 'everyone',
|
'rule_auth': 'everyone',
|
||||||
'rule_automatic': 'manual',
|
'rule_automatic': 'manual',
|
||||||
'compute_code': "self.nobody(cr, uid, context)",
|
'compute_code': "self.nobody(cr, uid, context)",
|
||||||
|
'public': True
|
||||||
}
|
}
|
||||||
|
|
||||||
def send_badge(self, cr, uid, badge_id, badge_user_ids, user_from=None, context=None):
|
def send_badge(self, cr, uid, badge_id, badge_user_ids, user_from=None, context=None):
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
<field name="model">gamification.badge.user.wizard</field>
|
<field name="model">gamification.badge.user.wizard</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Grant Badge To" version="7.0">
|
<form string="Grant Badge To" version="7.0">
|
||||||
Select the user that will receive this badge
|
Who would you like to reward?
|
||||||
<group>
|
<group>
|
||||||
<field name="user_id" />
|
<field name="user_id" />
|
||||||
<field name="badge_id" invisible="1"/>
|
<field name="badge_id" invisible="1"/>
|
||||||
<field name="comment" />
|
<field name="comment" placeholder="Describe what they did and why it matters" />
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
<field name="model">gamification.badge.user.wizard</field>
|
<field name="model">gamification.badge.user.wizard</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Grant Badge To" version="7.0">
|
<form string="Grant Badge To" version="7.0">
|
||||||
Select the employee that will receive this badge
|
Who would you like to reward?
|
||||||
<group>
|
<group>
|
||||||
<field name="employee_id" />
|
<field name="employee_id" />
|
||||||
<field name="badge_id" invisible="1"/>
|
<field name="badge_id" invisible="1"/>
|
||||||
<field name="comment" />
|
<field name="comment" placeholder="Describe what they did and why it matters" />
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
||||||
|
@ -31,11 +31,11 @@
|
||||||
<field name="model">gamification.badge.user.wizard</field>
|
<field name="model">gamification.badge.user.wizard</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<form string="Reward Employee with" version="7.0">
|
<form string="Reward Employee with" version="7.0">
|
||||||
Select the badge that the employee will receive
|
What are you thank for?
|
||||||
<group>
|
<group>
|
||||||
<field name="employee_id" invisible="1" />
|
<field name="employee_id" invisible="1" />
|
||||||
<field name="badge_id" />
|
<field name="badge_id" />
|
||||||
<field name="comment" />
|
<field name="comment" placeholder="Describe what they did and why it matters" />
|
||||||
</group>
|
</group>
|
||||||
<footer>
|
<footer>
|
||||||
<button string="Reward Employee" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
<button string="Reward Employee" type="object" name="action_grant_badge" class="oe_highlight" /> or
|
||||||
|
@ -62,11 +62,19 @@
|
||||||
<field name="model">hr.employee</field>
|
<field name="model">hr.employee</field>
|
||||||
<field name="inherit_id" ref="hr.view_employee_form"/>
|
<field name="inherit_id" ref="hr.view_employee_form"/>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<xpath expr="//div[@name='button_box']" position="inside">
|
|
||||||
<button string="Grant Badge" type="action" name="%(action_reward_wizard)d" />
|
|
||||||
</xpath>
|
|
||||||
<xpath expr="//page[@string='Public Information']" position="before">
|
<xpath expr="//page[@string='Public Information']" position="before">
|
||||||
<page string="Received Badges">
|
<page string="Received Badges">
|
||||||
|
|
||||||
|
<button string="Grant a Badge" type="action" name="%(action_reward_wizard)d"/> to reward this employee for a good action
|
||||||
|
<div class="oe_view_nocontent" attrs="{'invisible': [('badge_ids', '!=', False)]}">
|
||||||
|
<p class="oe_view_nocontent_create">
|
||||||
|
Click to grant this employee his first badge
|
||||||
|
</p><p class="oe_grey">
|
||||||
|
Badges are rewards of good work. Give them to people you believe deserve it.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<field name="badge_ids" widget="many2many_kanban" />
|
<field name="badge_ids" widget="many2many_kanban" />
|
||||||
</page>
|
</page>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
Loading…
Reference in New Issue