Search code examples
odooodoo-8

Import Survey Qu‌e‌s‌t‌i‌o‌n Type of Answers from Survey?


I want to import Survey with Pages, Questions and Type of Answers from Survey Menu. I shall be able to import Survey, Pages and Questions and Type of Question as "Multiple choice: only one answer". But, when I try to import Type of Answers its giving error like, That Option Label is not present in the Labels for that Question. So, its asking to load Question with Type of Answers first and then import Survey. How can I import Type of Answers also while Importing Survey itself?


Solution

  • To fix this issue, one thing i did is, i directly modified the tree view create="false" to create="true". To do that first i went to Settings --> Technical --> User Interface --> Views. In Views searched for view name "Tree view for survey question" and edited the record as ,

    <?xml version="1.0"?>
    <tree string="Survey Question" create="true">
                        <field name="sequence" widget="handle"/>
                        <field name="question"/>
                        <field name="page_id"/>
                        <field name="survey_id"/>
                        <field name="type"/>
                    </tree>
    

    and then imported the questions with its Type of Answers (Sample csv file image is attached).enter image description here