diff --git a/beesdoo_shift/__openerp__.py b/beesdoo_shift/__manifest__.py
similarity index 97%
rename from beesdoo_shift/__openerp__.py
rename to beesdoo_shift/__manifest__.py
index e0c655b..502287f 100644
--- a/beesdoo_shift/__openerp__.py
+++ b/beesdoo_shift/__manifest__.py
@@ -13,7 +13,7 @@
'website': "https://github.com/beescoop/Obeesdoo",
'category': 'Cooperative management',
- 'version': '9.0.1.3.0',
+ 'version': '10.0.1.0.0',
'depends': ['beesdoo_base', 'barcodes'],
diff --git a/beesdoo_shift/migrations/9.0.1.2.1/post-migrate.py b/beesdoo_shift/migrations/9.0.1.2.1/post-migrate.py
deleted file mode 100644
index 5db024b..0000000
--- a/beesdoo_shift/migrations/9.0.1.2.1/post-migrate.py
+++ /dev/null
@@ -1,11 +0,0 @@
-# coding: utf-8
-
-
-def migrate(cr, version):
- """Fix bug occuring when trying to save a temporary exempt
- (missing sequence in database). """
- cr.execute(
- """
- CREATE SEQUENCE IF NOT EXISTS beesdoo_website_shift_config_settings_id_seq
- """
- )
diff --git a/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py b/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py
deleted file mode 100644
index 88297a5..0000000
--- a/beesdoo_shift/migrations/9.0.1.2.3/post-migrate.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# coding: utf-8
-
-
-def migrate(cr, version):
- """Fix bug occuring when trying to save a temporary exempt
- (missing sequence in database). """
- cr.execute(
- """
- CREATE SEQUENCE IF NOT EXISTS beesdoo_website_shift_config_settings_id_seq
- """
- )
- cr.execute(
- """
- CREATE SEQUENCE IF NOT EXISTS beesdoo_shift_temporary_exemption_id_seq
- """
- )
diff --git a/beesdoo_shift/migrations/9.0.1.3.0/post-migrate.py b/beesdoo_shift/migrations/9.0.1.3.0/post-migrate.py
deleted file mode 100644
index e0969f4..0000000
--- a/beesdoo_shift/migrations/9.0.1.3.0/post-migrate.py
+++ /dev/null
@@ -1,66 +0,0 @@
-# coding: utf-8
-
-
-def migrate(cr, version):
- """
- The Char field 'code' from shift stage is now a Selection Field
- named 'state'.
- """
- # Set new field state
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET state = old_code
- """
- )
- # Map new stage from corresponding old stage
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET state = 'absent_2'
- FROM res_partner
- WHERE beesdoo_shift_shift.worker_id = res_partner.id
- AND (
- beesdoo_shift_shift.old_code = 'absent'
- OR (
- beesdoo_shift_shift.old_code = 'excused'
- AND res_partner.working_mode = 'irregular'
- )
- )
- """
- )
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET state = 'absent_1'
- FROM res_partner
- WHERE beesdoo_shift_shift.worker_id = res_partner.id
- AND beesdoo_shift_shift.old_code = 'excused'
- AND res_partner.working_mode = 'regular'
- """
- )
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET state = 'absent_0'
- FROM res_partner
- WHERE beesdoo_shift_shift.worker_id = res_partner.id
- AND beesdoo_shift_shift.old_code = 'excused_necessity'
- """
- )
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET state = 'absent_0'
- WHERE beesdoo_shift_shift.state = 'excused'
- """
- )
- cr.execute(
- """
- DELETE FROM beesdoo_shift_shift
- WHERE beesdoo_shift_shift.state = 'absent'
- """
- )
-
- # Drop temporary columns
- cr.execute("ALTER TABLE beesdoo_shift_shift DROP COLUMN old_code")
diff --git a/beesdoo_shift/migrations/9.0.1.3.0/pre-migrate.py b/beesdoo_shift/migrations/9.0.1.3.0/pre-migrate.py
deleted file mode 100644
index 58b4900..0000000
--- a/beesdoo_shift/migrations/9.0.1.3.0/pre-migrate.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# coding: utf-8
-
-
-def migrate(cr, version):
- # Record information from old shift stage
- cr.execute("ALTER TABLE beesdoo_shift_shift ADD old_code varchar")
- cr.execute(
- """
- UPDATE beesdoo_shift_shift
- SET old_code = (
- SELECT code
- FROM beesdoo_shift_stage
- WHERE id = stage_id
- )
- """
- )
diff --git a/beesdoo_shift/models/attendance_sheet.py b/beesdoo_shift/models/attendance_sheet.py
index 742a852..2d65200 100644
--- a/beesdoo_shift/models/attendance_sheet.py
+++ b/beesdoo_shift/models/attendance_sheet.py
@@ -6,8 +6,8 @@ from datetime import date, datetime, timedelta
from lxml import etree
-from openerp import _, api, exceptions, fields, models
-from openerp.exceptions import UserError, ValidationError
+from odoo import _, api, exceptions, fields, models
+from odoo.exceptions import UserError, ValidationError
class AttendanceSheetShift(models.AbstractModel):
diff --git a/beesdoo_shift/models/cooperative_status.py b/beesdoo_shift/models/cooperative_status.py
index a019d77..3c8f633 100644
--- a/beesdoo_shift/models/cooperative_status.py
+++ b/beesdoo_shift/models/cooperative_status.py
@@ -1,10 +1,9 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import ValidationError, UserError
+from odoo import models, fields, api, _
+from odoo.exceptions import ValidationError, UserError
from datetime import timedelta, datetime
import logging
-from openerp.osv.fields import related
_logger = logging.getLogger(__name__)
PERIOD = 28 # TODO: use system parameter
diff --git a/beesdoo_shift/models/planning.py b/beesdoo_shift/models/planning.py
index 84c650f..71bda79 100644
--- a/beesdoo_shift/models/planning.py
+++ b/beesdoo_shift/models/planning.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import UserError
+from odoo import models, fields, api, _
+from odoo.exceptions import UserError
from pytz import timezone, UTC
import math
diff --git a/beesdoo_shift/models/res_config.py b/beesdoo_shift/models/res_config.py
index ba6e7bb..f8e788c 100644
--- a/beesdoo_shift/models/res_config.py
+++ b/beesdoo_shift/models/res_config.py
@@ -5,7 +5,7 @@
import ast
-from openerp import fields, models, api
+from odoo import fields, models, api
class ShiftConfigSettings(models.TransientModel):
diff --git a/beesdoo_shift/models/task.py b/beesdoo_shift/models/task.py
index 75ad52c..3364189 100644
--- a/beesdoo_shift/models/task.py
+++ b/beesdoo_shift/models/task.py
@@ -2,8 +2,8 @@
import json
from datetime import datetime, timedelta
-from openerp import _, api, fields, models
-from openerp.exceptions import UserError, ValidationError
+from odoo import _, api, fields, models
+from odoo.exceptions import UserError, ValidationError
diff --git a/beesdoo_shift/security/group.xml b/beesdoo_shift/security/group.xml
index 6e1b37f..fbda84a 100644
--- a/beesdoo_shift/security/group.xml
+++ b/beesdoo_shift/security/group.xml
@@ -1,5 +1,4 @@
-
Attendance Sheet Generic Access
@@ -30,5 +29,4 @@
-
diff --git a/beesdoo_shift/tests/test_beesdoo_shift.py b/beesdoo_shift/tests/test_beesdoo_shift.py
index 7c1cbb2..d862cbf 100644
--- a/beesdoo_shift/tests/test_beesdoo_shift.py
+++ b/beesdoo_shift/tests/test_beesdoo_shift.py
@@ -5,9 +5,9 @@
import time
from datetime import datetime, timedelta
-from openerp import exceptions, fields
-from openerp.exceptions import UserError, ValidationError
-from openerp.tests.common import TransactionCase
+from odoo import exceptions, fields
+from odoo.exceptions import UserError, ValidationError
+from odoo.tests.common import TransactionCase
class TestBeesdooShift(TransactionCase):
diff --git a/beesdoo_shift/views/res_config_view.xml b/beesdoo_shift/views/res_config_view.xml
index 73d6e7a..68b6dac 100644
--- a/beesdoo_shift/views/res_config_view.xml
+++ b/beesdoo_shift/views/res_config_view.xml
@@ -3,7 +3,7 @@
Copyright 2019-2020 Elouan Le Bars
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-->
-
+
Day Number List
@@ -88,4 +88,4 @@
/>
-
+
diff --git a/beesdoo_shift/wizard/assign_super_coop.py b/beesdoo_shift/wizard/assign_super_coop.py
index c34a783..9ca44de 100644
--- a/beesdoo_shift/wizard/assign_super_coop.py
+++ b/beesdoo_shift/wizard/assign_super_coop.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
+from odoo import models, fields, api, _
class AssignSuperCoop(models.TransientModel):
diff --git a/beesdoo_shift/wizard/batch_template.py b/beesdoo_shift/wizard/batch_template.py
index 4cb4cff..c608600 100644
--- a/beesdoo_shift/wizard/batch_template.py
+++ b/beesdoo_shift/wizard/batch_template.py
@@ -5,7 +5,7 @@ Created on 2 janv. 2017
@author: Thibault Francois
'''
-from openerp import models, fields, api, _
+from odoo import models, fields, api, _
class GenerateShiftTemplate(models.TransientModel):
_name = 'beesddoo.shift.generate_shift_template'
diff --git a/beesdoo_shift/wizard/extension.py b/beesdoo_shift/wizard/extension.py
index 3e0a105..1d3a11c 100644
--- a/beesdoo_shift/wizard/extension.py
+++ b/beesdoo_shift/wizard/extension.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import UserError
+from odoo import models, fields, api, _
+from odoo.exceptions import UserError
class Subscribe(models.TransientModel):
_name = 'beesdoo.shift.extension'
diff --git a/beesdoo_shift/wizard/holiday.py b/beesdoo_shift/wizard/holiday.py
index 36a2e5b..387502c 100644
--- a/beesdoo_shift/wizard/holiday.py
+++ b/beesdoo_shift/wizard/holiday.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import ValidationError
+from odoo import models, fields, api, _
+from odoo.exceptions import ValidationError
class Subscribe(models.TransientModel):
_name = 'beesdoo.shift.holiday'
diff --git a/beesdoo_shift/wizard/instanciate_planning.py b/beesdoo_shift/wizard/instanciate_planning.py
index ef31d91..40948cf 100644
--- a/beesdoo_shift/wizard/instanciate_planning.py
+++ b/beesdoo_shift/wizard/instanciate_planning.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
+from odoo import models, fields, api, _
class InstanciatePlanning(models.TransientModel):
diff --git a/beesdoo_shift/wizard/subscribe.py b/beesdoo_shift/wizard/subscribe.py
index 38053f6..af9613d 100644
--- a/beesdoo_shift/wizard/subscribe.py
+++ b/beesdoo_shift/wizard/subscribe.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import UserError
+from odoo import models, fields, api, _
+from odoo.exceptions import UserError
class StatusActionMixin(models.AbstractModel):
_name = "beesdoo.shift.action_mixin"
diff --git a/beesdoo_shift/wizard/temporary_exemption.py b/beesdoo_shift/wizard/temporary_exemption.py
index f19e430..f2b20af 100644
--- a/beesdoo_shift/wizard/temporary_exemption.py
+++ b/beesdoo_shift/wizard/temporary_exemption.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-from openerp import models, fields, api, _
-from openerp.exceptions import ValidationError
+from odoo import models, fields, api, _
+from odoo.exceptions import ValidationError
class TemporaryExemption(models.TransientModel):
_name = 'beesdoo.shift.temporary_exemption'
diff --git a/beesdoo_shift/wizard/validate_attendance_sheet.py b/beesdoo_shift/wizard/validate_attendance_sheet.py
index cc32a5f..df22234 100644
--- a/beesdoo_shift/wizard/validate_attendance_sheet.py
+++ b/beesdoo_shift/wizard/validate_attendance_sheet.py
@@ -2,8 +2,8 @@
import ast
-from openerp import _, api, exceptions, fields, models
-from openerp.exceptions import UserError, ValidationError
+from odoo import _, api, exceptions, fields, models
+from odoo.exceptions import UserError, ValidationError
class ValidateAttendanceSheet(models.TransientModel):