142 lines
8.7 KiB
XML
142 lines
8.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<openerp>
|
|
<data>
|
|
|
|
<!-- wizard form view -->
|
|
<record id="wizard_contact_form_view" model="ir.ui.view">
|
|
<field name="name">Wizard form view</field>
|
|
<field name="model">portal_crm.crm_contact_us</field>
|
|
<field name="type">form</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Contact wizard view" version="7.0">
|
|
<div class="oe_portal_crm_contact">
|
|
<div class="oe_portal_crm_callout">
|
|
<h1>Contact OpenERP</h1>
|
|
<div class="oe_portal_crm_background_wrapper">
|
|
<div class="oe_portal_crm_background" style="background:url(https://lh5.googleusercontent.com/-FFcbJe8Ee1U/T6Aep2ug7hI/AAAAAAAAAD8/0lDMTMwUZTU/s1136/IMG_1170.JPG) center center"/>
|
|
</div>
|
|
</div>
|
|
<table>
|
|
<tr>
|
|
<td width="70%%">
|
|
<div class="oe_portal_crm_contact_form">
|
|
<h1>Get in touch</h1>
|
|
<field name="contact_name" placeholder="Name"/>
|
|
<field name="partner_name" placeholder="Company"/>
|
|
<field name="email_from" placeholder="Email"/>
|
|
<field name="phone" placeholder="Phone"/>
|
|
<field name="description" placeholder="Your question"/>
|
|
<button string="Submit" name="submit" type="object"/>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="oe_portal_crm_office">
|
|
<h1>Our office</h1>
|
|
<field name="company_ids" widget="many2many_kanban">
|
|
<kanban>
|
|
<field name="name"/>
|
|
<field name="email"/>
|
|
<field name="phone"/>
|
|
<field name="street"/>
|
|
<field name="street2"/>
|
|
<field name="zip"/>
|
|
<field name="city"/>
|
|
<field name="country_id"/>
|
|
<field name="state_id"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<!-- <img t-att-src="kanban_image('res.partner', 'photo', record.id.value)" class="oe_avatar oe_kanban_avatar_toto"/> -->
|
|
<h4><field name="name"/></h4>
|
|
<field name="street"/><br/>
|
|
<field name="street2"/><br/>
|
|
<field name="zip"/>
|
|
<field name="city"/><br/>
|
|
<field name="country_id"/><br/>
|
|
<br/>
|
|
<a t-if="record.email.raw_value" title="Mail" t-att-href="'mailto:'+record.email.value">
|
|
<field name="email"/>
|
|
</a>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<div class="oe_portal_crm_team">
|
|
<h1>Meet the team</h1>
|
|
<field name="employee_ids" widget="many2many_kanban">
|
|
<kanban>
|
|
<field name="last_login"/>
|
|
<templates>
|
|
<t t-name="kanban-box">
|
|
<div class="oe_employee_vignette">
|
|
<div class="oe_employee_image">
|
|
<a type="edit"><img t-att-src="kanban_image('hr.employee', 'photo', record.id.value)" class="oe_employee_picture"/></a>
|
|
</div>
|
|
<div class="oe_employee_details">
|
|
<h4><a type="edit"><field name="name"/> (<field name="login"/>)</a></h4>
|
|
<ul>
|
|
<li id="last_login">
|
|
<span t-if="record.last_login.raw_value && record.last_login.raw_value.is().today()" class="oe_kanban_button" style="font-size: 100%%">
|
|
<t t-esc="record.last_login.raw_value.toString('HH:mm')"/>
|
|
</span>
|
|
</li>
|
|
<li t-if="record.job_id.raw_value"><field name="job_id"/></li>
|
|
<li t-if="record.work_location.raw_value"><field name="work_location"/></li>
|
|
<li t-if="record.work_phone.raw_value">Tel: <field name="work_phone"/></li>
|
|
<li t-if="record.mobile_phone.raw_value">Mobile: <field name="mobile_phone"/></li>
|
|
<li t-if="record.work_email.raw_value"><a t-attf-href="mailto:#{record.work_email.value}"><field name="work_email"/></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
</templates>
|
|
</kanban>
|
|
</field>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- wizard thanks message (shows after submitting the form) -->
|
|
<record id="wizard_contact_form_view_thanks" model="ir.ui.view">
|
|
<field name="name">Wizard thanks message</field>
|
|
<field name="model">portal_crm.crm_contact_us</field>
|
|
<field name="type">form</field>
|
|
<!-- give it a low priority to ensure this won't be the default view -->
|
|
<field name="priority">99</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Thank you">
|
|
<!--
|
|
make sure there is at least one field in the view,
|
|
otherwise the orm will try to select all the model's
|
|
records and this will result in a permission denied error
|
|
-->
|
|
<field name="name" invisible="1"/>
|
|
<label string="Thank you for your interest, we'll respond to your request shortly."/>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- wizard action -->
|
|
<record id="action_wizard_contact_us" model="ir.actions.act_window">
|
|
<field name="name">Contact</field>
|
|
<field name="res_model">portal_crm.crm_contact_us</field>
|
|
<field name="view_mode">form</field>
|
|
<field name="target">inline</field>
|
|
</record>
|
|
|
|
<!-- attach it to the portal menu -->
|
|
<menuitem name="Contact" id="portal_company_contact"
|
|
parent="portal.portal_company" action="action_wizard_contact_us" sequence="30"/>
|
|
|
|
</data>
|
|
</openerp>
|