[FIX] project_issue: new issue if create_date in view
The depends for an issue inactivity_days expects a set create_date but this may not be the case (when creating the record for example with the field create_date in the form view). opw-702532
This commit is contained in:
@@ -102,7 +102,7 @@ class ProjectIssue(models.Model):
|
||||
def _compute_inactivity_days(self):
|
||||
current_datetime = fields.Datetime.from_string(fields.Datetime.now())
|
||||
for issue in self:
|
||||
dt_create_date = fields.Datetime.from_string(issue.create_date)
|
||||
dt_create_date = fields.Datetime.from_string(issue.create_date) or current_datetime
|
||||
issue.days_since_creation = (current_datetime - dt_create_date).days
|
||||
|
||||
if issue.date_action_last:
|
||||
|
||||
Reference in New Issue
Block a user