Skip to content

Commit

Permalink
[FIX] hr_payroll_period: remove warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
renda-dev committed Oct 23, 2023
1 parent 4ef0f97 commit b3ddc0c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion hr_payroll_period/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{
"name": "HR Payroll Period",
"version": "14.0.1.0.0",
"version": "14.0.1.0.1",
"license": "AGPL-3",
"category": "Payroll",
"summary": "Add payroll periods",
Expand Down
11 changes: 11 additions & 0 deletions hr_payroll_period/migrations/14.0.1.0.1/pre-migration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from odoo.tools.sql import column_exists, rename_column


def migrate(cr, version):
if column_exists(cr, "hr_contract", "shedule_pay"):
rename_column(
cr,
"hr_contract",
"shedule_pay",
"schedule_pay",
)
4 changes: 1 addition & 3 deletions hr_payroll_period/models/hr_contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ class HrContract(models.Model):
_inherit = "hr.contract"

# Add semi-monthly to payroll schedules
schedule_pay = fields.Selection(
get_schedules, "Scheduled Pay", oldname="shedule_pay", index=True
)
schedule_pay = fields.Selection(get_schedules, "Scheduled Pay", index=True)
2 changes: 1 addition & 1 deletion hr_payroll_period/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class HrEmployee(models.AbstractModel):
_inherit = "hr.employee.base"

contract_id = fields.Many2one(search="_search_contract")
contract_id = fields.Many2one(comodel_name="hr.contract", search="_search_contract")

@api.model
def _search_contract(self, operator, value):
Expand Down

0 comments on commit b3ddc0c

Please sign in to comment.