Make party readonly in case there is lines

issue3942
review5321002
This commit is contained in:
Nicolas Évrard committed 2014-07-11 18:18:36 +02:00
1 parent 8619a99bb8
commit c594b231af
1 file changed
+2 -1
+2 -1
View File
@@ -67,7 +67,8 @@ class Sale(Workflow, ModelSQL, ModelView):
depends=['state'])
party = fields.Many2One('party.party', 'Party', required=True, select=True,
states={
'readonly': Eval('state') != 'draft',
'readonly': ((Eval('state') != 'draft')
| (Eval('lines', [0]) & Eval('party'))),
},
depends=['state'])
party_lang = fields.Function(fields.Char('Party Language'),