|
|
@@ -132,21 +132,57 @@
|
|
|
<field name="field_ids" nolabel="1">
|
|
|
<list string="Form Fields" editable="bottom" default_order="sequence">
|
|
|
<field name="sequence" widget="handle"/>
|
|
|
- <field name="field_id" required="1"
|
|
|
- domain="[('model', '=', 'helpdesk.ticket'), ('website_form_blacklisted', '=', False)]"/>
|
|
|
- <field name="label_custom" optional="show"/>
|
|
|
- <field name="required" widget="boolean_toggle"/>
|
|
|
+ <field name="field_id"
|
|
|
+ domain="[('model', '=', 'helpdesk.ticket'), ('website_form_blacklisted', '=', False)]"
|
|
|
+ options="{'no_create': True, 'no_open': True}"
|
|
|
+ required="1"/>
|
|
|
+ <field name="field_name" readonly="1"/>
|
|
|
+ <field name="field_type" readonly="1"/>
|
|
|
+ <field name="required"/>
|
|
|
<field name="model_required" invisible="1"/>
|
|
|
- <field name="placeholder" optional="hide"/>
|
|
|
- <field name="default_value" optional="hide"/>
|
|
|
- <field name="selection_type" optional="hide"/>
|
|
|
- <field name="rows" optional="hide"/>
|
|
|
- <field name="input_type" optional="hide"/>
|
|
|
- <field name="visibility_dependency" optional="hide"/>
|
|
|
- <field name="visibility_comparator" optional="hide"
|
|
|
- invisible="not visibility_dependency"/>
|
|
|
- <field name="visibility_condition" optional="hide"
|
|
|
- invisible="not visibility_dependency"/>
|
|
|
+ <field name="label_custom" placeholder="Custom label (optional)"/>
|
|
|
+ <field name="placeholder" placeholder="Placeholder text"/>
|
|
|
+ <field name="default_value" placeholder="Default value"/>
|
|
|
+ <field name="help_text" widget="html" placeholder="Help text (HTML)"/>
|
|
|
+ <field name="rows"
|
|
|
+ string="Height (Rows)"
|
|
|
+ invisible="field_type not in ['text', 'html']"/>
|
|
|
+ <field name="input_type"
|
|
|
+ string="Input Type"
|
|
|
+ invisible="field_type != 'char'"/>
|
|
|
+ <field name="selection_type"
|
|
|
+ string="Selection Type"
|
|
|
+ invisible="field_type not in ['selection', 'many2one']"/>
|
|
|
+ <field name="widget"
|
|
|
+ column_invisible="1"
|
|
|
+ invisible="field_type not in ['one2many', 'many2many']"/>
|
|
|
+ <field name="selection_options"
|
|
|
+ widget="text"
|
|
|
+ column_invisible="1"
|
|
|
+ placeholder='[["value1", "Label 1"], ["value2", "Label 2"]]'
|
|
|
+ invisible="field_type != 'selection' or field_id.relation"/>
|
|
|
+ <field name="visibility_dependency"
|
|
|
+ domain="[('model', '=', 'helpdesk.ticket'), ('website_form_blacklisted', '=', False)]"
|
|
|
+ options="{'no_create': True, 'no_open': True}"
|
|
|
+ placeholder="Select field for visibility condition"/>
|
|
|
+ <field name="visibility_comparator"
|
|
|
+ placeholder="Select comparator"/>
|
|
|
+ <field name="visibility_condition"
|
|
|
+ placeholder="Enter value to compare"
|
|
|
+ invisible="visibility_dependency_type in ['many2one', 'selection']"/>
|
|
|
+ <field name="visibility_condition_m2o_id"
|
|
|
+ widget="dynamic_many2one"
|
|
|
+ placeholder="Select value"
|
|
|
+ invisible="visibility_dependency_type != 'many2one'"
|
|
|
+ options="{'no_create': True, 'no_open': True}"/>
|
|
|
+ <field name="visibility_condition_selection"
|
|
|
+ placeholder="Select value"
|
|
|
+ invisible="visibility_dependency_type != 'selection'"/>
|
|
|
+ <field name="visibility_between"
|
|
|
+ placeholder="End value for range (date/datetime)"
|
|
|
+ invisible="visibility_comparator not in ['between', '!between']"/>
|
|
|
+ <field name="visibility_dependency_type" invisible="1"/>
|
|
|
+ <field name="visibility_condition_m2o_model" invisible="1"/>
|
|
|
</list>
|
|
|
<form string="Form Field">
|
|
|
<sheet>
|
|
|
@@ -164,7 +200,7 @@
|
|
|
<field name="selection_type"/>
|
|
|
<field name="rows"/>
|
|
|
<field name="input_type"/>
|
|
|
- <field name="help_text"/>
|
|
|
+ <field name="help_text" widget="html"/>
|
|
|
</group>
|
|
|
</group>
|
|
|
<group string="Visibility Conditions" col="4">
|