32 lines
2.2 KiB
XML
32 lines
2.2 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<odoo>
|
|
|
|
<!-- Survey question form -->
|
|
<record id="survey_question_form" model="ir.ui.view">
|
|
<field name="model">survey.question</field>
|
|
<field name="inherit_id" ref="survey.survey_question_form" />
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//field[@name='comments_allowed']/.." position="after">
|
|
<group name="event_registration" string="Event registration">
|
|
<!-- event registration field, filtered by event_registration_allowed_field_ids (invisible) -->
|
|
<field name="event_registration_field" widget="selection" />
|
|
<field name="event_registration_allowed_field_ids" invisible="1" />
|
|
</group>
|
|
</xpath>
|
|
<xpath expr="//field[@name='validation_required']" position="before">
|
|
<field name="show_events_and_event_products_only_visible_in_survey"
|
|
attrs="{'invisible': [('question_type', 'not in', ['event_product', 'event', 'multiple_event_products'])]}"
|
|
/>
|
|
<!-- related event product question, to filter events, in case of event question -->
|
|
<field name="event_answer_filter" attrs="{'invisible': [('question_type','!=','event')],'required': [('question_type','=','event')]}" />
|
|
<field name="event_product_question_id" options="{'no_open': True, 'no_create': True}"
|
|
attrs="{'invisible': ['|', ('event_answer_filter','!=','event_product_question'), ('question_type','!=','event')],'required': [('event_answer_filter','=','event_product_question'), ('question_type','=','event')]}"
|
|
help="Select the question asking for event product, to filter proposed events." />
|
|
<field name="event_filter_event_product_id"
|
|
attrs="{'invisible': ['|', ('event_answer_filter','!=','event_product'), ('question_type','!=','event')],'required': [('event_answer_filter','=','event_product'), ('question_type','=','event')]}" />
|
|
</xpath>
|
|
|
|
</field>
|
|
</record>
|
|
</odoo>
|