[Fix] hr : once in the form view, there is always a message that prompts to say that...
authorVir (Open ERP) <vir@tinyerp.com>
Thu, 7 Oct 2010 07:09:23 +0000 (12:39 +0530)
committerVir (Open ERP) <vir@tinyerp.com>
Thu, 7 Oct 2010 07:09:23 +0000 (12:39 +0530)
bzr revid: vir@tinyerp.com-20101007070923-c6602jlppu2iiiql

addons/hr/hr.py
addons/hr/hr_view.xml

index e2da2b9..803210d 100644 (file)
@@ -136,7 +136,7 @@ class hr_employee(osv.osv):
         'department_id':fields.many2one('hr.department', 'Department'),
         'address_id': fields.many2one('res.partner.address', 'Working Address'),
         'address_home_id': fields.many2one('res.partner.address', 'Home Address'),
-        'work_phone': fields.related('address_id', 'phone', type='char', string='Work Phone', readonly=True),
+        'work_phone': fields.related('address_id', 'phone', type='char', size=32, string='Work Phone', readonly=True),
         'work_email': fields.related('address_id', 'email', type='char', size=240, string='Work E-mail'),
         'work_location': fields.char('Office Location', size=32),
         'notes': fields.text('Notes'),
index b47bf23..929afbe 100644 (file)
@@ -99,7 +99,7 @@
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Employees">
-                    <filter icon="terp-personal+" domain="[('active','=',True)]" string="Active" groups="base.group_extended"/>
+                    <filter icon="terp-personal+" domain="[('active','=',True)]" name="active" string="Active" groups="base.group_extended"/>
                     <separator orientation="vertical" />
                     <field name="name"/>
                     <field name="department_id" widget="selection">
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="domain">[]</field>
-            <field name="context">{"search_default_department_id": department_id}</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">The employee directory contains all data related to your employees : from their photo up to their hourly estimated costs for the timesheets.Employees are managed by departments and can be linked to users to manage their access rights.</field>