The patch "xrg" mentioned previously sounds like one of your best options. Otherwise if you have a look at hr_department.py they inherit the actions module and check for string within the domain. If they find it they replace with correct values. Not sure if this helps, but check it out...
###/bin/addons/board_project/board_project_manager_view.py### <record> <field>Timesheets</field> <field>hr_timesheet_sheet.sheet</field> <field>[('state','<>','done'),('user_id','in',department_users_get())]</field> <field>form</field> <field> </record> ###/bin/addons/hr/hr_department.py#### class ir_action_window(osv.osv): _inherit = 'ir.actions.act_window' def read(self, cr, uid, ids, fields=None, context=None, load='_classic_read'): select = ids if isinstance(ids, (int, long)): select = [ids] res = super(ir_action_window, self).read(cr, uid, select, fields=fields, context=context, load=load) for r in res: mystring = 'department_users_get()' if mystring in (r.get('domain', '[]') or ''): r['domain'] = r['domain'].replace(mystring, str( self.pool.get('hr.department')._get_members(cr, uid))) if isinstance(ids, (int, long)): if res: return res[0] else: return False return res -------------------- m2f -------------------- -- http://www.openobject.com/forum/viewtopic.php?p=38353#38353 -------------------- m2f -------------------- _______________________________________________ Tinyerp-users mailing list http://tiny.be/mailman2/listinfo/tinyerp-users
