diff --git a/addons/crm/crm.py b/addons/crm/crm.py
index f1b4eab309b..c84c96e3abc 100644
--- a/addons/crm/crm.py
+++ b/addons/crm/crm.py
@@ -908,8 +908,7 @@ class users(osv.osv):
_description = "Users"
_columns = {
'context_section_id': fields.selection(_section_get, 'Sales Section'),
- }
-
+ }
users()
diff --git a/addons/crm/crm_view.xml b/addons/crm/crm_view.xml
index 02a2984a0a2..2c8dc9209a9 100644
--- a/addons/crm/crm_view.xml
+++ b/addons/crm/crm_view.xml
@@ -48,41 +48,41 @@
- # ------------------------------------------------------
- # Stage
- # ------------------------------------------------------
-
- crm.case.stage.tree
- crm.case.stage
- tree
-
-
-
-
-
-
-
-
-
- crm.case.stage.form
- crm.case.stage
- form
-
-
-
-
-
- Stages
- crm.case.stage
- form
-
-
-
+ # ------------------------------------------------------
+ # Stage
+ # ------------------------------------------------------
+
+ crm.case.stage.tree
+ crm.case.stage
+ tree
+
+
+
+
+
+
+
+
+
+ crm.case.stage.form
+ crm.case.stage
+ form
+
+
+
+
+
+ Stages
+ crm.case.stage
+ form
+
+
+
crm.case.categ.form
@@ -92,7 +92,7 @@
@@ -116,7 +116,7 @@
form
-
+
@@ -185,8 +185,8 @@
+
+ -->
@@ -243,11 +243,11 @@
+ attrs="{ 'required' : [('name','=','user')]}"
+ on_change="change_email(user_id, partner_id)"/>
+ attrs="{'required' : [('name','=','partner')]}"
+ on_change="change_email(user_id, partner_id)"/>
@@ -350,15 +350,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -402,8 +402,8 @@
+ name="%(crm.action_view_crm_email_add_cc_wizard)d"
+ icon="gtk-add" type="action"/>
@@ -430,8 +430,8 @@
@@ -442,11 +442,11 @@
-
+
-
+
Cases
crm.case
@@ -502,17 +502,17 @@
crm.case.history
search
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
Histories
@@ -634,30 +634,30 @@
-
+
view.users.form.crm.modif.inherited1
res.users
form
-
+
-
- view.users.form.crm.modif.inherited2
- res.users
- form
-
-
-
-
-
-
-
-
+
+ view.users.form.crm.modif.inherited2
+ res.users
+ form
+
+
+
+
+
+
+
+
diff --git a/addons/crm/security/crm_security.xml b/addons/crm/security/crm_security.xml
index ab5fd369f0f..8799dc7aa2c 100644
--- a/addons/crm/security/crm_security.xml
+++ b/addons/crm/security/crm_security.xml
@@ -18,94 +18,5 @@
-
-
- crm.meeting.rule
-
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.claim.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.fundraising.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.helpdesk.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
-
- crm.leads.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.opportunities.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.phone.calls.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
-
-
- crm.case.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
diff --git a/addons/crm_hr/security/crm_hr_security.xml b/addons/crm_hr/security/crm_hr_security.xml
index 15fc8ce82d4..e159be6a9db 100644
--- a/addons/crm_hr/security/crm_hr_security.xml
+++ b/addons/crm_hr/security/crm_hr_security.xml
@@ -3,17 +3,6 @@
-
-
- crm.job.rule
-
-
-
-
- ['|',('section_id','=',False),('section_id','=',user.context_section_id)]
-
-
-
diff --git a/addons/hr/hr_department.py b/addons/hr/hr_department.py
index 83c1f7101fd..92d1b200d58 100644
--- a/addons/hr/hr_department.py
+++ b/addons/hr/hr_department.py
@@ -146,8 +146,6 @@ class res_users(osv.osv):
'parent_id': fields.function(_parent_compute, relation='res.users',fnct_search=_parent_search, method=True, string="Managers", type='many2many'),
'child_ids': fields.function(_child_compute, relation='res.users', fnct_search=_child_search,method=True, string="Subordinates", type='many2many'),
}
-
-
res_users()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/sale_crm.py b/addons/sale_crm/sale_crm.py
index 556ed90c2fd..bb4c2ba18ea 100644
--- a/addons/sale_crm/sale_crm.py
+++ b/addons/sale_crm/sale_crm.py
@@ -29,13 +29,12 @@ class sale_order(osv.osv):
}
def _get_section(self, cr, uid, context):
- user = self.pool.get('res.users').browse(cr,uid,uid,context=context)
- return int(user.context_section_id)
+ return context.get('context_section_id',False)
_defaults = {
- 'section_id':_get_section
- }
+ 'section_id': _get_section
+ }
sale_order()
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
\ No newline at end of file
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/sale_crm/security/sale_crm_security.xml b/addons/sale_crm/security/sale_crm_security.xml
index 96fe3c63939..986cfc4add6 100644
--- a/addons/sale_crm/security/sale_crm_security.xml
+++ b/addons/sale_crm/security/sale_crm_security.xml
@@ -2,26 +2,6 @@
-
- Sale Order sale_crm
-
-
-
-
-
- ['|',('section_id','=',False),('section_id','in',[user.context_section_id])]
-
-
-
- Sale Order Line sale_crm
-
-
-
-
-
- ['|',('order_id.section_id','=',False),('order_id.section_id','in',[user.context_section_id])]
-
-