parent
ca38d4f3b9
commit
b3806af9d4
Binary file not shown.
|
@ -531,16 +531,21 @@ class Liquidation(Workflow, ModelSQL, ModelView):
|
|||
('account', '=', account_id),
|
||||
('party', '=', employee.party.id),
|
||||
('reconciliation', '=', None),
|
||||
]
|
||||
if moves:
|
||||
domain.append(
|
||||
[
|
||||
'OR',
|
||||
('move', 'in', moves),
|
||||
('move.origin', 'not ilike', 'staff.payroll'),
|
||||
('move.origin', '=', None),
|
||||
])
|
||||
lines = MoveLine.search(domain)
|
||||
]
|
||||
lines1 = MoveLine.search(domain)
|
||||
lines2 = []
|
||||
if moves:
|
||||
domain = [
|
||||
('credit', '>', 0),
|
||||
('account', '=', account_id),
|
||||
('party', '=', employee.party.id),
|
||||
('reconciliation', '=', None),
|
||||
('move', 'in', moves),
|
||||
]
|
||||
lines2 = MoveLine.search(domain)
|
||||
lines = set(lines1 + lines2)
|
||||
return lines
|
||||
|
||||
@classmethod
|
||||
|
@ -574,15 +579,17 @@ class Liquidation(Workflow, ModelSQL, ModelView):
|
|||
for payroll in payrolls:
|
||||
for l in payroll.lines:
|
||||
wage = l.wage_type
|
||||
if l.wage_type.contract_finish or l.wage_type.provision_cancellation:
|
||||
if l.wage_type.provision_cancellation and not l.wage_type.contract_finish:
|
||||
wage = l.wage_type.provision_cancellation
|
||||
print(wage, wage.contract_finish, wage.provision_cancellation, self.kind, 'asasdasd')
|
||||
if wage.contract_finish or wage.provision_cancellation:
|
||||
if wage.provision_cancellation and not wage.contract_finish:
|
||||
wage = wage.provision_cancellation
|
||||
if self.kind == 'contract':
|
||||
print(wage.type_concept, 'validate2323')
|
||||
if wage.type_concept not in CONTRACT:
|
||||
continue
|
||||
elif self.kind != wage.type_concept:
|
||||
continue
|
||||
|
||||
print('va a buscar')
|
||||
if wage.id not in wages_target.keys():
|
||||
mlines = self.get_moves_lines_pending(
|
||||
payroll.employee, wage, date_end, moves
|
||||
|
|
|
@ -1187,8 +1187,9 @@ class PayrollGlobalReport(Report):
|
|||
|
||||
employee_dict = {e['employee_id_number']: e for e in parties.values()}
|
||||
|
||||
report_context['records'] = sorted(
|
||||
employee_dict.items(), key=lambda t: t[0])
|
||||
# report_context['records'] = sorted(
|
||||
# employee_dict.items(), key=lambda t: t[0])
|
||||
report_context['records'] = sorted(employee_dict.values(), key=lambda x: x['employee'])
|
||||
report_context['department'] = department
|
||||
report_context['periods_number'] = periods_number
|
||||
report_context['start_period'] = start_period
|
||||
|
|
Loading…
Reference in New Issue