minor fix write account
This commit is contained in:
parent
4532ccf69b
commit
8b2d4734bb
|
@ -165,9 +165,9 @@ class Account(ModelSQL, ModelView):
|
|||
|
||||
@classmethod
|
||||
def write(cls, records, vlist):
|
||||
if vlist['type'] and vlist['code'] and vlist['code'][0] in ['4', '5', '6', '7']:
|
||||
if vlist.get('type') and vlist.get('code') and vlist['code'][0] in ['4', '5', '6', '7']:
|
||||
vlist['party_required'] = True
|
||||
if not vlist['type']:
|
||||
if not vlist.get('type'):
|
||||
vlist['party_required'] = False
|
||||
return super(Account, cls).write(records, vlist)
|
||||
|
||||
|
|
Loading…
Reference in New Issue