Browse Source

[IMP] survey_select_input

12.0
Rémi FRANÇOIS 5 years ago
parent
commit
e9195a4828
  1. 2
      survey_select_input/models/survey_survey.py
  2. 4
      survey_select_input/views/survey_survey.xml

2
survey_select_input/models/survey_survey.py

@ -22,6 +22,4 @@ class SurveySurvey(models.Model):
action = super(SurveySurvey, self).action_survey_user_input()
if self.env.context.get('search_default_selected', False):
action['display_name'] += _(" selected")
else:
action['display_name'] += _(" from all ones")
return action

4
survey_select_input/views/survey_survey.xml

@ -7,14 +7,14 @@
<field name="inherit_id" ref="survey.survey_form"/>
<field name="priority">26</field>
<field name="arch" type="xml">
<button name="action_survey_user_input" position="after">
<xpath expr="//field[@name='tot_comp_survey']/.." position="after">
<button type="object" name="action_survey_user_input"
attrs="{'invisible': [('tot_selected_survey','=',0)]}"
context="{'search_default_selected':1}"
class="oe_stat_button text-success" icon="fa-pencil-square-o">
<field name="tot_selected_survey" string="Selected" widget="statinfo"/>
</button>
</button>
</xpath>
</field>
</record>

Loading…
Cancel
Save