Ensure types in both sides of comparator are equals

This commit is contained in:
Jes?s Mart?n Jim?nez 2016-08-24 13:21:15 +02:00
parent eb02e356d1
commit 84c1e53c31
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
from collections import defaultdict
from trytond.model import fields, ModelView
from trytond.pool import Pool, PoolMeta
from trytond.pyson import Eval, If, Bool
from trytond.pyson import Equal, Eval, If, Bool
from trytond.transaction import Transaction
__all__ = ['Invoice', 'InvoiceLine']
@ -36,7 +36,7 @@ class Invoice:
cls._buttons.update({
'create_intercompany_invoices': {
'invisible': (~Eval('state').in_(['posted', 'paid'])
| Eval('type') == 'in'),
| Equal(Eval('type'), 'in')),
},
})