~vauxoo/addons-vauxoo/jose-add-followers-one-mail

« back to all changes in this revision

Viewing changes to project_task_work/model/project_task_work.py


[FIX] Feature changed from project_task_work to project_task_domain module.

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
 
68
68
class project_task_work(osv.Model):
69
69
    _inherit = 'project.task.work'
70
 
    
71
 
    def onchange_hours(self, cr, uid, ids, hours=None, context=None):
72
 
        if context is None:
73
 
            context = {}
74
 
        warning = {}
75
 
        if hours < 0:
76
 
            warning = { 'title': _('Warning!'), 'message': _('Are you sure that you want to charge hours in negative?')}
77
 
        return { 'warning': warning}
78
 
        
79
 
    def onchange_date(self, cr, uid, ids, date=None, context=None):
80
 
        if context is None:
81
 
            context = {}
82
 
        warning = {}
83
 
        if date > time.strftime('%Y-%m-%d %H:%M:%S'):
84
 
            warning = { 'title': _('Warning!'), 'message': _('Are you sure that you want to charge a future date?')}
85
 
        return { 'warning': warning}
86
70
 
87
71
    def _get_project(self, cr, uid, ids, fieldname, arg, context=None):
88
72
        if context is None:
90
74
        res = {}.fromkeys(ids,None)
91
75
        ids = self.exists(cr, uid, ids, context=context)
92
76
        for ptw_brw in self.browse(cr, uid, ids, context=context):
93
 
            
94
77
            res[ptw_brw.id] = \
95
78
                ptw_brw.task_id and \
96
79
                (ptw_brw.task_id.issue_id and