[IMP] better messages

bzr revid: mat@openerp.com-20130410091437-jq5eq9cecvng8kj2
This commit is contained in:
Martin Trigaux 2013-04-10 11:14:37 +02:00
parent 47e0b51da8
commit 4baed41a12
3 changed files with 18 additions and 9 deletions

View File

@ -207,6 +207,7 @@ class gamification_badge(osv.Model):
'rule_auth': 'everyone',
'rule_automatic': 'manual',
'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):

View File

@ -24,11 +24,11 @@
<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
Who would you like to reward?
<group>
<field name="user_id" />
<field name="badge_id" invisible="1"/>
<field name="comment" />
<field name="comment" placeholder="Describe what they did and why it matters" />
</group>
<footer>
<button string="Grant Badge" type="object" name="action_grant_badge" class="oe_highlight" /> or

View File

@ -9,11 +9,11 @@
<field name="model">gamification.badge.user.wizard</field>
<field name="arch" type="xml">
<form string="Grant Badge To" version="7.0">
Select the employee that will receive this badge
Who would you like to reward?
<group>
<field name="employee_id" />
<field name="badge_id" invisible="1"/>
<field name="comment" />
<field name="comment" placeholder="Describe what they did and why it matters" />
</group>
<footer>
<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="arch" type="xml">
<form string="Reward Employee with" version="7.0">
Select the badge that the employee will receive
What are you thank for?
<group>
<field name="employee_id" invisible="1" />
<field name="badge_id" />
<field name="comment" />
<field name="comment" placeholder="Describe what they did and why it matters" />
</group>
<footer>
<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="inherit_id" ref="hr.view_employee_form"/>
<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">
<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" />
</page>
</xpath>