Browse Source

[IMP] survey_description + [REM] button_label

12.0
Rémi FRANÇOIS 5 years ago
parent
commit
fb4d8c6458
  1. 1
      survey_description/__init__.py
  2. 5
      survey_description/__manifest__.py
  3. 36
      survey_description/i18n/fr.po
  4. 32
      survey_description/i18n/survey_description.pot
  5. 42
      survey_description/i18n/survey_details.pot
  6. 1
      survey_description/models/__init__.py
  7. 7
      survey_description/models/survey_survey.py
  8. 17
      survey_description/templates/survey_init.xml
  9. 2
      survey_description/views/survey_page.xml
  10. 12
      survey_description/views/survey_survey.xml

1
survey_description/__init__.py

@ -1 +0,0 @@
from . import models

5
survey_description/__manifest__.py

@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Survey details',
'name': 'Survey description',
'version': '1.0.0',
'summary': """
This module adds a new tab in the survey form to customize the answer start template.
This module displays standard HTML fields \"Description\" and \"Thank you message\" on survey and survey pages.
""",
'description': """ """,
'author': 'Sudokeys',
@ -15,7 +15,6 @@
'survey',
],
'data': [
'templates/survey_init.xml',
'views/survey_page.xml',
'views/survey_survey.xml',
],

36
survey_description/i18n/fr.po

@ -1,13 +1,13 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_details
# * survey_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 21:21+0000\n"
"PO-Revision-Date: 2020-03-23 21:21+0000\n"
"POT-Creation-Date: 2020-03-25 11:43+0000\n"
"PO-Revision-Date: 2020-03-25 11:43+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -15,27 +15,17 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_details
#: model_terms:ir.ui.view,arch_db:survey_details.survey_survey_form
msgid "Details"
msgstr "Détails"
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Description"
msgstr "Description"
#. module: survey_details
#: model_terms:ir.ui.view,arch_db:survey_details.survey_init
msgid "Start Survey"
msgstr "Commencer le sondage"
#. module: survey_details
#: model:ir.model.fields,field_description:survey_details.field_survey_survey__button_label
msgid "Start button label"
msgstr "Label du bouton"
#. module: survey_details
#: model:ir.model,name:survey_details.model_survey_survey
#. module: survey_description
#: model:ir.model,name:survey_description.model_survey_survey
msgid "Survey"
msgstr "Sondage"
#. module: survey_details
#: model:ir.model.fields,help:survey_details.field_survey_survey__button_label
msgid "This label will be used in the survey start button. If empty, the label will be \"Start survey\"."
msgstr "Ce label est utilisé dans le bouton au début du sondage. Si ce champ est vide, le label sera \"Commencer le sondage\""
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Thank you page"
msgstr "Page de fin"

32
survey_description/i18n/survey_description.pot

@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_description
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-25 11:44+0000\n"
"PO-Revision-Date: 2020-03-25 11:44+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Description"
msgstr ""
#. module: survey_description
#: model:ir.model,name:survey_description.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_description
#: model_terms:ir.ui.view,arch_db:survey_description.survey_survey_form
msgid "Thank you page"
msgstr ""

42
survey_description/i18n/survey_details.pot

@ -1,42 +0,0 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * survey_details
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-03-23 21:22+0000\n"
"PO-Revision-Date: 2020-03-23 21:22+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: survey_details
#: model_terms:ir.ui.view,arch_db:survey_details.survey_survey_form
msgid "Details"
msgstr ""
#. module: survey_details
#: model_terms:ir.ui.view,arch_db:survey_details.survey_init
msgid "Start Survey"
msgstr ""
#. module: survey_details
#: model:ir.model.fields,field_description:survey_details.field_survey_survey__button_label
msgid "Start button label"
msgstr ""
#. module: survey_details
#: model:ir.model,name:survey_details.model_survey_survey
msgid "Survey"
msgstr ""
#. module: survey_details
#: model:ir.model.fields,help:survey_details.field_survey_survey__button_label
msgid "This label will be used in the survey start button. If empty, the label will be \"Start survey\"."
msgstr ""

1
survey_description/models/__init__.py

@ -1 +0,0 @@
from . import survey_survey

7
survey_description/models/survey_survey.py

@ -1,7 +0,0 @@
from odoo import models, fields
class SurveySurvey(models.Model):
_inherit = 'survey.survey'
button_label = fields.Char(string="Start button label", help="This label will be used in the survey start button. If empty, the label will be \"Start survey\".")

17
survey_description/templates/survey_init.xml

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="survey_init" inherit_id="survey.survey_init">
<a role="button" position="replace">
<a role="button" class="btn btn-primary btn-lg" t-att-href="'/survey/fill/%s/%s' % (slug(survey), token)">
<t t-if="survey.button_label">
<span t-field="survey.button_label"/>
</t>
<t t-else="">
Start Survey
</t>
</a>
</a>
</template>
</odoo>

2
survey_description/views/survey_page.xml

@ -2,7 +2,7 @@
<odoo>
<record id="survey_page_form" model="ir.ui.view">
<field name="name">survey_details survey.page form</field>
<field name="name">survey_description survey.page form</field>
<field name="model">survey.page</field>
<field name="inherit_id" ref="survey.survey_page_form"/>
<field name="priority">20</field>

12
survey_description/views/survey_survey.xml

@ -2,17 +2,17 @@
<odoo>
<record id="survey_survey_form" model="ir.ui.view">
<field name="name">survey_details survey.survey form</field>
<field name="name">survey_description survey.survey form</field>
<field name="model">survey.survey</field>
<field name="inherit_id" ref="survey.survey_form"/>
<field name="priority">20</field>
<field name="arch" type="xml">
<xpath expr="//notebook/page[1]" position="after">
<page name="details" string="Details">
<group>
<field name="button_label"/>
<field name="description" colspan="2"/>
</group>
<page name="description" string="Description">
<field name="description" nolabel="1" colspan="2"/>
</page>
<page name="thank_you" string="Thank you page">
<field name="thank_you_message" nolabel="1" colspan="2"/>
</page>
</xpath>
</field>

Loading…
Cancel
Save