1 <?xml version="1.0" encoding="UTF-8"?>
5 <record id="contact_form_view" model="ir.ui.view">
6 <field name="name">Contact form</field>
7 <field name="model">portal_crm.crm_contact_us</field>
8 <field name="arch" type="xml">
9 <form string="Contact form" version="7.0" class="oe_portal_crm_contact">
11 <div style="width: 300px; float:right;">
12 <field name="company_ids" nolabel="1" widget="many2many_kanban" class="oe_portal_crm_office" colspan="2">
17 <field name="street"/>
18 <field name="street2"/>
21 <field name="country_id" options='{"no_open": True}'/>
22 <field name="state_id" options='{"no_open": True}'/>
24 <t t-name="kanban-box">
25 <h4><field name="name"/></h4>
26 <ul class="oe_portal_crm_address">
27 <li t-if="record.street"><field name="street"/></li>
28 <li t-if="record.street2"><field name="street2"/></li>
29 <li t-if="record.zip"><field name="zip"/></li>
30 <li t-if="record.city"><field name="city"/></li>
31 <li t-if="record.country_id"><field name="country_id"/></li>
33 <ul class="oe_portal_crm_contact_info">
34 <li t-if="record.phone"><field name="phone"/></li>
35 <li t-if="record.email.raw_value">
36 <a title="Mail" t-att-href="'mailto:'+record.email.value">
45 <div class="oe_portal_crm_team">
49 <div style="margin-right: 320px; max-width: 900px;">
52 <field name="partner_name" string="Name" placeholder="Your name..." required="True"/>
53 <field name="email_from" placeholder="Your email..." required="True"/>
54 <field name="phone" placeholder="Your phone number..."/>
56 <field name="name" placeholder="Subject..." nolabel="1" colspan="2"/>
57 <field name="description" String="Content" placeholder="Content..." nolabel="1" colspan="2"/>
61 <button string="Submit" name="submit" type="object" class="oe_highlight"/>
67 <!-- wizard thanks message (shows after submitting the form) -->
68 <record id="wizard_contact_form_view_thanks" model="ir.ui.view">
69 <field name="name">Wizard thanks message</field>
70 <field name="model">portal_crm.crm_contact_us</field>
71 <!-- give it a low priority to ensure this won't be the default view -->
72 <field name="priority">99</field>
73 <field name="arch" type="xml">
74 <form string="Thank you" version="7.0">
76 make sure there is at least one field in the view,
77 otherwise the orm will try to select all the model's
78 records and this will result in a permission denied error
80 <field name="partner_name" invisible="1"/>
81 <label string="Thank you for your interest, we'll respond to your request shortly."/>
83 <button string="Close" class="oe_link" special="cancel" />
89 <record id="action_contact_us" model="ir.actions.act_window">
90 <field name="name">Contact Us</field>
91 <field name="res_model">portal_crm.crm_contact_us</field>
92 <field name="view_mode">form</field>
93 <field name="view_id" ref="contact_form_view"/>
94 <field name="target">inline</field>
97 <!-- attach it to the portal menu -->
98 <menuitem name="Contact" id="portal_company_contact"
99 parent="portal.portal_company" action="action_contact_us" sequence="40"/>