Browse Source

[IMP] add security group on partner form

12.0
Rémi FRANÇOIS 4 years ago
parent
commit
6b307c19e4
  1. 10
      survey_partner_input/views/res_partner.xml

10
survey_partner_input/views/res_partner.xml

@ -10,18 +10,20 @@
<xpath expr="//div[@name='button_box']/button[1]" position="before"> <xpath expr="//div[@name='button_box']/button[1]" position="before">
<button type="object" name="action_survey_user_input" <button type="object" name="action_survey_user_input"
context="{'link_only':1, 'search_default_by_state':1}" context="{'link_only':1, 'search_default_by_state':1}"
attrs="{'invisible':[('tot_sent_survey','=',0)]}" class="oe_stat_button">
attrs="{'invisible':[('tot_sent_survey','=',0)]}" class="oe_stat_button"
groups="survey.group_survey_user">
<field string="Completed" name="sent_comp_ratio" widget="percentpie"/> <field string="Completed" name="sent_comp_ratio" widget="percentpie"/>
</button> </button>
<button type="object" name="action_survey_user_input" class="oe_stat_button" icon="fa-pencil-square-o" <button type="object" name="action_survey_user_input" class="oe_stat_button" icon="fa-pencil-square-o"
context="{'search_default_completed':1, 'search_default_group_by_survey':1}" context="{'search_default_completed':1, 'search_default_group_by_survey':1}"
attrs="{'invisible':[('tot_sent_survey','=',0),('tot_comp_survey','=',0)]}">
attrs="{'invisible':[('tot_sent_survey','=',0),('tot_comp_survey','=',0)]}"
groups="survey.group_survey_user">
<field string="Answers" name="tot_comp_survey" widget="statinfo"/> <field string="Answers" name="tot_comp_survey" widget="statinfo"/>
</button> </button>
</xpath> </xpath>
<xpath expr="//div[hasclass('oe_title')]" position="after"> <xpath expr="//div[hasclass('oe_title')]" position="after">
<field name="tot_sent_survey" invisible="1"/>
<field name="tot_sent_comp_survey" invisible="1"/>
<field name="tot_sent_survey" invisible="1" groups="survey.group_survey_user"/>
<field name="tot_sent_comp_survey" invisible="1" groups="survey.group_survey_user"/>
</xpath> </xpath>
</field> </field>
</record> </record>

Loading…
Cancel
Save