You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
198 lines
8.9 KiB
198 lines
8.9 KiB
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<odoo>
|
|
<record id="survey_question_form" model="ir.ui.view">
|
|
<field name="name">survey.question.view.form.inherit.enhanced.survey.management</field>
|
|
<field name="model">survey.question</field>
|
|
<field name="inherit_id" ref="survey.survey_question_form"/>
|
|
<field name="arch" type="xml">
|
|
<!-- inherit question view to add custom preview of new question type. -->
|
|
<xpath expr="//div[hasclass('o_preview_questions')]"
|
|
position="inside">
|
|
<!-- Time Zone -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'time')]}">
|
|
<span>Work Start Time</span>
|
|
<br/>
|
|
<i class="fa fa-clock-o" role="img"
|
|
aria-label="Single Line" title="Single Line"> 
|
|
  --:--
|
|
</i>
|
|
</div>
|
|
<!-- Email -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'email')]}">
|
|
<span>Email</span>
|
|
<br/>
|
|
<i class="fa fa-envelope" role="img"
|
|
aria-label="Single Line" title="Single Line"> 
|
|
  ____________
|
|
</i>
|
|
</div>
|
|
<!-- Month Zone -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'month')]}">
|
|
<span>Name one Month</span>
|
|
<br/>
|
|
<i class="fa fa-calendar" role="img"
|
|
aria-label="Single Line" title="Single Line"> 
|
|
  ____________
|
|
</i>
|
|
</div>
|
|
<!-- Password -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'password')]}">
|
|
<span>Password</span>
|
|
<br/>
|
|
<i class="fa fa-lock" role="img"
|
|
aria-label="Single Line" title="Single Line"> 
|
|
  #########
|
|
</i>
|
|
</div>
|
|
<!-- Range -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'range')]}">
|
|
<span>Volume</span>
|
|
<br/>
|
|
<i>------</i>
|
|
<i class="fa fa-bullseye" role="img"
|
|
aria-label="Single Line" title="Single Line">
|
|
</i>
|
|
<i>----</i>
|
|
</div>
|
|
<!-- Signature -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'signature')]}">
|
|
<span>Signature</span>
|
|
<br/>
|
|
<i class="fa fa-edit" role="img"
|
|
aria-label="Single Line" title="Single Line"> 
|
|
  _________
|
|
</i>
|
|
</div>
|
|
<!-- Address Zone -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'address')]}">
|
|
<span>Current Address</span>
|
|
<br/>
|
|
<i role="img" aria-label="Single Line" title="Single Line">
|
|
    __________
|
|
<br/>          __________
|
|
<br/>
|
|
___ ___ ___<br/>______
|
|
</i>
|
|
</div>
|
|
<!-- Name -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'name')]}">
|
|
<span>Your Name</span>
|
|
<br/>
|
|
<i role="img" aria-label="Name" title="Single Line"> 
|
|
  ___ ___ ___
|
|
</i>
|
|
</div>
|
|
<!-- URL -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'url')]}">
|
|
<span>URL</span>
|
|
<br/>
|
|
<i role="img" aria-label="URL" class="fa fa-link"
|
|
title="Single Line">    ________
|
|
</i>
|
|
</div>
|
|
<!-- Week -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'week')]}">
|
|
<span>Select a week</span>
|
|
<br/>
|
|
<i role="img" aria-label="Week" class="fa fa-calendar"
|
|
title="Week">   Week --, ---
|
|
</i>
|
|
</div>
|
|
<!-- Color -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'color')]}">
|
|
<span>Pick a color</span>
|
|
<br/>
|
|
<i role="img" aria-label="Color" class="fa fa-paint-brush"
|
|
title="Color">   ________
|
|
</i>
|
|
</div>
|
|
<!-- Qr Code -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'qr')]}">
|
|
<span>Scan Qrcode</span>
|
|
<br/>
|
|
<i role="img" aria-label="Color" class="fa fa-qrcode"
|
|
title="Color"> 
|
|
</i>
|
|
___________
|
|
</div>
|
|
<!-- Qr Code -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'barcode')]}">
|
|
<span>Scan Barcode</span>
|
|
<br/>
|
|
<i role="img" aria-label="Color" class="fa fa-barcode"
|
|
title="Color"> 
|
|
</i>
|
|
___________
|
|
</div>
|
|
<!-- Qr Code -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'file')]}">
|
|
<span>Upload a file</span>
|
|
<br/>
|
|
<i role="img" aria-label="Color" class="fa fa-file"
|
|
title="Color"> 
|
|
</i>
|
|
___________
|
|
</div>
|
|
<!-- Qr Code -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'selection')]}">
|
|
<span>Select from list</span>
|
|
<br/>
|
|
<i role="img" aria-label="Color" class="fa fa-angle-down"
|
|
title="Color"> 
|
|
</i>
|
|
___________
|
|
</div>
|
|
<!-- Many2one -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'many2one')]}">
|
|
<span>Select a Product</span>
|
|
<br/>
|
|
___________
|
|
<i role="img" aria-label="Color" class="fa fa-angle-down"
|
|
title="Color"> 
|
|
</i>
|
|
</div>
|
|
<!-- Many2many -->
|
|
<div attrs="{'invisible': [('question_type', '!=', 'many2many')]}">
|
|
<span>Select tags</span>
|
|
<br/>
|
|
_()_()_()_()_()_
|
|
</div>
|
|
</xpath>
|
|
<!-- Adding necessary field related to custom question types -->
|
|
<xpath expr="//page[@name='answers']/group" position="inside">
|
|
<group attrs="{'invisible': [('question_type', 'not in', ['many2one', 'many2many'])]}">
|
|
<field name="model_id"
|
|
attrs="{'required': [('question_type', 'in', ['many2one', 'many2many'])]}"/>
|
|
</group>
|
|
<group>
|
|
<field name="selection_ids"
|
|
attrs="{'invisible': [('question_type', '!=', 'selection')]}">
|
|
<tree editable="bottom">
|
|
<field name="name"/>
|
|
</tree>
|
|
</field>
|
|
</group>
|
|
<group attrs="{'invisible': [('question_type', '!=', 'range')]}">
|
|
<field name="range_min"/>
|
|
<field name="range_max"/>
|
|
</group>
|
|
<group attrs="{'invisible': [('question_type', '!=', 'qr')]}">
|
|
<field name="qrcode"/>
|
|
</group>
|
|
<group attrs="{'invisible': [('question_type', '!=', 'barcode')]}">
|
|
<field name="barcode"/>
|
|
</group>
|
|
</xpath>
|
|
<!-- Adding matrix field related to matrix question types -->
|
|
<xpath expr="//field[@name='suggested_answer_ids']/tree/field[@name='value']"
|
|
position="after">
|
|
<field name="answer_type"
|
|
attrs="{'column_invisible': [('parent.matrix_subtype', '!=', 'custom')]}"/>
|
|
<field name="model_id"
|
|
attrs="{'required': [('answer_type','=','many2one')],
|
|
'column_invisible': [('parent.matrix_subtype', '!=', 'custom')]}"
|
|
/>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
</odoo>
|
|
|