[IMP] change plan view
bzr revid: mat@openerp.com-20130405151953-mq453l24jpz4gwgo
This commit is contained in:
parent
0b0e4acfc5
commit
6b13688022
|
@ -3,7 +3,7 @@ from openerp.tools.translate import _
|
|||
from datetime import date
|
||||
|
||||
|
||||
class gamification_badge_execute(osv.Model):
|
||||
class gamification_badge_execute(osv.AbstractModel):
|
||||
"""Class that contains the methods to execute for badge granting"""
|
||||
|
||||
_name = 'gamification.badge.execute'
|
||||
|
|
|
@ -109,7 +109,7 @@ class gamification_goal_plan(osv.Model):
|
|||
help="list of goals that will be set",
|
||||
required=True),
|
||||
'autojoin_group_id': fields.many2one('res.groups',
|
||||
string='Auto-join Group',
|
||||
string='Auto-subscription Group',
|
||||
help='Group of users whose members will automatically be added to the users'),
|
||||
'period': fields.selection([
|
||||
('once', 'No Periodicity'),
|
||||
|
@ -124,14 +124,14 @@ class gamification_goal_plan(osv.Model):
|
|||
'start_date': fields.date('Starting Date', help="The day a new plan will be automatically started. The start and end dates for goals are still defined by the periodicity (eg: weekly goals run from Monday to Sunday)."),
|
||||
'state': fields.selection([
|
||||
('draft', 'Draft'),
|
||||
('inprogress', 'In progress'),
|
||||
('inprogress', 'In Progress'),
|
||||
('done', 'Done'),
|
||||
],
|
||||
string='State',
|
||||
required=True),
|
||||
'visibility_mode': fields.selection([
|
||||
('board', 'Leader board'),
|
||||
('progressbar', 'Personal progressbar')
|
||||
('board', 'Leader Board'),
|
||||
('progressbar', 'Personal Progressbar')
|
||||
],
|
||||
string="Visibility",
|
||||
help='How are displayed the results, shared or in a single progressbar',
|
||||
|
@ -150,7 +150,7 @@ class gamification_goal_plan(osv.Model):
|
|||
string='Send a copy to',
|
||||
help='Group that will receive a copy of the report in addition to the user'),
|
||||
'report_header': fields.text('Report Header'),
|
||||
'remind_update_delay': fields.integer('Remind delay',
|
||||
'remind_update_delay': fields.integer('Remind delay for Manual Goals',
|
||||
help="The number of days after which the user assigned to a manual goal will be reminded. Never reminded if no value or zero is specified."),
|
||||
'last_report_date': fields.date('Last Report Date'),
|
||||
'next_report_date': fields.function(_get_next_report_date,
|
||||
|
@ -247,6 +247,7 @@ class gamification_goal_plan(osv.Model):
|
|||
if fields.date.today() == plan.next_report_date:
|
||||
self.report_progress(cr, uid, plan, context=context)
|
||||
self.write(cr, uid, plan.id, {'last_report_date': fields.date.today}, context=context)
|
||||
return True
|
||||
|
||||
def quick_update(self, cr, uid, plan_id, context=None):
|
||||
"""Update all the goals of a plan, no generation of new goals"""
|
||||
|
|
|
@ -66,64 +66,20 @@
|
|||
<button name="action_show_related_goals" type="object" string="Related Goals" help="show all the generated goals for this plan" context="{'search_default_group_by_user': True}" />
|
||||
</div>
|
||||
|
||||
<group>
|
||||
<group colspan="4">
|
||||
<field name="manager_id" />
|
||||
<field name="start_date" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="period" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="remind_update_delay"/>
|
||||
|
||||
</group>
|
||||
<group string="Notify" colspan="4">
|
||||
<label for="visibility_mode"/>
|
||||
<div>
|
||||
<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')]}">
|
||||
In Leaderboard mode, the reports will contain the progress of users of this plan.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('visibility_mode','!=','progressbar')]}">
|
||||
In Personal Progressbar mode, the progress of each user can only be seen by himself and the followers of this plan.
|
||||
</p>
|
||||
</group>
|
||||
</div>
|
||||
|
||||
<field name="report_message_frequency" />
|
||||
<field name="report_header" />
|
||||
|
||||
<label for="report_message_group_id"/>
|
||||
<div>
|
||||
<field name="report_message_group_id" />
|
||||
<group name="report_help" class="oe_grey oe_edit_only" col="2" colspan="2">
|
||||
<p attrs="{'invisible': [('report_message_group_id','!=',False)]}">
|
||||
Select a group that will receive a copy of the reports.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('report_message_group_id','=',False)]}">
|
||||
A copy of the report will be sent to this group.
|
||||
</p>
|
||||
</group>
|
||||
</div>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
<field name="manager_id" />
|
||||
</group>
|
||||
|
||||
<group string="Planlines">
|
||||
<field name="planline_ids" nolabel="1">
|
||||
<tree string="Planline List" version="7.0" editable="bottom" >
|
||||
<field name="type_id"/>
|
||||
<field name="target_goal"/>
|
||||
</tree>
|
||||
</field>
|
||||
<group colspan="2">
|
||||
<field name="start_date" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
<field name="period" attrs="{'readonly':[('state','!=','draft')]}"/>
|
||||
</group>
|
||||
|
||||
<group string="Subscription">
|
||||
<group string="Evaluated Users">
|
||||
<group colspan="4">
|
||||
<field name="autojoin_group_id" />
|
||||
</group>
|
||||
<group colspan="4">
|
||||
<field name="user_ids" widget="many2many_tag" />
|
||||
<!-- <kanban quick_create="false" create="true">
|
||||
<field name="user_ids" widget="many2many_kanban">
|
||||
<kanban quick_create="false" create="true">
|
||||
<field name="name"/>
|
||||
<templates>
|
||||
<t t-name="kanban-box">
|
||||
|
@ -138,9 +94,53 @@
|
|||
</t>
|
||||
</templates>
|
||||
</kanban>
|
||||
</field> -->
|
||||
</field>
|
||||
</group>
|
||||
</group>
|
||||
|
||||
<group string="Goals">
|
||||
<field name="planline_ids" nolabel="1" colspan="4">
|
||||
<tree string="Planline List" version="7.0" editable="bottom" >
|
||||
<field name="type_id"/>
|
||||
<field name="target_goal"/>
|
||||
</tree>
|
||||
</field>
|
||||
<label for="visibility_mode" colspan="1"/>
|
||||
<div>
|
||||
<field name="visibility_mode" widget="radio" colspan="1" />
|
||||
|
||||
<group name="visibility_mode_help" class="oe_grey oe_edit_only" colspan="2">
|
||||
<p attrs="{'invisible': [('visibility_mode','!=','board')]}">
|
||||
In Leaderboard mode, the reports will contain the progress of users of this plan.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('visibility_mode','!=','progressbar')]}">
|
||||
In Personal Progressbar mode, the progress of each user can only be seen by himself and the followers of this plan.
|
||||
</p>
|
||||
</group>
|
||||
</div>
|
||||
<label for="remind_update_delay"/>
|
||||
<div>
|
||||
<field name="remind_update_delay" class="oe_inline"/> days
|
||||
</div>
|
||||
</group>
|
||||
|
||||
<group string="Notification Message" colspan="4">
|
||||
<field name="report_message_frequency" />
|
||||
<field name="report_header" attrs="{'invisible': [('report_message_frequency','=','never')]}" />
|
||||
|
||||
<label for="report_message_group_id" attrs="{'invisible': [('report_message_frequency','=','never')]}" />
|
||||
<div attrs="{'invisible': [('report_message_frequency','=','never')]}" >
|
||||
<field name="report_message_group_id" />
|
||||
<group name="report_help" class="oe_grey oe_edit_only" col="2" colspan="2">
|
||||
<p attrs="{'invisible': [('report_message_group_id','!=',False)]}">
|
||||
Select a group that will receive a copy of the reports.
|
||||
</p>
|
||||
<p attrs="{'invisible': [('report_message_group_id','=',False)]}">
|
||||
A copy of the report will be sent to this group.
|
||||
</p>
|
||||
</group>
|
||||
</div>
|
||||
</group>
|
||||
</sheet>
|
||||
<div class="oe_chatter">
|
||||
<field name="message_follower_ids" widget="mail_followers"/>
|
||||
|
|
Loading…
Reference in New Issue