OdooDigitizationService/addons/tx_survey/views/views.xml

46 lines
2.1 KiB
XML

<odoo>
<data>
<record id="survey_survey_view_form_inherit" model="ir.ui.view">
<field name="name">survey.survey.view.form</field>
<field name="model">survey.survey</field>
<field name="inherit_id" ref="survey.survey_survey_view_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_send_survey']" position="after">
<button name="create_qrcode" string="生成二维码" type="object" class="oe_highlight"/>
</xpath>
<xpath expr="//sheet/group/group" position="after">
<group>
<field name="qrcode_img" widget="image"/>
</group>
</xpath>
<xpath expr="//page[@name='options']" position="after">
<page string="设置" name="config">
<field name="config_ids">
<tree editable="bottom">
<field name="question_id" domain="['|',('question_type', '=', 'simple_choice'),('question_type', '=', 'multiple_choice'),('survey_id', '=', parent.id)]"/>
<field name="answer_id" domain="[('question_id', '=', question_id)]"/>
<field name="show_question_ids" widget="many2many_tags" domain="[('survey_id', '=', parent.id),('id', '!=', question_id)]"/>
</tree>
</field>
</page>
</xpath>
</field>
</record>
<record id="survey_question_form_inherit" model="ir.ui.view">
<field name="name">survey.question.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_image']" position="after">
<field name="votes"/>
</xpath>
</field>
</record>
</data>
</odoo>