'This function is used to decide if a project needs to be automatically created or not when an analytic account is created. It returns True if it needs to be so, False otherwise.'

@api.model
def _trigger_project_creation(self, vals):

    return (vals.get('use_tasks') and ('project_creation_in_progress' not in self.env.context))
