mirror of
https://gitlab.com/flectra-hq/flectra.git
synced 2026-11-02 20:30:20 -06:00
[FIX] project_scrum cron job failed
Signed-off-by: Renzo Meister <rm@jamotion.ch>
This commit is contained in:
1 parent
5871ca6a7b
commit
e4e1ff73e3
1 file changed
+2
-6
@@ -291,13 +291,9 @@ class ProjectSprint(models.Model):
|
||||
|
||||
@api.multi
|
||||
def check_sprint_state(self):
|
||||
next_call = datetime.today()
|
||||
for record in self.search([('state', '!=', 'done')]):
|
||||
if record.end_date:
|
||||
end_date = datetime.strptime(
|
||||
record.end_date, '%Y-%m-%d').date()
|
||||
if end_date < next_call:
|
||||
record.state = 'done'
|
||||
if record.end_date and record.end_date < fields.Date.today():
|
||||
record.state = 'done'
|
||||
|
||||
@api.constrains('sprint_planning_line')
|
||||
def check_users_in_planning_line(self):
|
||||
|
||||
Reference in new issue
Block a user