minor fix import employee

This commit is contained in:
Camilo Sarmiento 2020-09-18 15:28:32 -05:00
parent 2c6081b1e2
commit 735f3fda49

View file

@ -261,6 +261,10 @@ class Employee(metaclass=PoolMeta):
parties = Party.search([('id_number', '=', row[18])])
if not parties and row[18]:
parties = _create_party(Party, row[18])
elif wage.type_concept == 'risk':
parties = Party.search([('id_number', '=', row[19])])
if not parties and row[19]:
parties = _create_party(Party, row[19])
if parties:
party_id = parties[0].id