From d90917677b08aebd94f5211cdee7ff9f2434cbed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Oct 2012 16:51:31 +0200 Subject: [PATCH] Fix typo when looping on childs from Active Record migration issue2823 --- tax.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tax.py b/tax.py index 7fb0aecf83..7bb8f4dd4e 100644 --- a/tax.py +++ b/tax.py @@ -118,7 +118,7 @@ class TaxCodeTemplate(ModelSQL, ModelView): new_id = template2tax_code[self.id] new_childs = [] - for child in template.childs: + for child in self.childs: new_childs.append(child.create_tax_code(company_id, template2tax_code=template2tax_code, parent_id=new_id)) return new_id @@ -269,7 +269,7 @@ class TaxCode(ModelSQL, ModelView): self.write([code], data) template2tax_code[self.template.id] = self.id - for child in code.childs: + for child in self.childs: child.update_tax_code(template2tax_code=template2tax_code) @@ -823,7 +823,7 @@ class Tax(ModelSQL, ModelView): self.write([tax], data) template2tax[tax.template.id] = tax.id - for child in tax.childs: + for child in self.childs: child.update_tax(template2tax_code, template2account, template2tax=template2tax)