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>
2012-11-27 14:37:13 +00:00
<record id= "portal_view_employee_filter" model= "ir.ui.view" >
<field name= "name" > Employees</field>
<field name= "model" > hr.employee</field>
2012-07-06 10:27:56 +00:00
<field name= "arch" type= "xml" >
2012-11-27 14:37:13 +00:00
<search string= "Employees" >
<field name= "name" string= "Employees" />
<group expand= "0" string= "Group By..." >
<filter string= "Manager" icon= "terp-personal" domain= "[]" context= "{'group_by':'parent_id'}" />
<filter string= "Coach" icon= "terp-personal" domain= "[]" context= "{'group_by':'coach_id'}" />
<filter string= "Department" icon= "terp-personal+" domain= "[]" context= "{'group_by':'department_id'}" />
<filter string= "Job" icon= "terp-gtk-select-all" domain= "[]" context= "{'group_by':'job_id'}" />
<filter string= "Company" icon= "terp-go-home" domain= "[]" context= "{'group_by':'company_id'}" groups= "base.group_multi_company" />
</group>
</search>
2012-07-06 10:27:56 +00:00
</field>
</record>
2012-11-29 12:51:47 +00:00
<record model= "ir.ui.view" id= "portal_hr_kanban_view_employees" >
2013-10-16 09:21:06 +00:00
<field name= "name" > HR - Employees Kanban (Portal)</field>
2012-11-29 12:51:47 +00:00
<field name= "model" > hr.employee</field>
2013-10-16 09:21:06 +00:00
<field name= "priority" > 32</field>
2013-05-30 15:12:55 +00:00
<field name= "inherit_id" eval= "False" />
2012-11-29 12:51:47 +00:00
<field name= "arch" type= "xml" >
2013-06-12 09:25:49 +00:00
<kanban create= "false" >
2013-05-16 16:19:49 +00:00
<field name= "last_login" />
<templates >
<t t-name= "kanban-box" >
<div class= "oe_employee_vignette" >
<div class= "oe_employee_image" >
<a type= "open" > <img t-att-src= "kanban_image('hr.employee', 'image_medium', record.id.value)" class= "oe_employee_picture" /> </a>
</div>
<div class= "oe_employee_details" >
<h4 >
<a type= "open" > <field name= "name" /> </a>
</h4>
<ul >
<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>
<li t-if= "record.public_info.raw_value" > <field name= "public_info" /> </li>
</ul>
</div>
</div>
<script >
$('.oe_employee_picture').load(function() { if($(this).width() > $(this).height()) { $(this).addClass('oe_employee_picture_wide') } });
</script>
</t>
</templates>
</kanban>
2012-11-29 12:51:47 +00:00
</field>
</record>
2012-11-16 07:53:05 +00:00
<record id= "action_team" model= "ir.actions.act_window" >
2012-12-20 13:43:54 +00:00
<field name= "name" > Our Team</field>
2012-11-27 14:37:13 +00:00
<field name= "res_model" > hr.employee</field>
2012-11-29 12:51:47 +00:00
<field name= "view_id" ref= "portal_hr_kanban_view_employees" />
2012-11-27 14:37:13 +00:00
<field name= "view_mode" > kanban</field>
<field name= "view_type" > form</field>
<field name= "domain" > [('visibility','!=','private')]</field>
<field name= "search_view_id" ref= "portal_view_employee_filter" />
<field name= "target" > current</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" >
2012-12-20 13:43:54 +00:00
<a href= "#action=portal_hr_employees.action_team" > Our Team</a>
2012-11-26 13:36:42 +00:00
</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>