Debian Codegraph @

addons/survey_crm/views/survey_survey_views.xml

raw
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <odoo>
3 <data>
4
5 <record id="survey_survey_view_form" model="ir.ui.view">
6 <field name="name">survey.survey.view.form.inherit.survey.crm</field>
7 <field name="model">survey.survey</field>
8 <field name="inherit_id" ref="survey.survey_survey_view_form"/>
9 <field name="arch" type="xml">
10 <xpath expr="//button[@name='action_survey_user_input_completed']" position="after">
11 <button name="action_survey_see_leads"
12 groups="sales_team.group_sale_salesman"
13 type="object"
14 class="oe_stat_button"
15 invisible="not (survey_type in ['survey', 'live_session', 'custom'] and lead_count != 0)"
16 icon="fa-star">
17 <field string="Leads" name="lead_count" widget="statinfo"/>
18 </button>
19 </xpath>
20
21 <xpath expr="//field[@name='restrict_user_ids']" position="after">
22 <field name="team_id" placeholder="Select a Sales team" invisible="not generate_lead"/>
23 </xpath>
24
25 <xpath expr="//list//field[@name='title']" position="after">
26 <button type="button" icon="fa-star" title="This question generates leads"
27 invisible="not (survey_type in ['survey', 'live_session', 'custom'] and generate_lead)"/>
28 </xpath>
29 </field>
30 </record>
31
32 <record id="survey_survey_view_kanban" model="ir.ui.view">
33 <field name="name">survey.survey.view.kanban.inherit.survey.crm</field>
34 <field name="model">survey.survey</field>
35 <field name="inherit_id" ref="survey.survey_survey_view_kanban"/>
36 <field name="arch" type="xml">
37 <xpath expr="//div[a[@name='action_survey_user_input_completed']]" position="after">
38 <div t-if="!selection_mode and record.lead_count.raw_value > 0" class="col-lg-1 col-sm-4 col-6 py-0 my-2">
39 <a type="object" name="action_survey_see_leads" class="fw-bold">
40 <field name="lead_count"/><br/>
41 <span class="text-muted">Leads</span>
42 </a>
43 </div>
44 </xpath>
45 </field>
46 </record>
47
48 </data>
49 </odoo>