From 0222ae2a211667f9f38e173ff3211615cd5dc7af Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 15 Apr 2013 17:50:14 +0200 Subject: [PATCH] [IMP] better data bzr revid: mat@openerp.com-20130415155014-y6bdafhnmb5g7kqj --- addons/gamification/goal.py | 6 +-- addons/gamification/goal_base_data.xml | 10 ++-- addons/gamification/plan.py | 17 +++++-- addons/gamification/plan_view.xml | 7 +-- addons/gamification/static/src/css/goal.css | 12 +++-- .../static/src/xml/gamification.xml | 13 ++--- .../gamification_sale_crm/sale_crm_goals.xml | 48 ++++++++----------- addons/hr_evaluation/hr_evaluation_view.xml | 4 +- 8 files changed, 59 insertions(+), 58 deletions(-) diff --git a/addons/gamification/goal.py b/addons/gamification/goal.py index a6de0895d92..59225724193 100644 --- a/addons/gamification/goal.py +++ b/addons/gamification/goal.py @@ -145,9 +145,9 @@ class gamification_goal(osv.Model): def on_change_type_id(self, cr, uid, ids, type_id=False, context=None): goal_type = self.pool.get('gamification.goal.type') if not type_id: - return {'value':{'type_id': False}} + return {'value': {'type_id': False}} goal_type = goal_type.browse(cr, uid, type_id, context=context) - ret = {'value' : {'computation_mode' : goal_type.computation_mode}} + ret = {'value': {'computation_mode': goal_type.computation_mode}} return ret _columns = { @@ -188,7 +188,7 @@ class gamification_goal(osv.Model): track_visibility='always'), 'computation_mode': fields.related('type_id', 'computation_mode', - type='char', + type='char', string="Type computation mode"), 'remind_update_delay': fields.integer('Remind delay', help="The number of days after which the user assigned to a manual goal will be reminded. Never reminded if no value is specified."), diff --git a/addons/gamification/goal_base_data.xml b/addons/gamification/goal_base_data.xml index 750ce3284c8..41c62b991a7 100644 --- a/addons/gamification/goal_base_data.xml +++ b/addons/gamification/goal_base_data.xml @@ -4,7 +4,7 @@ - Change Timezone + Set your Timezone Configure your profile and specify your timezone count True @@ -15,7 +15,7 @@ - Change of avatar + Set your Avatar In your user perference manually True @@ -26,7 +26,7 @@ - Set your company data + Set your Company Data Specify at least a website count True @@ -37,7 +37,7 @@ - Invite new users + Invite new Users Create at least another user True count diff --git a/addons/gamification/plan.py b/addons/gamification/plan.py index 99701b1d544..feb12f6df83 100644 --- a/addons/gamification/plan.py +++ b/addons/gamification/plan.py @@ -107,7 +107,7 @@ class gamification_goal_plan(osv.Model): return res _columns = { - 'name': fields.char('Plan Name', required=True, translate=True), + 'name': fields.char('Challenge Name', required=True, translate=True), 'description': fields.text('Description', translate=True), 'state': fields.selection([ ('draft', 'Draft'), @@ -117,11 +117,11 @@ class gamification_goal_plan(osv.Model): string='State', required=True), 'manager_id': fields.many2one('res.users', - string='Responsible', help="The user responsible for the plan."), + string='Responsible', help="The user responsible for the challenge."), 'start_date': fields.date('Planned Start Date', - help="The day a new plan will be automatically started. If no periodicity is set, will use this date as the goal start date."), + help="The day a new challenge will be automatically started. If no periodicity is set, will use this date as the goal start date."), 'end_date': fields.date('Planned End Date', - help="The day a new plan will be automatically closed. If no periodicity is set, will use this date as the goal end date."), + help="The day a new challenge will be automatically closed. If no periodicity is set, will use this date as the goal end date."), 'user_ids': fields.many2many('res.users', 'user_ids', string='Users', @@ -641,7 +641,7 @@ class gamification_goal_planline(osv.Model): _name = 'gamification.goal.planline' _description = 'Gamification generic goal for plan' - _order = "sequence_type, id" + _order = "sequence, 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 @@ -667,6 +667,9 @@ class gamification_goal_planline(osv.Model): ondelete="cascade"), 'target_goal': fields.float('Target Value to Reach', required=True), + 'sequence': fields.integer('Sequence', + help='Sequence number for ordering', + required=True), 'sequence_type': fields.related('type_id', 'sequence', type='integer', string='Sequence', @@ -680,3 +683,7 @@ class gamification_goal_planline(osv.Model): 'type_monetary': fields.related('type_id', 'monetary', type="boolean", readonly=True, string="Monetary"), 'type_full_suffix': fields.related('type_id', 'full_suffix', type="char", readonly=True, string="Suffix"), } + + _default = { + 'sequence': 1, + } diff --git a/addons/gamification/plan_view.xml b/addons/gamification/plan_view.xml index f03bf689fdb..96e1a247bdd 100644 --- a/addons/gamification/plan_view.xml +++ b/addons/gamification/plan_view.xml @@ -52,8 +52,8 @@