From cbaa493df337bc006933c6cbc5b983c58eb17548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 7 Jun 2013 19:26:17 +0200 Subject: [PATCH] Fix wrong parent test in create_leveling issue3246 review920002 (transplanted from 7705e9587201bdb38970df1c69d6ad3e325474a8) --- work.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/work.py b/work.py index 2ff7dfa50d..10823149f3 100644 --- a/work.py +++ b/work.py @@ -598,9 +598,8 @@ class Work: yield sibling, delay - parent = self.parent and self.parent.id or None siblings = self.search([ - ('parent', '=', parent.id) + ('parent', '=', self.parent.id if self.parent else None) ]) refkey = get_key(self) @@ -617,8 +616,8 @@ class Work: 'back_leveling_delay': delay, }) - if parent: - parent.compute_dates() + if self.parent: + self.parent.compute_dates() @classmethod def write(cls, works, values):