From 4a84ed0dfda08accc053b66db379f3d99be7cb3a Mon Sep 17 00:00:00 2001 From: Antonin Bourguignon Date: Tue, 3 Jul 2012 18:53:06 +0200 Subject: [PATCH] [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 --- addons/portal/res_user.py | 2 -- addons/portal/security/portal_security.xml | 2 +- addons/portal_crm/security/portal_crm_security.xml | 6 ++++++ addons/portal_crm/wizard/contact.py | 2 +- addons/portal_event/security/portal_security.xml | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) create mode 100644 addons/portal_crm/security/portal_crm_security.xml diff --git a/addons/portal/res_user.py b/addons/portal/res_user.py index 127c3079b29..9ed95a8a740 100644 --- a/addons/portal/res_user.py +++ b/addons/portal/res_user.py @@ -30,7 +30,5 @@ class res_users(osv.osv): string='Related Partner'), } -res_users() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml index 37e94581d77..0b5057ef506 100644 --- a/addons/portal/security/portal_security.xml +++ b/addons/portal/security/portal_security.xml @@ -1,6 +1,6 @@ - + diff --git a/addons/portal_crm/security/portal_crm_security.xml b/addons/portal_crm/security/portal_crm_security.xml new file mode 100644 index 00000000000..39f923a895b --- /dev/null +++ b/addons/portal_crm/security/portal_crm_security.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/addons/portal_crm/wizard/contact.py b/addons/portal_crm/wizard/contact.py index 7c21b71a58b..a1e38fcc988 100644 --- a/addons/portal_crm/wizard/contact.py +++ b/addons/portal_crm/wizard/contact.py @@ -11,7 +11,7 @@ class crm_contact_us(osv.TransientModel): } 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 def _get_companies(self, cr, uid, context=None): diff --git a/addons/portal_event/security/portal_security.xml b/addons/portal_event/security/portal_security.xml index 82044fb8b11..c9aec1edd4b 100644 --- a/addons/portal_event/security/portal_security.xml +++ b/addons/portal_event/security/portal_security.xml @@ -1,6 +1,6 @@ - + Personal Events