Odoo modules related to surveys
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
1.5 KiB

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="res_partner_form" model="ir.ui.view">
  4. <field name="name">survey_partner_input res.partner form</field>
  5. <field name="model">res.partner</field>
  6. <field name="inherit_id" ref="base.view_partner_form"/>
  7. <field name="priority">24</field>
  8. <field name="arch" type="xml">
  9. <xpath expr="//div[@name='button_box']/button[1]" position="before">
  10. <button type="object" name="action_survey_user_input"
  11. context="{'link_only':1, 'search_default_by_state':1}"
  12. attrs="{'invisible':[('tot_sent_survey','=',0)]}" class="oe_stat_button"
  13. groups="survey.group_survey_user">
  14. <field string="Completed" name="sent_comp_ratio" widget="percentpie"/>
  15. </button>
  16. <button type="object" name="action_survey_user_input" class="oe_stat_button" icon="fa-pencil-square-o"
  17. context="{'search_default_completed':1, 'search_default_group_by_survey':1}"
  18. attrs="{'invisible':[('tot_sent_survey','=',0),('tot_comp_survey','=',0)]}"
  19. groups="survey.group_survey_user">
  20. <field string="Answers" name="tot_comp_survey" widget="statinfo"/>
  21. </button>
  22. </xpath>
  23. <xpath expr="//div[hasclass('oe_title')]" position="after">
  24. <field name="tot_sent_survey" invisible="1" groups="survey.group_survey_user"/>
  25. <field name="tot_sent_comp_survey" invisible="1" groups="survey.group_survey_user"/>
  26. </xpath>
  27. </field>
  28. </record>
  29. </odoo>