[IMP] refectore code

bzr revid: rgaopenerp-20121031053953-32jg6wg27pxonclj
This commit is contained in:
RGA(OpenERP) 2012-10-31 11:09:53 +05:30
commit f51bf32516
2 changed files with 9 additions and 3 deletions

View File

@ -757,11 +757,11 @@ class task(base_stage, osv.osv):
If the case needs to be reviewed then the status is \
set to \'Pending\'.'),
'categ_ids': fields.many2many('project.category', string='Tags'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State',
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State',
help="A task's kanban state indicates special situations affecting it:\n"
" * Normal is the default situation\n"
" * Blocked indicates something is preventing the progress of this task\n"
" * Ready To Pull indicates the task is ready to be pulled to the next stage",
" * Ready for next stage indicates the task is ready to be pulled to the next stage",
readonly=True, required=False),
'create_date': fields.datetime('Create Date', readonly=True,select=True),
'date_start': fields.datetime('Starting Date',select=True),
@ -1432,7 +1432,7 @@ class project_task_history(osv.osv):
'task_id': fields.many2one('project.task', 'Task', ondelete='cascade', required=True, select=True),
'type_id': fields.many2one('project.task.type', 'Stage'),
'state': fields.selection([('draft', 'New'), ('cancelled', 'Cancelled'),('open', 'In Progress'),('pending', 'Pending'), ('done', 'Done')], 'Status'),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready To Pull')], 'Kanban State', required=False),
'kanban_state': fields.selection([('normal', 'Normal'),('blocked', 'Blocked'),('done', 'Ready for next stage')], 'Kanban State', required=False),
'date': fields.date('Date', select=True),
'end_date': fields.function(_get_date, string='End Date', type="date", store={
'project.task.history': (_get_related_date, None, 20)

View File

@ -57,6 +57,12 @@ openerp.project = function(openerp) {
} else if (self.dataset.model === 'project.task') {
self.project_display_categ_names();
}
},
on_record_moved: function(record, old_group, old_index, new_group, new_index){
var self = this;
self._super(record, old_group, old_index, new_group, new_index);
if(new_group.state.folded)
new_group.do_action_toggle_fold();
}
});