Skip to content

Commit

Permalink
Revision
Browse files Browse the repository at this point in the history
  • Loading branch information
mikevhe18 committed Nov 17, 2017
1 parent 08abe56 commit 7c88e2a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions hr_payslip_type/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
from . import wizards
5 changes: 5 additions & 0 deletions hr_payslip_type/wizards/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import hr_payroll_payslips_by_employees
29 changes: 29 additions & 0 deletions hr_payslip_type/wizards/hr_payroll_payslips_by_employees.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
# Copyright 2017 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from openerp import models, api
import logging


_logger = logging.getLogger(__name__)


class HrPayslipEmployees(models.TransientModel):
_inherit = "hr.payslip.employees"

@api.multi
def compute_sheet(self):
res = super(HrPayslipEmployees, self).compute_sheet()
obj_hr_payslip_run = self.env["hr.payslip.run"]
payslip_run = obj_hr_payslip_run.browse(
self.env.context['active_id'])
payslip_type =\
payslip_run.payslip_type_id and \
payslip_run.payslip_type_id.id or False

payslip_run.slip_ids.write({
'payslip_type_id': payslip_type
})
payslip_run.slip_ids.compute_sheet()
return res

0 comments on commit 7c88e2a

Please sign in to comment.