-   |
    Survey Scenario:
    In order to check the survey module in OpenERP.
-  
    I Create the one survey and give survey title "Partner Feedback" and define the survey pages and survey question.
-
    I Create "Partner Feedback" survey.
-
    !record {model: 'survey', id: survey_partner_0}:
        title: 'Partner Feedback'
        max_response_limit: 20
-
    I Create "Who are you?" page in "Partner Feedback" survey with title .
-
    !record {model: 'survey.page', id: survey_partner_page_0}:
        title: 'Who are you?'
        survey_id: survey_partner_0
-
    I Create "What is your company name?" question in "Who are you" survey page.
-
    !record {model: 'survey.question', id: survey_p_question_0}:
        question: 'What is your company name?'
        type: single_textbox
        sequence: 1
        page_id: survey_partner_page_0
-
    I Create "What is your company size?" question in "Who are you" survey page.
-
    !record {model: 'survey.question', id: survey_p_question_1}:
        question: 'What is your company size?'
        type: multiple_choice_only_one_ans
        sequence: 2
        is_require_answer: true
        page_id: survey_partner_page_0
-
    I Create "1-50" answer in question "What is your company size?"
-
    !record {model: 'survey.answer', id: survey_p_1_1}:
        answer: '1 - 50'
        sequence: 1
        question_id : survey_p_question_1
-
    I Create "51 - 100" answer in question "What is your company size?"
-
    !record {model: 'survey.answer', id: survey_p_1_2}:
        answer: '51 - 100'
        sequence: 2
        question_id : survey_p_question_1
-
    I Create "100 - 500" answer in question "What is your company size?"
-
    !record {model: 'survey.answer', id: survey_p_1_3}:
        answer: '100 - 500'
        sequence: 3
        question_id : survey_p_question_1
-
    I Create "500 - 1000" answer in question "What is your company size?"
-
    !record {model: 'survey.answer', id: survey_p_1_4}:
        answer: '500 - 1000'
        sequence: 4
        question_id : survey_p_question_1
-
    I Create "> 1000" answer in question "What is your company size?"
-
    !record {model: 'survey.answer', id: survey_p_1_5}:
        answer: '> 1000'
        sequence: 5
        question_id : survey_p_question_1
-
    I Create another "Contract" page in "Partner Feedback" survey.
-
    !record {model: 'survey.page', id: survey_partner_page_1}:
        title: 'Contract'
        survey_id: survey_partner_0
-
    I Create "Which maintenance contract do you sell to your customers." question in "Contract" survey page.
-
    !record {model: 'survey.question', id: survey_p_question_3}:
        question: 'Which maintenance contract do you sell to your customers.'
        type: multiple_choice_only_one_ans
        sequence: 1
        page_id: survey_partner_page_1
-
    I Create "OpenERP maintenance contract" answer in question "Which maintenance contract do you sell to your customers."
-
    !record {model: 'survey.answer', id: survey_p_3_1}:
        answer: 'OpenERP maintenance contract'
        sequence: 1
        question_id : survey_p_question_3
-
    I Create "Your own contract, but you buy an OpenERP one" answer in question "Which maintenance contract do you sell to your customers."
-
    !record {model: 'survey.answer', id: survey_p_3_2}:
        answer: 'Your own contract, but you buy an OpenERP one'
        sequence: 2
        question_id : survey_p_question_3
-
    I Create "Your own contract without buying an OpenERP one" answer in question "Which maintenance contract do you sell to your customers."
-
    !record {model: 'survey.answer', id: survey_p_3_3}:
        answer: 'Your own contract without buying an OpenERP one'
        sequence: 3
        question_id : survey_p_question_3
-
    I Create "When do you propose a maintenance contract to your customers?" question in "Contract" survey page.
-
    !record {model: 'survey.question', id: survey_p_question_4}:
        question: When do you propose a maintenance contract to your customers?
        type: multiple_choice_only_one_ans
        sequence: 2
        comment_field_type: text
        comment_label: Why?
        is_require_answer: true
        is_comment_require: true
        page_id: survey_partner_page_1
-
    I Create "With each integration" answer in question "When do you propose a maintenance contract to your customers?"
-
    !record {model: 'survey.answer', id: survey_p_4_1}:
        answer: 'With each integration'
        sequence: 1
        question_id : survey_p_question_4
-
    I Create "Sometimes" answer in question "When do you propose a maintenance contract to your customers?"
-
    !record {model: 'survey.answer', id: survey_p_4_2}:
        answer: 'Sometimes'
        sequence: 2
        question_id : survey_p_question_4
-
    I Create "Never... " answer in question "When do you propose a maintenance contract to your customers?"
-
    !record {model: 'survey.answer', id: survey_p_4_3}:
        answer: 'Never... '
        sequence: 3
        question_id : survey_p_question_4
-
    Now Survey set in open state.
-
    !python {model: survey}: |
        self.survey_open(cr, uid, [ref("survey_partner_0")], context)
-
    Give answer of the survey, Run "Answer a Survey" wizard and select the survey and press on start button then run the selected survey.
-
    !python {model: survey.name.wiz}: |
      ids = self.create(cr, uid, {'survey_id': ref("survey_partner_0")}) 
      self.action_next(cr, uid, [ids], context)
-
    Give answer of the first and second page in "Partner Feedback" suvey.
-
    !python {model: survey.question.wiz}: |
      ids = self.create(cr, uid, {str(ref("survey_p_question_0")) +"_single" :'Tiny' , str(ref("survey_p_question_1")) + "_selection" :int(ref("survey_p_1_1"))}, context)
      ids = self.create(cr, uid, {str(ref("survey_p_question_3")) +"_selection" : int(ref("survey_p_3_1")), str(ref("survey_p_question_4")) +"_selection": int(ref("survey_p_4_1"))},context)
-
    Set the value in "Total start survey" field.
-
    !python {model: survey}: |
      ids = self.write(cr, uid, ref("survey_partner_0"), {'tot_start_survey' : 1}, context)
