<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <!-- QUESTIONS -->
    <record id="sh_survey_matrix_adv_survey_question_form" model="ir.ui.view">
        <field name="name">sh.survey.matrix.adv.survey.questino.form</field>
        <field name="model">survey.question</field>
        <field name="inherit_id" ref="survey.survey_question_form" />
        <field name="arch" type="xml">
            <xpath expr="//field[@name='suggested_answer_ids']//tree//field[@name='value']" position="after">
                
                <field name="sh_value_type" attrs="{'column_invisible':[('parent.matrix_subtype','!=','sh_custom_matrix')]}" />
                <field name='sh_matrix_range_min' attrs="{'column_invisible': [('parent.matrix_subtype','!=','sh_custom_matrix')]}"/>
            	<field name='sh_matrix_range_max' attrs="{'column_invisible': [('parent.matrix_subtype','!=','sh_custom_matrix')]}"/>
            	<field name='sh_matrix_range_step' attrs="{'column_invisible': [('parent.matrix_subtype','!=','sh_custom_matrix')]}"/>
            </xpath>
        </field>
    </record>

    <!-- USER INPUT LINES
            .. note:: these views are useful mainly for technical users/administrators -->
    <record id="sh_survey_matrix_adv_survey_user_input_line_form" model="ir.ui.view">
        <field name="name">sh.survey.matrix.adv.survey.user.input.line.form</field>
        <field name="model">survey.user_input.line</field>
        <field name="inherit_id" ref="survey.survey_user_input_line_view_form" />
        <field name="arch" type="xml">
            <field name="suggested_answer_id" position="replace">
                <field
                    name="suggested_answer_id"
                    colspan="2"
                    attrs="{'invisible': [('answer_type','not in',('suggestion','ans_sh_color',
	                'ans_sh_email','ans_sh_url','ans_sh_time','ans_sh_range','ans_sh_week','ans_sh_month','ans_sh_password','ans_sh_file'))]}"
                />
            </field>
        </field>
    </record>
</odoo>
