Skip to content

Commit 08cdebe

Browse files
author
Juany Davila
committed
[MIG] hr_timesheet_sheet_period: Migration to 14.0
1 parent 5f9ce32 commit 08cdebe

File tree

6 files changed

+7
-27
lines changed

6 files changed

+7
-27
lines changed

hr_timesheet_sheet_period/__manifest__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Copyright 2016-17 Eficent Business and IT Consulting Services S.L.
1+
# Copyright 2016-17 ForgeFlow S.L.
22
# Copyright 2016-17 Serpent Consulting Services Pvt. Ltd.
33
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
44
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
55

66
{
77
"name": "HR Timesheet Sheet based on Payroll Period",
8-
"version": "12.0.2.0.0",
8+
"version": "14.0.1.0.0",
99
"category": "Human Resources",
10-
"author": "Eficent Business and IT Consulting Services S.L., "
10+
"author": "ForgeFlow S.L., "
1111
"Serpent Consulting Services Pvt. Ltd., "
1212
"Odoo Community Association (OCA)",
1313
"website": "https://github.com/OCA/timesheet",

hr_timesheet_sheet_period/migrations/12.0.2.0.0/post-upgrade.py

-15
This file was deleted.

hr_timesheet_sheet_period/models/hr_timesheet_sheet.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2016-17 Eficent Business and IT Consulting Services S.L.
1+
# Copyright 2016-17 ForgeFlow S.L.
22
# Copyright 2016-17 Serpent Consulting Services Pvt. Ltd.
33
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
44
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
@@ -49,7 +49,6 @@ def _default_hr_period_id(self):
4949
ondelete="cascade",
5050
)
5151

52-
@api.multi
5352
@api.depends("date_start", "date_end", "hr_period_id.name")
5453
def _compute_name(self):
5554
super()._compute_name()
@@ -88,7 +87,6 @@ def _get_current_pay_period(self):
8887
search_domain += [("schedule_pay", "=", contract.schedule_pay)]
8988
return HrPeriod.search(search_domain, limit=1)
9089

91-
@api.multi
9290
@api.constrains("company_id", "hr_period_id")
9391
def _check_hr_period(self):
9492
for sheet in self:
@@ -98,7 +96,6 @@ def _check_hr_period(self):
9896
):
9997
raise ValidationError(_("No suitable Payroll period found!"))
10098

101-
@api.multi
10299
@api.constrains("hr_period_id", "date_start", "date_end")
103100
def _check_hr_period_dates(self):
104101
for timesheet in self.filtered("hr_period_id"):

hr_timesheet_sheet_period/models/res_company.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
from odoo import fields, models
55

6-
SHEET_RANGE_PAYROLL_PERIOD = 100
6+
SHEET_RANGE_PAYROLL_PERIOD = "100"
77

88

99
class ResCompany(models.Model):

hr_timesheet_sheet_period/tests/test_hr_timesheet_sheet_period.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2016-17 Eficent Business and IT Consulting Services S.L.
1+
# Copyright 2016-17 ForgeFlow S.L.
22
# Copyright 2016-17 Serpent Consulting Services Pvt. Ltd.
33
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
44
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
@@ -74,7 +74,7 @@ def test_period_from_employee_contract(self):
7474
fiscal_year.create_periods()
7575
fiscal_year.button_confirm()
7676
hr_timesheet = self._create_hr_timesheet_sheet()
77-
salary_structure = self.env.ref("hr_payroll.structure_001")
77+
salary_structure = self.env.ref("payroll.structure_001")
7878

7979
contract_vals = {
8080
"employee_id": self.employee.id,

hr_timesheet_sheet_period/views/hr_timesheet_sheet_view.xml

-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/lgpl-3.0) -->
66
<odoo>
7-
87
<record id="hr_timesheet_sheet_form" model="ir.ui.view">
98
<field name="name">hr.timesheet.sheet.form</field>
109
<field name="model">hr_timesheet.sheet</field>
@@ -33,5 +32,4 @@
3332
</field>
3433
</field>
3534
</record>
36-
3735
</odoo>

0 commit comments

Comments
 (0)