minor fix import employee

This commit is contained in:
Camilo Sarmiento 2020-10-01 11:26:08 -05:00
parent 735f3fda49
commit 65d2f9a041

View file

@ -202,8 +202,8 @@ class Employee(metaclass=PoolMeta):
}])
values_mand_wage = []
if employee.category and employee.category.wages_default:
current_wages_ids = [m.wage_type.id
for m in employee.mandatory_wages]
# current_wages_ids = [m.wage_type.id
# for m in employee.mandatory_wages]
accounts = AnalyticAccount.search([
('name', '=', row[9]),
@ -252,19 +252,19 @@ class Employee(metaclass=PoolMeta):
if wage.type_concept == 'health':
parties = Party.search([('id_number', '=', row[16])])
if not parties and row[16]:
parties = _create_party(Party, row[16])
cls.raise_user_error('party_not_exists', row[16])
elif wage.type_concept == 'retirement':
parties = Party.search([('id_number', '=', row[17])])
if not parties and row[17]:
parties = _create_party(Party, row[17])
cls.raise_user_error('party_not_exists', row[17])
elif wage.type_concept == 'box_family':
parties = Party.search([('id_number', '=', row[18])])
if not parties and row[18]:
parties = _create_party(Party, row[18])
cls.raise_user_error('party_not_exists', 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])
cls.raise_user_error('party_not_exists', row[19])
if parties:
party_id = parties[0].id