[IMP] account_invoice: now have its _get_formview_action method. _get_formview_action...
[odoo/odoo.git] / addons / portal_crm / contact_view.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <openerp>
3     <data>
4
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">
10                     <h1>Contact us</h1>
11                     <div style="width: 300px; float:right;">
12                         <field name="company_ids" nolabel="1" widget="many2many_kanban" class="oe_portal_crm_office" colspan="2">
13                             <kanban>
14                                 <field name="name"/>
15                                 <field name="email"/>
16                                 <field name="phone"/>
17                                 <field name="street"/>
18                                 <field name="street2"/>
19                                 <field name="zip"/>
20                                 <field name="city"/>
21                                 <field name="country_id" options='{"no_open": True}'/>
22                                 <field name="state_id" options='{"no_open": True}'/>
23                                 <templates>
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>
32                                         </ul>
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">
37                                                 <field name="email"/>
38                                                 </a>
39                                             </li>
40                                         </ul>
41                                     </t>
42                                 </templates>
43                             </kanban>
44                         </field>
45                         <div class="oe_portal_crm_team">
46
47                         </div>
48                     </div>
49                     <div  style="margin-right: 320px; max-width: 900px;">
50                         <group>
51                             <group>
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..."/>
55                             </group>
56                             <field name="name" placeholder="Subject..." nolabel="1" colspan="2"/>
57                             <field name="description" String="Content" placeholder="Content..." nolabel="1" colspan="2"/>
58                         </group>
59                     </div>
60                     <div>
61                         <button string="Submit" name="submit" type="object" class="oe_highlight"/>
62                     </div>
63                 </form>
64             </field>
65         </record>
66
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">
75                     <!--
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
79                     -->
80                     <field name="partner_name" invisible="1"/>
81                     <label string="Thank you for your interest, we'll respond to your request shortly."/>
82                     <footer>
83                         <button string="Close" class="oe_link" special="cancel" />
84                     </footer>
85                 </form>
86             </field>
87         </record>
88
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>
95         </record>
96
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"/>
100
101     </data>
102 </openerp>