mirror of
https://bitbucket.org/presik/trytonpsk-staff_payroll_co.git
synced 2023-12-14 06:42:56 +01:00
minor fix in import employess
This commit is contained in:
parent
5083dfc811
commit
cb263a4b0a
31
employee.py
31
employee.py
|
@ -228,22 +228,23 @@ class Employee(metaclass=PoolMeta):
|
|||
])
|
||||
if wages:
|
||||
wage_id = wages[0].id
|
||||
if row[19]:
|
||||
parties = Party.search([('id_number', '=', row[19])])
|
||||
if not parties and row[18]:
|
||||
cls.raise_user_error('party_not_exists', row[19])
|
||||
# parties = _create_party(Party, row[18])
|
||||
party_id = parties[0].id
|
||||
else:
|
||||
party_id = None
|
||||
if wage_id not in current_wages_ids:
|
||||
if row[19]:
|
||||
parties = Party.search([('id_number', '=', row[19])])
|
||||
if not parties and row[18]:
|
||||
cls.raise_user_error('party_not_exists', row[19])
|
||||
# parties = _create_party(Party, row[18])
|
||||
party_id = parties[0].id
|
||||
else:
|
||||
party_id = None
|
||||
|
||||
values_mand_wage.append({
|
||||
'employee': employee.id,
|
||||
'fix_amount': 0,
|
||||
'party': party_id,
|
||||
'wage_type': wage_id,
|
||||
'analytic_account': accounts[0].id,
|
||||
})
|
||||
values_mand_wage.append({
|
||||
'employee': employee.id,
|
||||
'fix_amount': 0,
|
||||
'party': party_id,
|
||||
'wage_type': wage_id,
|
||||
'analytic_account': accounts[0].id,
|
||||
})
|
||||
|
||||
for wage in employee.category.wages_default:
|
||||
parties = []
|
||||
|
|
Loading…
Reference in a new issue