[IMP] apply the employee's visibility in the contact view
right now, only 'public' and 'private' are working; 'portal' will require some tricky ir.rules and probably a group dedicated to anonymous users bzr revid: abo@openerp.com-20120703165306-27erhp9vj3rdg7o2
This commit is contained in:
parent
ae688e130f
commit
4a84ed0dfd
|
@ -30,7 +30,5 @@ class res_users(osv.osv):
|
||||||
string='Related Partner'),
|
string='Related Partner'),
|
||||||
}
|
}
|
||||||
|
|
||||||
res_users()
|
|
||||||
|
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data noupdate="1">
|
||||||
|
|
||||||
<!-- Don't use any implied_ids here; this group behavior is particular -->
|
<!-- Don't use any implied_ids here; this group behavior is particular -->
|
||||||
<record id="group_portal_member" model="res.groups">
|
<record id="group_portal_member" model="res.groups">
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<openerp>
|
||||||
|
<data noupdate="1">
|
||||||
|
|
||||||
|
</data>
|
||||||
|
</openerp>
|
|
@ -11,7 +11,7 @@ class crm_contact_us(osv.TransientModel):
|
||||||
}
|
}
|
||||||
|
|
||||||
def _get_employee(self, cr, uid, context=None):
|
def _get_employee(self, cr, uid, context=None):
|
||||||
r = self.pool.get('hr.employee').search(cr, uid, [], context=context)
|
r = self.pool.get('hr.employee').search(cr, uid, [('visibility', '!=', 'private')], context=context)
|
||||||
return r
|
return r
|
||||||
|
|
||||||
def _get_companies(self, cr, uid, context=None):
|
def _get_companies(self, cr, uid, context=None):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<openerp>
|
<openerp>
|
||||||
<data>
|
<data noupdate="1">
|
||||||
|
|
||||||
<record id="portal_event_rule" model="ir.rule">
|
<record id="portal_event_rule" model="ir.rule">
|
||||||
<field name="name">Personal Events</field>
|
<field name="name">Personal Events</field>
|
||||||
|
|
Loading…
Reference in New Issue