2012-07-06 10:27:56 +00:00
<?xml version="1.0" encoding="utf-8"?>
<openerp >
2012-11-16 07:53:05 +00:00
<data >
2012-07-06 10:27:56 +00:00
<!-- add visibility field to the employee form view -->
<record id= "view_employee_form" model= "ir.ui.view" >
2012-11-20 08:45:12 +00:00
<field name= "name" > portal_hr_employees_form</field>
2012-07-06 10:27:56 +00:00
<field name= "model" > hr.employee</field>
<field name= "inherit_id" ref= "hr.view_employee_form" />
<field name= "arch" type= "xml" >
2012-11-26 13:36:42 +00:00
<xpath expr= "//field[@name='user_id']" position= "after" >
2012-09-07 06:32:20 +00:00
<field name= "visibility" />
2012-11-26 13:36:42 +00:00
<field name= "public_info" String= "Public Notes" placeholder= "Here you can write information about you to be shown in the portal..." attrs= '{"invisible":[("visibility", "=", "private")]}' />
2012-07-06 10:27:56 +00:00
</xpath>
</field>
</record>
<!-- a kanban view of the employees to the portal's contact page -->
2012-11-16 07:53:05 +00:00
<record id= "portal_hr_employees_view" model= "ir.ui.view" >
<field name= "name" > portal_hr_employees_view</field>
2012-11-26 13:36:42 +00:00
<field name= "model" > portal_crm.crm_contact_us</field>
2012-07-06 10:27:56 +00:00
<field name= "arch" type= "xml" >
2012-11-16 07:53:05 +00:00
<form string= "Our Team" version= "7.0" >
2012-07-06 15:58:26 +00:00
<field name= "employee_ids" widget= "many2many_kanban" >
2012-11-16 07:53:05 +00:00
<kanban >
<field name= "visibility" />
<templates >
<t t-name= "kanban-box" >
<div class= "oe_employee_vignette" >
<div class= "oe_employee_image" >
<img t-att-src= "kanban_image('hr.employee', 'image_small', record.id.value)" class= "oe_employee_picture" />
</div>
<div class= "oe_employee_details" >
<h4 >
2012-11-26 13:36:42 +00:00
<field name= "name" /> <t t-if= "record.login.raw_value" > (<field name= "login" /> )</t>
2012-11-16 07:53:05 +00:00
</h4>
<ul >
<li t-if= "record.job_id.raw_value" > <field name= "job_id" /> </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>
2012-11-26 13:36:42 +00:00
<li t-if= "record.public_info.raw_value" > <field name= "public_info" /> </li>
2012-11-16 07:53:05 +00:00
</ul>
2012-07-06 10:27:56 +00:00
</div>
2012-11-16 07:53:05 +00:00
</div>
</t>
</templates>
</kanban>
2012-07-06 10:27:56 +00:00
</field>
2012-11-16 07:53:05 +00:00
</form>
2012-07-06 10:27:56 +00:00
</field>
</record>
2012-11-16 07:53:05 +00:00
<record id= "action_team" model= "ir.actions.act_window" >
<field name= "name" > Meet the team</field>
2012-11-26 13:36:42 +00:00
<field name= "res_model" > portal_crm.crm_contact_us</field>
2012-11-16 07:53:05 +00:00
<field name= "view_id" ref= "portal_hr_employees_view" />
<field name= "view_mode" > form</field>
2012-11-26 13:36:42 +00:00
<field name= "view_type" > tree</field>
2012-11-20 08:45:12 +00:00
<field name= "target" > inline</field>
2012-11-16 07:53:05 +00:00
</record>
2012-11-26 13:36:42 +00:00
<record id= "crm_contact_us" model= "ir.ui.view" >
<field name= "name" > crm_contact_us</field>
<field name= "model" > portal_crm.crm_contact_us</field>
<field name= "inherit_id" ref= "portal_crm.contact_form_view" />
<field name= "arch" type= "xml" >
<xpath expr= "//div[@class='oe_portal_crm_team']" position= "inside" >
<a href= "#action=portal_hr_employees.action_team" > Meet the team</a>
</xpath>
</field>
</record>
2012-11-16 07:53:05 +00:00
2012-11-26 13:36:42 +00:00
2012-07-06 10:27:56 +00:00
</data>
</openerp>