Files
odoo_source/addons/website_slides_survey/views/slide_slide_views.xml
T
Thibault Delavallée 1e66894042 [REF] survey: on survey.survey, rename some fields to ease understanding
PURPOSE

As new features are about to land in survey, notably live interactions [1]
and new survey building [2] performing a pre cleaning is necessary. In this
PR we clean survey models by: removing unnecessary fields, cleaning some code
and finally renaming models.

SPECIFICATIONS: RENAME THANKS_YOU_MESSAGE ON SURVEY.SURVEY

On survey.survey, rename thanks_you_message to description_done

In this commit we rename thanks_you_message field. Indeed for certifications
or recruitment form, "thank you" is not really the unique content you
would get in a post-survey message. We therefore rename it to description_done
to better indicate its use.

SPECIFICATIONS: RENAME CERTIFICATE ON SURVEY.SURVEY

On survey.survey, rename certificate field to certification

All certification related fields on survey model begin with certification_ .
Only the boolean one telling if a survey is a certification or not is called
certificate. In order to ease grep and ordering it is renamed to certification.

SPECIFICATIONS: RENAME PASSING_SCORE ON SURVEY.SURVEY

on survey.survey, rename passing_score field to scoring_success_min

``passing_score`` field name is not really the best name we could find.
Renaming the field using a ``scoring_`` prefix allow to know this field
is linked to the scoring mechanism.

LINKS

[0] Related to Task ID 2061901 (survey models cleaning and preparation)
[1] Task ID 1972640 (live interactions)
[2] Task ID 2119587 (new frontend for building surveys)

PR #40765
2019-12-05 15:21:28 +00:00

30 lines
1.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="slide_slide_view_form" model="ir.ui.view">
<field name="name">slide.slide.view.form.inherit.survey</field>
<field name="model">slide.slide</field>
<field name="inherit_id" ref="website_slides.view_slide_slide_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='slide_type']" position="after">
<field name="survey_id"
attrs="{'invisible': [('slide_type', '!=', 'certification')], 'required': [('slide_type', '=', 'certification')]}"
domain="[('certification', '=', True)]"/>
</xpath>
</field>
</record>
<record id="slide_slide_action_certification" model="ir.actions.act_window">
<field name="name">Certifications</field>
<field name="res_model">slide.slide</field>
<field name="view_mode">tree,form,graph</field>
<field name="domain">[('slide_type', '=', 'certification')]</field>
<field name="context">{'default_slide_type': 'certification'}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add a new certification
</p>
</field>
<field name="view_id" ref="website_slides.view_slide_slide_tree"/>
</record>
</odoo>