Fix flake8
This commit is contained in:
1 parent
f16e5d5b5f
commit
aebe835e82
3 files changed
+6
-5
No files matched your search
+1
-1
@@ -2,7 +2,7 @@
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
from trytond.model import fields
|
||||
from trytond.pyson import Eval
|
||||
from trytond.pool import PoolMeta
|
||||
from trytond.pool import PoolMeta
|
||||
|
||||
__all__ = ['Configuration']
|
||||
__metaclass__ = PoolMeta
|
||||
|
||||
+3
-4
@@ -46,9 +46,9 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
|
||||
select=True)
|
||||
party = fields.Many2One('party.party', 'Party', select=True,
|
||||
on_change=['party'], states={
|
||||
'readonly': Eval('state').in_(['converted', 'lost', 'cancelled']),
|
||||
'required': ~Eval('state').in_(['lead', 'lost', 'cancelled']),
|
||||
}, depends=['state'])
|
||||
'readonly': Eval('state').in_(['converted', 'lost', 'cancelled']),
|
||||
'required': ~Eval('state').in_(['lead', 'lost', 'cancelled']),
|
||||
}, depends=['state'])
|
||||
address = fields.Many2One('party.address', 'Address',
|
||||
domain=[('party', '=', Eval('party'))],
|
||||
select=True, depends=['party', 'state'],
|
||||
@@ -124,7 +124,6 @@ class SaleOpportunity(Workflow, ModelSQL, ModelView):
|
||||
where=sql_table.reference == None))
|
||||
table.not_null_action('reference', action='add')
|
||||
|
||||
|
||||
@classmethod
|
||||
def __setup__(cls):
|
||||
super(SaleOpportunity, cls).__setup__()
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
#this repository contains the full copyright notices and license terms.
|
||||
|
||||
from .test_sale_opportunity import suite
|
||||
|
||||
__all__ = ['suite']
|
||||
Reference in new issue
Block a user