Tejas Tank (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-kabanization-hr-tta into
lp:~openerp-dev/openobject-addons/trunk-kabanization.
Requested reviews:
Amit (Open ERP) (apa-tiny)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kabanization-hr-tta/+merge/75679
Hello,
HR kanban is ready.
mail is added in depends list.
Thanks,
Tejas
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-kabanization-hr-tta/+merge/75679
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-kabanization.
=== modified file 'hr/__openerp__.py'
--- hr/__openerp__.py 2011-07-18 08:34:24 +0000
+++ hr/__openerp__.py 2011-09-16 07:23:30 +0000
@@ -38,7 +38,7 @@
'author': 'OpenERP SA',
'website': 'http://www.openerp.com',
'images': ['images/hr_department.jpeg', 'images/hr_employee.jpeg','images/hr_job_position.jpeg'],
- 'depends': ['base_setup', 'resource', 'board'],
+ 'depends': ['base_setup','mail', 'resource', 'board'],
'init_xml': [],
'update_xml': [
'security/hr_security.xml',
=== modified file 'hr/hr.py'
--- hr/hr.py 2011-09-13 12:00:12 +0000
+++ hr/hr.py 2011-09-16 07:23:30 +0000
@@ -149,7 +149,8 @@
'coach_id': fields.many2one('hr.employee', 'Coach'),
'job_id': fields.many2one('hr.job', 'Job'),
'photo': fields.binary('Photo'),
- 'passport_id':fields.char('Passport No', size=64)
+ 'passport_id':fields.char('Passport No', size=64),
+ 'color': fields.integer('Color Index'),
}
def unlink(self, cr, uid, ids, context=None):
@@ -198,6 +199,7 @@
'active': 1,
'photo': _get_photo,
'marital': 'single',
+ 'color': 0,
}
def _check_recursion(self, cr, uid, ids, context=None):
=== modified file 'hr/hr_view.xml'
--- hr/hr_view.xml 2011-08-28 01:03:41 +0000
+++ hr/hr_view.xml 2011-09-16 07:23:30 +0000
@@ -125,7 +125,65 @@
</search>
</field>
</record>
-
+ <!-- HR Kanban View -->
+ <record model="ir.ui.view" id="hr_kanban_view_employees">
+ <field name="name">HR - Employess Kanban</field>
+ <field name="model">hr.employee</field>
+ <field name="type">kanban</field>
+ <field name="arch" type="xml">
+ <kanban default_group_by="department_id">
+ <field name="name"/>
+ <field name="color"/>
+ <field name="department_id"/>
+ <field name="job_id"/>
+ <field name="user_id"/>
+ <field name="photo"/>
+ <templates>
+ <t t-name="kanban-box">
+ <t t-set="color" t-value="kanban_color(record.color.raw_value || record.name.raw_value)"/>
+ <div t-att-class="color + (record.color.raw_value == 1 ? ' oe_kanban_color_alert' : '')">
+ <div class="oe_kanban_box oe_kanban_color_border">
+ <table class="oe_kanban_table oe_kanban_box_header oe_kanban_color_bgdark oe_kanban_draghandle">
+ <tr class="oe_kanban_color_border">
+ <td class="oe_kanban_title2" align="left" valign="middle"><field name="name"/></td>
+ <td valign="top" width="22">
+ <img t-att-src="kanban_gravatar(record.user_id.value, 22)" class="oe_kanban_gravatar"/>
+ </td>
+ </tr>
+ </table>
+ <div class="oe_kanban_box_content oe_kanban_color_bglight oe_kanban_box_show_onclick_trigger">
+ <table class="oe_kanban_table oe_kanban_box_content">
+ <tr class="oe_kanban_color_border">
+ <td valign="top" width="30">
+ <img t-att-src="kanban_gravatar(record.photo.value, 30)" width="40" height="40" class="oe_kanban_gravatar"/>
+ </td>
+ <td>
+ <span class="oe_kanban_title3" ><b> <field name="job_id"/></b></span>
+ <field name="department_id"/>
+ <br class="oe_kanban_clear"/>
+ <i><field name="address_id"/></i><br/>
+ <b><font size="2"><field name="work_email"/>
+ <t t-if="record.work_phone.raw_value && record.work_email.raw_value">,</t>
+ <field name="work_phone"/></font></b>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="oe_kanban_buttons_set oe_kanban_color_border oe_kanban_color_bglight oe_kanban_box_show_onclick">
+ <div class="oe_kanban_left">
+ <a string="Edit" icon="gtk-edit" type="edit"/>
+ <a string="Change Color" icon="color-picker" type="color" name="color"/>
+ <a string="Send New Email" name="%(mail.action_email_compose_message_wizard)d" icon="terp-mail-message-new" type="action"/>
+ </div>
+ <br class="oe_kanban_clear"/>
+ </div>
+ </div>
+ </div>
+ </t>
+ </templates>
+ </kanban>
+ </field>
+ </record>
<record id="open_view_employee_tree" model="ir.actions.act_window">
<field name="name">Employees Structure</field>
<field name="res_model">hr.employee</field>
@@ -149,13 +207,27 @@
<field name="name">Employees</field>
<field name="res_model">hr.employee</field>
<field name="view_type">form</field>
- <field name="view_mode">tree,form</field>
+ <field name="view_mode">tree,form,kanban</field>
<field name="domain">[]</field>
<field name="context">{"search_default_department_id": department_id,"search_default_active":eval('True')}</field>
<field name="view_id" ref="view_employee_tree"/>
<field name="search_view_id" ref="view_employee_filter"/>
<field name="help">Here you can manage your work force by creating employees and assigning them specific properties in the system. Maintain all employee related information and keep track of anything that needs to be recorded for them. The personal information tab will help you maintain their identity data. The Categories tab gives you the opportunity to assign them related employee categories depending on their position and activities within the company. A category can be a seniority level within the company or a department. The Timesheets tab allows to assign them a specific timesheet and analytic journal where they will be able to enter time through the system. In the note tab, you can enter text data that should be recorded for a specific employee.</field>
</record>
+
+ <record id="open_view_employee_list_my_tree2" model="ir.actions.act_window.view">
+ <field name="sequence" eval="1"/>
+ <field name="view_mode">tree</field>
+ <field name="view_id" ref="view_employee_tree"/>
+ <field name="act_window_id" ref="open_view_employee_list_my"/>
+ </record>
+
+ <record id="open_view_employee_list_my_form2" model="ir.actions.act_window.view">
+ <field name="sequence" eval="2"/>
+ <field name="view_mode">form</field>
+ <field name="view_id" ref="view_employee_form"/>
+ <field name="act_window_id" ref="open_view_employee_list_my"/>
+ </record>
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main"/>
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp