From cdba4e10dc02dade2ed1edb2ab828ddd5594c97c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 10 Oct 2012 15:44:33 +0200 Subject: [PATCH] Missing invoice_type in depends of InvoiceLine.account and PEP8 --- invoice.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/invoice.py b/invoice.py index 866105aa62..d66917f60f 100644 --- a/invoice.py +++ b/invoice.py @@ -1330,9 +1330,10 @@ class InvoiceLine(ModelSQL, ModelView): 'out_credit_note']), ('kind', '=', 'revenue'), ('kind', '=', 'expense')), - If(Eval('invoice_type').in_(['out_invoice', 'out_credit_note']), + If(Eval('invoice_type').in_(['out_invoice', + 'out_credit_note']), ('kind', '=', 'revenue'), - ('kind', '=', 'expense'))) + ('kind', '=', 'expense'))) ], on_change=['account', 'product', '_parent_invoice.party', '_parent_invoice.type'], @@ -1340,7 +1341,7 @@ class InvoiceLine(ModelSQL, ModelView): 'invisible': Eval('type') != 'line', 'required': Eval('type') == 'line', }, - depends=['type']) + depends=['type', 'invoice_type']) unit_price = fields.Numeric('Unit Price', digits=(16, 4), states={ 'invisible': Eval('type') != 'line',