<?xml version="1.0"?>
<form string="Survey User inputs" create="false">
                <header>
                    <button name="action_resend" string="Resend Invitation" type="object" class="oe_highlight" attrs="{'invisible': ['|', ('state', '=', 'done'), '&amp;', ('partner_id', '=', False), ('email', '=', False)]}"/>
                    <button name="action_print_answers" states="done" string="Print" type="object" class="oe_highlight"/>
                    <field name="state" widget="statusbar"/>
                </header>
                <sheet>
                    <field name="attempts_count" invisible="1"/>
                    <div class="oe_button_box" name="button_box">
                        <button name="action_redirect_to_attempts" type="object" class="oe_stat_button" attrs="{'invisible': [('attempts_count', '=', 1)]}" icon="fa-files-o">
                            <field string="Attempts" name="attempts_count" widget="statinfo"/>
                        </button>
                    </div>
                    <field name="test_entry" invisible="1"/>
                    <widget name="web_ribbon" title="Test Entry" bg_color="bg-info" attrs="{'invisible': [('test_entry', '!=', True)]}"/>
                    <widget name="web_ribbon" title="Failed" bg_color="bg-danger" attrs="{'invisible': ['|', '|', ('test_entry', '=', True), ('scoring_type', '=', 'no_scoring'), ('scoring_success', '=', True)]}"/>
                    <widget name="web_ribbon" title="Passed" attrs="{'invisible': ['|', '|', ('test_entry', '=', True), ('scoring_type', '=', 'no_scoring'), ('scoring_success', '=', False)]}"/>
                    <group col="2">
                        <group>
                            <field name="survey_id"/>
                            <field name="create_date"/>
                            <field name="deadline" attrs="{'invisible': [('state', '=', 'done'), ('deadline', '=', False)]}"/>
                            <field name="is_attempts_limited" invisible="1"/>
                            <label for="attempts_number" string="Attempt n°" attrs="{'invisible': ['|', ('is_attempts_limited', '=', False), '|', ('test_entry', '=', True), ('state', '!=', 'done')]}"/>
                            <div attrs="{'invisible': ['|', ('is_attempts_limited', '=', False), '|', ('test_entry', '=', True), ('state', '!=', 'done')]}" class="d-inline-flex">
                                <field name="attempts_number" nolabel="1"/>
                                 / 
                                <field name="attempts_limit" nolabel="1"/>
                            </div>
                            <field name="test_entry" groups="base.group_no_one"/>
                        </group>
                        <group>
                            <field name="scoring_type" invisible="1"/>
                            <field name="scoring_success" invisible="1"/>
                            <label for="scoring_percentage" string="Score" attrs="{'invisible': [('scoring_type', '=', 'no_scoring')]}"/>
                            <div attrs="{'invisible': [('scoring_type', '=', 'no_scoring')]}" class="d-inline-flex">
                                <field name="scoring_percentage" nolabel="1"/>
                                <span>%</span>
                            </div>
                            <field name="partner_id"/>
                            <field name="email" widget="email"/>
                            <field name="access_token" groups="base.group_no_one"/>
                        </group>
                    </group>
                    <notebook>
                        <page string="Answers">
                            <field name="user_input_line_ids" mode="tree" attrs="{'readonly': True}" no_label="1">
                                <tree decoration-muted="skipped == True">
                                    <field name="question_sequence" invisible="1"/>
                                    <field name="create_date" optional="hidden"/>
                                    <field name="page_id" optional="hidden"/>
                                    <field name="question_id"/>
                                    <field name="answer_type" optional="hidden"/>
                                    <field name="skipped" hide="1"/>
                                    <field name="display_name" string="Answer"/>
                                    <field name="answer_is_correct"/>
                                    <field name="answer_score" sum="Score"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids"/>
                    <field name="activity_ids"/>
                    <field name="message_ids"/>
                </div>
            </form>
        