[FIX] gamification: set data in noupdate blocks to allow the user to customise it without loosing changes after update
bzr revid: mat@openerp.com-20140418120846-h8yo4ljult88f1h3
This commit is contained in:
parent
e0451e28cd
commit
067f21ce5a
|
@ -32,10 +32,6 @@
|
|||
<field name="rule_max_number">2</field>
|
||||
<field name="image" type="base64" file="gamification/static/img/badge_idea-image.png"/>
|
||||
</record>
|
||||
</data>
|
||||
|
||||
|
||||
<data noupdate="0">
|
||||
|
||||
<record id="email_template_badge_received" model="email.template">
|
||||
<field name="name">Received Badge</field>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
<record forcecreate="True" id="ir_cron_check_challenge"
|
||||
model="ir.cron">
|
||||
<field name="name">Run Goal Challenge Checker</field>
|
||||
|
|
|
@ -92,10 +92,6 @@
|
|||
]]></field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
|
||||
<data>
|
||||
|
||||
<!-- goal definitions -->
|
||||
<record model="gamification.goal.definition" id="definition_base_timezone">
|
||||
<field name="name">Set your Timezone</field>
|
||||
|
|
|
@ -377,6 +377,7 @@ class gamification_challenge(osv.Model):
|
|||
can be called after each change in the list of users or lines.
|
||||
:param list(int) ids: the list of challenge concerned"""
|
||||
|
||||
goal_obj = self.pool.get('gamification.goal')
|
||||
for challenge in self.browse(cr, uid, ids, context):
|
||||
(start_date, end_date) = start_end_date_for_period(challenge.period)
|
||||
|
||||
|
@ -390,7 +391,6 @@ class gamification_challenge(osv.Model):
|
|||
# FIXME: allow to restrict to a subset of users
|
||||
for user in challenge.user_ids:
|
||||
|
||||
goal_obj = self.pool.get('gamification.goal')
|
||||
domain = [('line_id', '=', line.id), ('user_id', '=', user.id)]
|
||||
if start_date:
|
||||
domain.append(('start_date', '=', start_date))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0"?>
|
||||
<openerp>
|
||||
<data>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- goal definitions -->
|
||||
<record model="gamification.goal.definition" id="definition_crm_tot_invoices">
|
||||
|
|
Loading…
Reference in New Issue