Skip to content

Commit

Permalink
Merge pull request #25 from abgfbr/fix/utilizar-variavel-computada
Browse files Browse the repository at this point in the history
Fix/utilizar variavel computada
  • Loading branch information
hendrixcosta authored Jul 31, 2018
2 parents ee7c7cf + ad95fd1 commit abf6b2d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions l10n_br_hr_payroll/models/hr_payslip_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ def verificar_holerites_gerados(self):
# pegar todos contratos da empresa que são válidos,
dominio_contratos = [
('date_start', '<=', lote.date_end),
('tipo', '!=', 'autonomo'),
('company_id', '=', lote.company_id.id),
]

Expand Down Expand Up @@ -321,12 +322,12 @@ def gerar_holerites(self):
payslip._compute_set_employee_id()
payslip.compute_sheet()
_logger.info(
u"Holerite " + contrato.name +
u"Holerite " + contrato.display_name +
u" processado com sucesso!")
self.env.cr.commit()
except:
_logger.warning(
u"Holerite " + contrato.name +
u"Holerite " + contrato.display_name +
u" falhou durante o cálculo!")
payslip.unlink()
continue
Expand Down

0 comments on commit abf6b2d

Please sign in to comment.