Browse Source

[IMP] fields labels

12.0
Rémi FRANÇOIS 5 years ago
parent
commit
d8b4c6d378
  1. 9
      survey_link_input_ratio/i18n/fr.po
  2. 9
      survey_link_input_ratio/i18n/survey_link_input_ratio.pot
  3. 10
      survey_link_input_ratio/models/survey_survey.py

9
survey_link_input_ratio/i18n/fr.po

@ -28,12 +28,12 @@ msgstr "Répondu"
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_comp_survey
msgid "Completed sent input count"
msgid "Completed sent survey count"
msgstr "Réponses privées terminées"
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_comp_ratio
msgid "Completed sent input ratio"
msgid "Completed sent survey ratio"
msgstr "Ratio de réponses privées terminées"
#. module: survey_link_input_ratio
@ -43,16 +43,15 @@ msgstr "En cours"
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_start_survey
msgid "Started sent input count"
msgid "Started sent survey count"
msgstr "Réponses privées en cours"
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_start_ratio
msgid "Started sent input ratio"
msgid "Started sent survey ratio"
msgstr "Ratio de réponses privées en cours"
#. module: survey_link_input_ratio
#: model:ir.model,name:survey_link_input_ratio.model_survey_survey
msgid "Survey"
msgstr "Sondage"

9
survey_link_input_ratio/i18n/survey_link_input_ratio.pot

@ -28,12 +28,12 @@ msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_comp_survey
msgid "Completed sent input count"
msgid "Completed sent survey count"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_comp_ratio
msgid "Completed sent input ratio"
msgid "Completed sent survey ratio"
msgstr ""
#. module: survey_link_input_ratio
@ -43,16 +43,15 @@ msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__tot_sent_start_survey
msgid "Started sent input count"
msgid "Started sent survey count"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model.fields,field_description:survey_link_input_ratio.field_survey_survey__sent_start_ratio
msgid "Started sent input ratio"
msgid "Started sent survey ratio"
msgstr ""
#. module: survey_link_input_ratio
#: model:ir.model,name:survey_link_input_ratio.model_survey_survey
msgid "Survey"
msgstr ""

10
survey_link_input_ratio/models/survey_survey.py

@ -5,17 +5,17 @@ from odoo.osv.expression import normalize_domain, AND
class SurveySurvey(models.Model):
_inherit = 'survey.survey'
tot_sent_start_survey = fields.Integer("Started sent input count", compute="_count_sent_input")
tot_sent_comp_survey = fields.Integer("Completed sent input count", compute="_count_sent_input")
sent_start_ratio = fields.Integer(string="Started sent input ratio", compute="_get_sent_start_ratio")
sent_comp_ratio = fields.Integer(string="Completed sent input ratio", compute="_get_sent_comp_ratio")
tot_sent_start_survey = fields.Integer("Started sent survey count", compute="_count_sent_input")
tot_sent_comp_survey = fields.Integer("Completed sent survey count", compute="_count_sent_input")
sent_start_ratio = fields.Integer(string="Started sent survey ratio", compute="_get_sent_start_ratio")
sent_comp_ratio = fields.Integer(string="Completed sent survey ratio", compute="_get_sent_comp_ratio")
# COMPUTES
@api.multi
def _count_sent_input(self):
UserInput = self.env['survey.user_input']
sent_start_survey = UserInput.search([('survey_id', 'in', self.ids), ('type', '=', 'link'), ('state', '=', 'skip'), ('state', '=', 'done')])
sent_start_survey = UserInput.search([('survey_id', 'in', self.ids), ('type', '=', 'link'), ('state', '=', 'skip')])
sent_comp_survey = UserInput.search([('survey_id', 'in', self.ids), ('type', '=', 'link'), ('state', '=', 'done')])
for survey in self:
survey.tot_sent_start_survey = len(sent_start_survey.filtered(lambda user_input: user_input.survey_id == survey))

Loading…
Cancel
Save