parameters: (self)
docstring: We have to loop since our result is dependent of the survey.session_start_time.
          This field is currently used to display the count about a single survey, in the
          context of sessions, so it should not matter too much.
docstring_summary: We have to loop since our result is dependent of the survey.session_start_time.
          This field is currently used to display the count about a single survey, in the
          context of sessions, so it should not matter too much.
docstring_tokens: We have to loop since our result is dependent of the survey . session_start_time . This field is currently used to display the count about a single survey in the context of sessions so it should not matter too much .
function: def _compute_session_answer_count(self):
          """ We have to loop since our result is dependent of the survey.session_start_time.
          This field is currently used to display the count about a single survey, in the
          context of sessions, so it should not matter too much. """
  
          for survey in self:
              answer_count = 0
              input_count = self.env['survey.user_input'].read_group(
                  [('survey_id', '=', survey.id),
                   ('is_session_answer', '=', True),
                   ('state', '!=', 'done'),
                   ('create_date', '>=', survey.session_start_time)],
                  ['create_uid:count'],
                  ['survey_id'],
              )
              if input_count:
                  answer_count = input_count[0].get('create_uid', 0)
  
              survey.session_answer_count = answer_count
function_tokens: def _compute_session_answer_count ( self ) : for survey in self : answer_count = 0 input_count = self . env [ 'survey.user_input' ] . read_group ( [ ( 'survey_id' , '=' , survey . id ) , ( 'is_session_answer' , '=' , True ) , ( 'state' , '!=' , 'done' ) , ( 'create_date' , '>=' , survey . session_start_time ) ] , [ 'create_uid:count' ] , [ 'survey_id' ] , ) if input_count : answer_count = input_count [ 0 ] . get ( 'create_uid' , 0 ) survey . session_answer_count = answer_count