From 7ca3217844b25618b0885017550454b89cdf8063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 21 Aug 2011 11:20:36 +0200 Subject: [PATCH] Make PYSON more Pythonic --- purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 5fe5b9d8c8..9b2befd56e 100644 --- a/purchase.py +++ b/purchase.py @@ -1,7 +1,7 @@ #This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from trytond.model import ModelView, ModelSQL, fields -from trytond.pyson import Not, Equal, Eval +from trytond.pyson import Eval from trytond.transaction import Transaction from trytond.pool import Pool @@ -45,7 +45,7 @@ class PurchaseLine(ModelSQL, ModelView): analytic_accounts = fields.Many2One('analytic_account.account.selection', 'Analytic Accounts', states={ - 'invisible': Not(Equal(Eval('type'), 'line')), + 'invisible': Eval('type') != 'line', }, depends=['type']) def _view_look_dom_arch(self, tree, type, field_children=None):