diff --git a/openerp/addons/base/currency_data.xml b/openerp/addons/base/currency_data.xml
index 11a83404b02..0009b6ae95c 100644
--- a/openerp/addons/base/currency_data.xml
+++ b/openerp/addons/base/currency_data.xml
@@ -8,6 +8,7 @@
$
0.01
4
+ before
diff --git a/openerp/addons/base/ir/ir.xml b/openerp/addons/base/ir/ir.xml
index 29bb681981a..3189870aa68 100644
--- a/openerp/addons/base/ir/ir.xml
+++ b/openerp/addons/base/ir/ir.xml
@@ -1442,6 +1442,7 @@
+
@@ -1493,8 +1494,9 @@
-
+
+
diff --git a/openerp/addons/base/ir/ir_model.py b/openerp/addons/base/ir/ir_model.py
index 46ab8841deb..74589003611 100644
--- a/openerp/addons/base/ir/ir_model.py
+++ b/openerp/addons/base/ir/ir_model.py
@@ -468,6 +468,7 @@ class ir_model_access(osv.osv):
_name = 'ir.model.access'
_columns = {
'name': fields.char('Name', size=64, required=True, select=True),
+ 'active': fields.boolean('Active', help='If you uncheck the active field, it will disable the ACL without deleting it (if you delete a native ACL, it will be re-created when you reload the module.'),
'model_id': fields.many2one('ir.model', 'Object', required=True, domain=[('osv_memory','=', False)], select=True, ondelete='cascade'),
'group_id': fields.many2one('res.groups', 'Group', ondelete='cascade', select=True),
'perm_read': fields.boolean('Read Access'),
@@ -475,6 +476,9 @@ class ir_model_access(osv.osv):
'perm_create': fields.boolean('Create Access'),
'perm_unlink': fields.boolean('Delete Access'),
}
+ _defaults = {
+ 'active': True,
+ }
def check_groups(self, cr, uid, group):
grouparr = group.split('.')
@@ -499,14 +503,16 @@ class ir_model_access(osv.osv):
cr.execute("SELECT perm_" + mode + " "
" FROM ir_model_access a "
" JOIN ir_model m ON (m.id = a.model_id) "
- " WHERE m.model = %s AND a.group_id = %s", (model_name, group_id)
+ " WHERE m.model = %s AND a.active IS True "
+ " AND a.group_id = %s", (model_name, group_id)
)
r = cr.fetchone()
if r is None:
cr.execute("SELECT perm_" + mode + " "
" FROM ir_model_access a "
" JOIN ir_model m ON (m.id = a.model_id) "
- " WHERE m.model = %s AND a.group_id IS NULL", (model_name, )
+ " WHERE m.model = %s AND a.active IS True "
+ " AND a.group_id IS NULL", (model_name, )
)
r = cr.fetchone()
@@ -531,6 +537,7 @@ class ir_model_access(osv.osv):
LEFT JOIN ir_module_category c ON (c.id=g.category_id)
WHERE
m.model=%s AND
+ a.active IS True AND
a.perm_''' + access_mode, (model_name,))
return [('%s/%s' % x) if x[0] else x[1] for x in cr.fetchall()]
@@ -560,6 +567,7 @@ class ir_model_access(osv.osv):
' JOIN res_groups_users_rel gu ON (gu.gid = a.group_id) '
' WHERE m.model = %s '
' AND gu.uid = %s '
+ ' AND a.active IS True '
, (model_name, uid,)
)
r = cr.fetchone()[0]
@@ -571,6 +579,7 @@ class ir_model_access(osv.osv):
' JOIN ir_model m ON (m.id = a.model_id) '
' WHERE a.group_id IS NULL '
' AND m.model = %s '
+ ' AND a.active IS True '
, (model_name,)
)
r = cr.fetchone()[0]
diff --git a/openerp/addons/base/ir/ir_rule.py b/openerp/addons/base/ir/ir_rule.py
index 75882051e6b..a4341436158 100644
--- a/openerp/addons/base/ir/ir_rule.py
+++ b/openerp/addons/base/ir/ir_rule.py
@@ -75,6 +75,7 @@ class ir_rule(osv.osv):
_columns = {
'name': fields.char('Name', size=128, select=1),
+ 'active': fields.boolean('Active', help="If you uncheck the active field, it will disable the record rule without deleting it (if you delete a native record rule, it may be re-created when you reload the module."),
'model_id': fields.many2one('ir.model', 'Object',select=1, required=True, ondelete="cascade"),
'global': fields.function(_get_value, string='Global', type='boolean', store=True, help="If no group is specified the rule is global and applied to everyone"),
'groups': fields.many2many('res.groups', 'rule_group_rel', 'rule_group_id', 'group_id', 'Groups'),
@@ -89,6 +90,7 @@ class ir_rule(osv.osv):
_order = 'model_id DESC'
_defaults = {
+ 'active': True,
'perm_read': True,
'perm_write': True,
'perm_create': True,
@@ -114,6 +116,7 @@ class ir_rule(osv.osv):
FROM ir_rule r
JOIN ir_model m ON (r.model_id = m.id)
WHERE m.model = %s
+ AND r.active is True
AND r.perm_""" + mode + """
AND (r.id IN (SELECT rule_group_id FROM rule_group_rel g_rel
JOIN res_groups_users_rel u_rel ON (g_rel.group_id = u_rel.gid)
diff --git a/openerp/addons/base/module/module_data.xml b/openerp/addons/base/module/module_data.xml
index 15cbded05cd..56269fce67a 100644
--- a/openerp/addons/base/module/module_data.xml
+++ b/openerp/addons/base/module/module_data.xml
@@ -25,25 +25,25 @@
- Sales Management
+ Sales
Helps you handle your quotations, sale orders and invoicing.
2
- Project Management
+ Project
Helps you manage your projects and tasks by tracking them, generating plannings, etc...
3
- Knowledge Management
+ Knowledge
Lets you install addons geared towards sharing knowledge with and between your employees.
4
- Warehouse Management
+ Warehouse
Helps you manage your inventory and main stock operations: delivery orders, receptions, etc.
5
@@ -67,7 +67,7 @@
- Purchase Management
+ Purchases
Helps you manage your purchase-related processes such as requests for quotations, supplier invoices, etc...
9
diff --git a/openerp/addons/base/res/res_bank_view.xml b/openerp/addons/base/res/res_bank_view.xml
index 8a8fa0e2922..ac91684d4d9 100644
--- a/openerp/addons/base/res/res_bank_view.xml
+++ b/openerp/addons/base/res/res_bank_view.xml
@@ -90,8 +90,8 @@