[REF] cleaning code
bzr revid: mat@openerp.com-20130404152359-3x3gt9xhkrkr0au4
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
<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" />
|
||||
<field name="rule_max" attrs="{'invisible': [('rule_auth','=','nobody')]}" />
|
||||
<field name="rule_max_number" attrs="{'invisible': [('rule_max','=',False)]}"/>
|
||||
<field name="rule_max_number" attrs="{'invisible': ['!',('rule_max','=',False),('rule_auth','=','nobody')]}"/>
|
||||
</group>
|
||||
<group string="Automatic Rules">
|
||||
<field name="rule_automatic"/>
|
||||
@@ -132,18 +132,7 @@
|
||||
<div class="oe_kanban_left">
|
||||
<a type="open"><img t-att-src="kanban_image('gamification.badge', 'image', record.image.raw_value)" t-att-title="record.name.value" width="24" height="24" /></a>
|
||||
</div>
|
||||
<h4>
|
||||
<a type="open"><field name="name"/></a>
|
||||
<!-- <t t-if="record.stat_my.raw_value > 0"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI
|
||||
WXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3QMSCREbCamR5gAAAXhJREFUOMuV0z9rlEEQBvDf7htF
|
||||
FIwQBCvRQuFAJSJooY29VrH0E1hcCqNign8SYzAxRfTA0nyAg3wBK1GCKSwTK8G7j6AgiHl3LbLm
|
||||
wOQu8Wl2mZ15Zp6ZnWC/GMcrjBvBdTRkX4P/QdNZrGKkWN7sn+CuE5IvsqOyKFnRMhb3DJwsZ2VV
|
||||
5ZgoCt5qGdsyD8ITzGJSW3BVkAUdlZsu++0T/SU8xxQeuyj7LKEWJKcs6Px16y9harv0NVEQBZWm
|
||||
BR33e26Dm/hMW3BLLUvW/XJBlM31XIZMlNsi7pWa5jGjIbiBXBLd8UL+N0e0WIInvMNp8+Wltqx2
|
||||
SBJk06Z98HRnkUHTOZWPomEVojOiUZV26foP2XkHdD3aSRBxXDIsSRKyddmyGklQa5vRtbl7mypr
|
||||
vrnisOBa0TuEgyBhziXwfneCrTG+9kDSkgQJSbaJ2ix42H9QYXvTakdEG4KThfanoKHS9XIvgt7K
|
||||
jspW8F2wIbhtSRr0Vf4AD6Nod0TaN4kAAAAASUVORK5CYII=" alt="got-it" /></t> -->
|
||||
</h4>
|
||||
<h4><a type="open"><field name="name"/></a></h4>
|
||||
<t t-if="record.description.value">
|
||||
<em><field name="description"/></em>
|
||||
</t>
|
||||
|
||||
@@ -335,6 +335,9 @@ class gamification_goal(osv.Model):
|
||||
for field_name in field_names[1:]:
|
||||
res = res.__getitem__(field_name)
|
||||
action['res_id'] = res
|
||||
action['view_mode'] = 'form' # if one element to display, should see it in form mode
|
||||
action['target'] = 'new'
|
||||
print(action)
|
||||
return action
|
||||
except ValueError:
|
||||
_logger.warning("Invalid XML ID '%s' for goal action.", goal.type_id.action_id)
|
||||
@@ -349,8 +352,9 @@ class gamification_goal(osv.Model):
|
||||
}
|
||||
action['context'] = {'default_goal_id': goal_id, 'default_current': goal.current}
|
||||
action['res_model'] = 'gamification.goal.wizard'
|
||||
print(action)
|
||||
return action
|
||||
|
||||
print(False)
|
||||
return False
|
||||
|
||||
def changed_users_avatar(self, cr, uid, ids, context):
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<field name="description">Specify at least a website</field>
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="model_id" eval="ref('base.model_res_company')" />
|
||||
<field name="domain">[('user_ids', 'in', user_id),('website', '!=', 'www.yourcompany.com')]</field>
|
||||
<field name="domain">[('user_ids', 'in', user_id), ('name', '!=', 'Your Company')]</field>
|
||||
<field name="action_id">base.action_res_company_form_my</field>
|
||||
<field name="res_id_field">company_id.id</field>
|
||||
</record>
|
||||
@@ -38,7 +38,7 @@
|
||||
<field name="computation_mode">count</field>
|
||||
<field name="model_id" eval="ref('base.model_res_company')" />
|
||||
<field name="domain">[('user_ids', 'in', user_id),('logo', '!=', False)]</field>
|
||||
<field name="action_id">base.action_res_company_form_my</field>
|
||||
<field name="action_id">base.action_res_company_form</field>
|
||||
<field name="res_id_field">company_id.id</field>
|
||||
</record>
|
||||
|
||||
@@ -51,29 +51,6 @@
|
||||
</record>
|
||||
|
||||
|
||||
<!-- planlines -->
|
||||
<record model="gamification.goal.planline" id="planline_base_discover1">
|
||||
<field name="type_id" eval="ref('type_base_timezone')" />
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_discover2">
|
||||
<field name="type_id" eval="ref('type_base_avatar')" />
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
|
||||
<record model="gamification.goal.planline" id="planline_base_admin1">
|
||||
<field name="type_id" eval="ref('type_base_company_data')" />
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_admin2">
|
||||
<field name="type_id" eval="ref('type_base_company_logo')" />
|
||||
<field name="target_goal">1</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_admin3">
|
||||
<field name="type_id" eval="ref('type_base_invite')" />
|
||||
<field name="target_goal">1</field>
|
||||
<!-- goal owner not included -->
|
||||
</record>
|
||||
|
||||
<!-- plans -->
|
||||
<record model="gamification.goal.plan" id="plan_base_discover">
|
||||
@@ -81,10 +58,8 @@
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">progressbar</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="planline_ids" eval="[(4, ref('planline_base_discover1')),(4, ref('planline_base_discover2'))]"/>
|
||||
<field name="autojoin_group_id" eval="ref('base.group_user')" />
|
||||
<field name="start_date" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d')"/>
|
||||
<!-- setting start date to yesterday allows automatic start at database creation -->
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
|
||||
<record model="gamification.goal.plan" id="plan_base_configure">
|
||||
@@ -92,29 +67,38 @@
|
||||
<field name="period">once</field>
|
||||
<field name="visibility_mode">progressbar</field>
|
||||
<field name="report_message_frequency">never</field>
|
||||
<field name="planline_ids" eval="[(4, ref('planline_base_admin1')),(4, ref('planline_base_admin2')), (4, ref('planline_base_admin3'))]"/>
|
||||
<field name="autojoin_group_id" eval="ref('base.group_erp_manager')" />
|
||||
<field name="start_date" eval="(DateTime.today() - timedelta(days=1)).strftime('%Y-%m-%d')"/>
|
||||
<field name="state">inprogress</field>
|
||||
</record>
|
||||
|
||||
|
||||
<!-- link planline -> plan -->
|
||||
<!-- planlines -->
|
||||
<record model="gamification.goal.planline" id="planline_base_discover1">
|
||||
<field name="type_id" eval="ref('type_base_timezone')" />
|
||||
<field name="target_goal">1</field>
|
||||
<field name="plan_id" eval="ref('plan_base_discover')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_discover2">
|
||||
<field name="type_id" eval="ref('type_base_avatar')" />
|
||||
<field name="target_goal">1</field>
|
||||
<field name="plan_id" eval="ref('plan_base_discover')" />
|
||||
</record>
|
||||
|
||||
<record model="gamification.goal.planline" id="planline_base_admin1">
|
||||
<record model="gamification.goal.planline" id="planline_base_admin2">
|
||||
<field name="type_id" eval="ref('type_base_company_logo')" />
|
||||
<field name="target_goal">1</field>
|
||||
<field name="plan_id" eval="ref('plan_base_configure')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_admin2">
|
||||
<record model="gamification.goal.planline" id="planline_base_admin1">
|
||||
<field name="type_id" eval="ref('type_base_company_data')" />
|
||||
<field name="target_goal">1</field>
|
||||
<field name="plan_id" eval="ref('plan_base_configure')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_base_admin3">
|
||||
<field name="type_id" eval="ref('type_base_invite')" />
|
||||
<field name="target_goal">1</field>
|
||||
<field name="plan_id" eval="ref('plan_base_configure')" />
|
||||
</record>
|
||||
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -112,7 +112,6 @@
|
||||
<filter name="closed" string="Closed" domain="[('state', 'in', ('reached', 'failed'))]"/>
|
||||
<separator/>
|
||||
|
||||
<field name="planline_id"/>
|
||||
<field name="user_id"/>
|
||||
<field name="type_id"/>
|
||||
<group expand="0" string="Group By...">
|
||||
@@ -204,28 +203,29 @@
|
||||
<field name="arch" type="xml">
|
||||
<form string="Goal types" version="7.0">
|
||||
<sheet>
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
<h1>
|
||||
<div class="oe_edit_only">
|
||||
<label for="name"/>
|
||||
</div>
|
||||
<field name="name"/>
|
||||
</h1>
|
||||
<group>
|
||||
<group string="General">
|
||||
<field name="description"/>
|
||||
<field name="description" string="Tooltip"/>
|
||||
<field name="condition"/>
|
||||
<field name="monetary" />
|
||||
<field name="unit" attrs="{'invisible': [('monetary', '=', True)]}"/>
|
||||
</group>
|
||||
<group string="Computation">
|
||||
<field name="computation_mode"/>
|
||||
<field widget="radio" name="computation_mode"/>
|
||||
|
||||
<!-- Hide the fields below if manually -->
|
||||
<field name="model_id" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}"/>
|
||||
<field name="field_id" attrs="{'invisible':[('computation_mode','!=','sum')], 'required':[('computation_mode','=','sum')]}" domain="[('model_id','=',model_id)]" />
|
||||
<field name="field_date_id" attrs="{'invisible':[('computation_mode','=','manually')]}" domain="[('ttype', 'in', ('date', 'datetime')), ('model_id','=',model_id)]"/>
|
||||
<field name="domain" attrs="{'invisible':[('computation_mode','=','manually')], 'required':[('computation_mode','!=','manually')]}"/>
|
||||
</group>
|
||||
<group string="User Action">
|
||||
<field name="action_id" />
|
||||
<field name="res_id_field" />
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
@@ -168,25 +168,6 @@ class gamification_goal_plan(osv.Model):
|
||||
'manager_id' : lambda s, cr, uid, c: uid,
|
||||
}
|
||||
|
||||
def _check_nonzero_planline(self, cr, uid, ids, context=None):
|
||||
"""checks that there is at least one planline set"""
|
||||
for plan in self.browse(cr, uid, ids, context):
|
||||
if len(plan.planline_ids) < 1:
|
||||
return False
|
||||
return True
|
||||
|
||||
def _check_nonzero_users(self, cr, uid, ids, context=None):
|
||||
"""checks that there is at least one user set"""
|
||||
for plan in self.browse(cr, uid, ids, context):
|
||||
if len(plan.user_ids) < 1 and plan.state != 'draft':
|
||||
return False
|
||||
return True
|
||||
|
||||
_constraints = [
|
||||
(_check_nonzero_planline, "At least one planline is required to create a goal plan", ['planline_ids']),
|
||||
(_check_nonzero_users, "At least one user is required to create a non-draft goal plan", ['user_ids']),
|
||||
]
|
||||
|
||||
def write(self, cr, uid, ids, vals, context=None):
|
||||
"""Overwrite the write method to add the user of groups"""
|
||||
context = context or {}
|
||||
@@ -208,7 +189,7 @@ class gamification_goal_plan(osv.Model):
|
||||
"""Daily cron check.
|
||||
|
||||
Start planned plans (in draft and with start_date = today)
|
||||
Create the goals for planlines not linked to goals (eg: modified the
|
||||
Create the goals for planlines not linked to goals (eg: modified the
|
||||
plan to add planlines)
|
||||
Update every goal running
|
||||
"""
|
||||
@@ -226,7 +207,6 @@ class gamification_goal_plan(osv.Model):
|
||||
goal_obj = self.pool.get('gamification.goal')
|
||||
# we use yesterday to update the goals that just ended
|
||||
yesterday = date.today() - timedelta(days=1)
|
||||
# TOCHECK conflict with date rule in goal update() function
|
||||
goal_ids = goal_obj.search(cr, uid, [
|
||||
'&',
|
||||
('state', 'not in', ('draft', 'canceled')),
|
||||
@@ -246,9 +226,12 @@ class gamification_goal_plan(osv.Model):
|
||||
if not context: context = {}
|
||||
goal_obj = self.pool.get('gamification.goal')
|
||||
|
||||
self.generate_goals_from_plan(cr, uid, ids, context=context)
|
||||
|
||||
for plan in self.browse(cr, uid, ids, context=context):
|
||||
if plan.autojoin_group_id:
|
||||
print("subscribe from group", plan.autojoin_group_id, [user.id for user in plan.autojoin_group_id.users])
|
||||
self.plan_subscribe_users(cr, uid, ids, [user.id for user in plan.autojoin_group_id.users], context=context)
|
||||
self.generate_goals_from_plan(cr, uid, [plan.id], context=context)
|
||||
|
||||
# goals closed but still opened at the last report date
|
||||
closed_goals_to_report = goal_obj.search(cr, uid, [
|
||||
('plan_id', '=', plan.id),
|
||||
@@ -568,7 +551,7 @@ class gamification_goal_planline(osv.Model):
|
||||
|
||||
_name = 'gamification.goal.planline'
|
||||
_description = 'Gamification generic goal for plan'
|
||||
_order = "sequence_type"
|
||||
_order = "sequence_type, id"
|
||||
|
||||
def _get_planline_types(self, cr, uid, ids, context=None):
|
||||
"""Return the ids of planline items related to the gamification.goal.type
|
||||
@@ -583,8 +566,10 @@ class gamification_goal_planline(osv.Model):
|
||||
return result.keys()
|
||||
|
||||
_columns = {
|
||||
'name': fields.related('type_id', 'name', string="Name"),
|
||||
'plan_id': fields.many2one('gamification.goal.plan',
|
||||
string='Plan',
|
||||
required=True,
|
||||
ondelete="cascade"),
|
||||
'type_id': fields.many2one('gamification.goal.type',
|
||||
string='Goal Type',
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
<group string="Notify" colspan="4">
|
||||
<label for="visibility_mode"/>
|
||||
<div>
|
||||
<field name="visibility_mode" colspan="2" />
|
||||
<field name="visibility_mode" type="radio" colspan="2" />
|
||||
|
||||
|
||||
<group name="visibility_mode_help" class="oe_grey oe_edit_only" colspan="1">
|
||||
<p attrs="{'invisible': [('visibility_mode','!=','board')]}">
|
||||
@@ -121,8 +122,8 @@
|
||||
<field name="autojoin_group_id" />
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field name="user_ids" widget="many2many_kanban">
|
||||
<kanban quick_create="false" create="true">
|
||||
<field name="user_ids" widget="many2many_tag" />
|
||||
<!-- <kanban quick_create="false" create="true">
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
@@ -137,7 +138,7 @@
|
||||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field>
|
||||
</field> -->
|
||||
</group>
|
||||
</group>
|
||||
</sheet>
|
||||
|
||||
@@ -72,6 +72,9 @@ class res_users_gamification_group(osv.Model):
|
||||
vals['own_goal_id'] = goal[1].id
|
||||
serialized_goals_info['planlines'].append(vals)
|
||||
|
||||
if len(serialized_goals_info['planlines']) == 0:
|
||||
# plan with no valid planlines
|
||||
continue
|
||||
else:
|
||||
# individual report are simply a list of goal
|
||||
goals_info = plan_obj.get_indivual_goal_info(cr, uid, uid, plan, subset_goal_ids=False, context=context)
|
||||
|
||||
@@ -6,14 +6,8 @@
|
||||
<field name="description"></field>
|
||||
<field name="sequence">17</field>
|
||||
</record>
|
||||
<record id="group_goal_user" model="res.groups">
|
||||
<field name="name">User</field>
|
||||
<field name="category_id" ref="module_goal_category"/>
|
||||
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
|
||||
</record>
|
||||
<record id="group_goal_manager" model="res.groups">
|
||||
<field name="name">Manager</field>
|
||||
<field name="implied_ids" eval="[(4, ref('group_goal_user'))]"/>
|
||||
<field name="category_id" ref="module_goal_category"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
@@ -23,7 +17,7 @@
|
||||
<record id="goal_user_visibility" model="ir.rule">
|
||||
<field name="name">User can only see his/her goals</field>
|
||||
<field name="model_id" ref="model_gamification_goal"/>
|
||||
<field name="groups" eval="[(4, ref('group_goal_user'))]"/>
|
||||
<field name="groups" eval="[(4, ref('base.group_user'))]"/>
|
||||
<field name="perm_read" eval="True"/>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_create" eval="False"/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
|
||||
goal_anybody,"Goal Anybody",model_gamification_goal,,1,0,0,0
|
||||
goal_manager,"Goal Manager",model_gamification_goal,group_goal_manager,1,1,1,1
|
||||
goal_user,"Goal User",model_gamification_goal,group_goal_user,1,1,0,0
|
||||
goal_user,"Goal User",model_gamification_goal,base.group_user,1,1,0,0
|
||||
goal_type_manager,"Goal Type Manager",model_gamification_goal_type,group_goal_manager,1,1,1,1
|
||||
goal_type_anybody,"Goal Type Anybody",model_gamification_goal_type,,1,0,0,0
|
||||
plan_manager,"Goal Plan Manager",model_gamification_goal_plan,group_goal_manager,1,1,1,1
|
||||
@@ -9,7 +9,8 @@ plan_user_anybody,"Goal Plan Anybody",model_gamification_goal_plan,,1,0,0,0
|
||||
planline_manager,"Goal Planline Manager",model_gamification_goal_planline,group_goal_manager,1,1,1,1
|
||||
planline_anybody,"Goal Planline Anybody",model_gamification_goal_planline,,1,0,0,0
|
||||
badge_manager,"Badge Manager",model_gamification_badge,group_goal_manager,1,1,1,1
|
||||
badge_user,"Badge Manager",model_gamification_badge,base.group_user,1,0,0,0
|
||||
badge_anybody,"Badge Anybody",model_gamification_badge,,1,0,0,0
|
||||
badge_user_manager,"Badge-user Manager",model_gamification_badge_user,group_goal_manager,1,1,1,1
|
||||
badge_user_user,"Badge-user User",model_gamification_badge_user,group_goal_user,1,1,1,0
|
||||
badge_user_user,"Badge-user User",model_gamification_badge_user,base.group_user,1,1,1,0
|
||||
badge_user_anybody,"Badge-user Anybody",model_gamification_badge_user,,1,0,0,0
|
||||
|
||||
|
@@ -10,7 +10,7 @@
|
||||
|
||||
<p class="oe_grey">${object.report_header or ''}</p>
|
||||
|
||||
<p>You have not updated your progress for the goal ${object.type_id.name} (currently reached at ${object.completeness}%) for at least ${object.remind_update_delay}. Do not forget to do it.</p>
|
||||
<p>You have not updated your progress for the goal ${object.type_id.name} (currently reached at ${object.completeness}%) for at least ${object.remind_update_delay} days. Do not forget to do it.</p>
|
||||
|
||||
<p>If you have not changed your score yet, you can use the button "The current value is up to date" to indicate so.</p>
|
||||
</body>
|
||||
@@ -125,46 +125,6 @@
|
||||
|
||||
|
||||
|
||||
<!-- planlines -->
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale1">
|
||||
<field name="type_id" eval="ref('type_crm_tot_invoices')" />
|
||||
<field name="target_goal">20000</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale2">
|
||||
<field name="type_id" eval="ref('type_crm_lead_delay_close')" />
|
||||
<field name="target_goal">20</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale3">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_sale_order_created')" />
|
||||
<field name="target_goal">5</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale4">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_paid_sale_order')" />
|
||||
<field name="target_goal">5</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale5">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_customer_refunds')" />
|
||||
<field name="target_goal">4</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing1">
|
||||
<field name="type_id" eval="ref('type_crm_lead_delay_open')" />
|
||||
<field name="target_goal">15</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing2">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_new_leads')" />
|
||||
<field name="target_goal">7</field>
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing3">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_new_opportunities')" />
|
||||
<field name="target_goal">5</field>
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- plans -->
|
||||
<record model="gamification.goal.plan" id="plan_crm_sale">
|
||||
<field name="name">Salesperson</field>
|
||||
@@ -173,7 +133,6 @@
|
||||
<field name="autojoin_group_id" eval="ref('base.group_sale_salesman')" />
|
||||
<field name="report_message_frequency">weekly</field>
|
||||
<field name="report_header">The following message contains the current progress of the sale team based on several criterias. The progress is reinitialised each month and shared weekly.</field>
|
||||
<field name="planline_ids" eval="[(4, ref('planline_crm_sale1')),(4, ref('planline_crm_sale2')),(4, ref('planline_crm_sale3')),(4, ref('planline_crm_sale4')),(4, ref('planline_crm_sale5'))]"/>
|
||||
</record>
|
||||
|
||||
<record model="gamification.goal.plan" id="plan_crm_marketing">
|
||||
@@ -183,34 +142,52 @@
|
||||
<field name="autojoin_group_id" eval="ref('base.group_sale_salesman')" />
|
||||
<field name="report_message_frequency">weekly</field>
|
||||
<field name="report_header">The following message contains the current progress of the marketing team based on several criterias. The progress is reinitialised each month and shared weekly.</field>
|
||||
<field name="planline_ids" eval="[(4, ref('planline_crm_marketing1')),(4, ref('planline_crm_marketing2')),(4, ref('planline_crm_marketing3'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- link planline -> plan -->
|
||||
<!-- planlines -->
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale1">
|
||||
<field name="type_id" eval="ref('type_crm_tot_invoices')" />
|
||||
<field name="target_goal">20000</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_sale')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale2">
|
||||
<field name="type_id" eval="ref('type_crm_lead_delay_close')" />
|
||||
<field name="target_goal">20</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_sale')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale3">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_sale_order_created')" />
|
||||
<field name="target_goal">5</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_sale')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale4">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_paid_sale_order')" />
|
||||
<field name="target_goal">5</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_sale')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_sale5">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_customer_refunds')" />
|
||||
<field name="target_goal">4</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_sale')" />
|
||||
</record>
|
||||
|
||||
|
||||
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing1">
|
||||
<field name="type_id" eval="ref('type_crm_lead_delay_open')" />
|
||||
<field name="target_goal">15</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_marketing')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing2">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_new_leads')" />
|
||||
<field name="target_goal">7</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_marketing')" />
|
||||
</record>
|
||||
<record model="gamification.goal.planline" id="planline_crm_marketing3">
|
||||
<field name="type_id" eval="ref('type_crm_nbr_new_opportunities')" />
|
||||
<field name="target_goal">5</field>
|
||||
<field name="plan_id" eval="ref('plan_crm_marketing')" />
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</field>
|
||||
</record>
|
||||
|
||||
<menuitem id="gamification_badge_menu_hr" parent="hr.menu_hr_main" action="gamification.badge_list_action" groups="gamification.group_goal_user" />
|
||||
<menuitem id="gamification_badge_menu_hr" parent="hr.menu_hr_main" action="gamification.badge_list_action" />
|
||||
|
||||
|
||||
<record id="gamification.view_badge_wizard_reward" model="ir.ui.view">
|
||||
|
||||
Reference in New Issue
Block a user