diff --git a/trytond/ir/action.py b/trytond/ir/action.py index 11c762b9e7..9ed2402d77 100644 --- a/trytond/ir/action.py +++ b/trytond/ir/action.py @@ -85,7 +85,7 @@ class ActionKeyword(OSV): res.append([model.model, model.name]) return res - def unlink(self, cursor, user, ids, context=None): + def delete(self, cursor, user, ids, context=None): if isinstance(ids, (int, long)): ids = [ids] for keyword in self.browse(cursor, user, ids, context=context): @@ -95,7 +95,7 @@ class ActionKeyword(OSV): .fields_view_get(cursor.dbname) except: pass - return super(ActionKeyword, self).unlink(cursor, user, ids, + return super(ActionKeyword, self).delete(cursor, user, ids, context=context) def create(self, cursor, user, vals, context=None): diff --git a/trytond/ir/default.py b/trytond/ir/default.py index 062bab33e2..b6a7904862 100644 --- a/trytond/ir/default.py +++ b/trytond/ir/default.py @@ -67,7 +67,7 @@ class Default(OSV): ('user', '=', user_default), ], context=context) if default_ids: - self.unlink(cursor, user, default_ids, context=context) + self.delete(cursor, user, default_ids, context=context) self.create(cursor, user, { 'model': model_id, 'field': field_id, diff --git a/trytond/ir/model.py b/trytond/ir/model.py index c3db8ae072..0de22fafba 100644 --- a/trytond/ir/model.py +++ b/trytond/ir/model.py @@ -67,7 +67,7 @@ class ModelAccess(OSV): perm_read = fields.Boolean('Read Access') perm_write = fields.Boolean('Write Access') perm_create = fields.Boolean('Create Access') - perm_unlink = fields.Boolean('Delete Permission') + perm_delete = fields.Boolean('Delete Permission') description = fields.Text('Description') def __init__(self): @@ -80,12 +80,12 @@ class ModelAccess(OSV): 'read': 'You can not read this document! (%s)', 'write': 'You can not write in this document! (%s)', 'create': 'You can not create this kind of document! (%s)', - 'unlink': 'You can not delete this document! (%s)', + 'delete': 'You can not delete this document! (%s)', }) def check(self, cursor, user, model_name, mode='read', raise_exception=True, context=None): - assert mode in ['read', 'write', 'create', 'unlink'], \ + assert mode in ['read', 'write', 'create', 'delete'], \ 'Invalid access mode for security' if user == 0: return True @@ -131,8 +131,8 @@ class ModelAccess(OSV): self.check(cursor.dbname) return res - def unlink(self, cursor, user, ids, context=None): - res = super(ModelAccess, self).unlink(cursor, user, ids, + def delete(self, cursor, user, ids, context=None): + res = super(ModelAccess, self).delete(cursor, user, ids, context=context) self.check(cursor.dbname) return res diff --git a/trytond/ir/model.xml b/trytond/ir/model.xml index d698623a3b..a7bd2616d9 100644 --- a/trytond/ir/model.xml +++ b/trytond/ir/model.xml @@ -133,7 +133,7 @@ - + @@ -157,8 +157,8 @@