From 3272f0d49cfb5a89953db0737021950fad49dcec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 25 Jul 2008 12:49:38 +0200 Subject: [PATCH] Change unlink to delete for issue201 --- location.xml | 4 ++-- move.py | 4 ++-- packing.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/location.xml b/location.xml index 9c2197372c..ffda9fde5b 100644 --- a/location.xml +++ b/location.xml @@ -114,7 +114,7 @@ - + @@ -122,7 +122,7 @@ - + diff --git a/move.py b/move.py index ccea43f546..551caa9ee2 100644 --- a/move.py +++ b/move.py @@ -301,11 +301,11 @@ class Move(OSV): }, context=context) return super(Move, self).write(cursor, user, ids, vals, context=context) - def unlink(self, cursor, user, ids, context=None): + def delete(self, cursor, user, ids, context=None): for move in self.browse(cursor, user, ids, context=context): if move.state not in ('draft', 'cancel'): self.raise_user_error(cursor, 'del_draft_cancel', context=context) - return super(Move, self).unlink(cursor, user, ids, context=context) + return super(Move, self).delete(cursor, user, ids, context=context) Move() diff --git a/packing.py b/packing.py index 05fa0340f2..50f9267675 100644 --- a/packing.py +++ b/packing.py @@ -208,7 +208,7 @@ class PackingIn(OSV): packing = self.browse(cursor, user, packing_id, context=context) move_obj.set_state_draft(cursor, user, [m.id for m in packing.incoming_moves], context=context) - move_obj.unlink(cursor, user, + move_obj.delete(cursor, user, [m.id for m in packing.inventory_moves], context=context) self.write(cursor, user, packing_id, { 'state': 'draft',