odoo-addon-openupgrade-scripts 17.0.1.0.1.306__py3-none-any.whl → 17.0.1.0.1.309__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ # Copyright 2024 Viindoo Technology Joint Stock Company (Viindoo)
2
+ # Copyright 2025 Tecnativa - Pedro M. Baeza
3
+ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
4
+ from openupgradelib import openupgrade
5
+
6
+
7
+ def _project_update_fill_timesheet(env):
8
+ """Fill existing project updates with the theoretical information about the number
9
+ of allocated and spent hours. It may be different from the ones existing on the
10
+ moment the project update was done if later modifications changed them.
11
+ """
12
+ uom_hour = env.ref("uom.product_uom_hour")
13
+ for update in env["project.update"].with_context(active_test=False).search([]):
14
+ project = update.project_id
15
+ group = env["account.analytic.line"]._read_group(
16
+ [("project_id", "=", project.id), ("date", "<=", update.date)],
17
+ [],
18
+ ["unit_amount:sum"],
19
+ )[0]
20
+ update.write(
21
+ {
22
+ "uom_id": uom_hour.id,
23
+ "allocated_time": round(project.allocated_hours),
24
+ "timesheet_time": round(group[0]),
25
+ }
26
+ )
27
+
28
+
29
+ @openupgrade.migrate()
30
+ def migrate(env, version):
31
+ _project_update_fill_timesheet(env)
@@ -0,0 +1,37 @@
1
+ ---Models in module 'hr_timesheet'---
2
+ new model hr.employee.delete.wizard [transient]
3
+ # NOTHING TO DO
4
+
5
+ ---Fields in module 'hr_timesheet'---
6
+ hr_timesheet / account.analytic.line / ancestor_task_id (many2one) : DEL relation: project.task
7
+ # NOTHING TO DO: Removed field
8
+
9
+ hr_timesheet / account.analytic.line / parent_task_id (many2one) : NEW relation: project.task, isrelated: related, stored
10
+ # NOTHING TO DO: ORM already fills it efficiently being a 2 level depth related field
11
+
12
+ hr_timesheet / project.project / timesheet_encode_uom_id (many2one): not related anymore
13
+ hr_timesheet / project.project / timesheet_encode_uom_id (many2one): now a function
14
+ # NOTHING TO DO: non stored field
15
+
16
+ hr_timesheet / project.update / allocated_time (integer) : NEW
17
+ hr_timesheet / project.update / timesheet_time (integer) : NEW
18
+ hr_timesheet / project.update / uom_id (many2one) : NEW relation: uom.uom
19
+ # DONE: post-migration: fill historical values with the aproximation of current data (there can be differences if in the moment of creating the update, the allocated hours or the timesheets were not the same as today)
20
+
21
+ ---XML records in module 'hr_timesheet'---
22
+ DEL ir.actions.act_window.view: hr_timesheet.timesheet_action_view_from_employee_list
23
+ NEW ir.actions.server: hr_timesheet.unlink_employee_action
24
+ NEW ir.model.access: hr_timesheet.access_hr_employee_delete_wizard
25
+ DEL ir.model.access: hr_timesheet.access_project_task
26
+ NEW ir.ui.view: hr_timesheet.hr_employee_delete_wizard_form
27
+ NEW ir.ui.view: hr_timesheet.portal_my_task_allocated_hours_template
28
+ NEW ir.ui.view: hr_timesheet.project_update_view_kanban_inherit
29
+ NEW ir.ui.view: hr_timesheet.view_employee_tree_inherit_timesheet
30
+ DEL ir.ui.view: hr_timesheet.portal_my_task_planned_hours_template
31
+ DEL ir.ui.view: hr_timesheet.project_sharing_inherit_project_task_view_tree
32
+ DEL ir.ui.view: hr_timesheet.project_sharing_project_task_view_search_inherit_timesheet
33
+ DEL ir.ui.view: hr_timesheet.rating_rating_view_search_project_inherited
34
+ DEL ir.ui.view: hr_timesheet.report_project_task_user_view_search
35
+ DEL ir.ui.view: hr_timesheet.report_project_task_user_view_tree
36
+ DEL ir.ui.view: hr_timesheet.view_task_search_form_hr_extended
37
+ # NOTHING TO DO: noupdate=0 records
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-openupgrade_scripts
3
- Version: 17.0.1.0.1.306
3
+ Version: 17.0.1.0.1.309
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo>=17.0a,<17.1dev
6
6
  Requires-Dist: openupgradelib
@@ -189,7 +189,9 @@ odoo/addons/openupgrade_scripts/scripts/hr_recruitment_survey/17.0.1.0/upgrade_a
189
189
  odoo/addons/openupgrade_scripts/scripts/hr_skills/17.0.1.0/upgrade_analysis.txt,sha256=06OqKTUamjUL1Ui7l6POXHoQKmy38FEO4mLZsGDbgHw,899
190
190
  odoo/addons/openupgrade_scripts/scripts/hr_skills_slides/17.0.1.0/upgrade_analysis.txt,sha256=oQB8tjhHAghJ25JskMaQEBVgDe2p4uz0qvWqX-QBuwQ,171
191
191
  odoo/addons/openupgrade_scripts/scripts/hr_skills_survey/17.0.1.0/upgrade_analysis.txt,sha256=3tgY89XspEDlIcKoxy6bnt4bJmvJt-UZwzcXVOyDTMM,715
192
+ odoo/addons/openupgrade_scripts/scripts/hr_timesheet/17.0.1.0/post-migration.py,sha256=d8dDwpPxodg05zkN886I1Kf2-LfNvUQbabLq-ZBiBP0,1187
192
193
  odoo/addons/openupgrade_scripts/scripts/hr_timesheet/17.0.1.0/upgrade_analysis.txt,sha256=crjTeU81FGUKyW8vZmuSCXLbrTLMQvmbefqqEqKQY-E,2057
194
+ odoo/addons/openupgrade_scripts/scripts/hr_timesheet/17.0.1.0/upgrade_analysis_work.txt,sha256=5lRHQ4yQeWfqDOV7YvssxOS5vE8qHye_jrbjBZnwTo8,2288
193
195
  odoo/addons/openupgrade_scripts/scripts/hr_timesheet_attendance/17.0.1.1/noupdate_changes.xml,sha256=Pn8knBBRt3Mo6t3lNpdm5ANlCoyzZuUcqvcX7v7OOLo,222
194
196
  odoo/addons/openupgrade_scripts/scripts/hr_timesheet_attendance/17.0.1.1/upgrade_analysis.txt,sha256=BuiW1HztzK7B4xdg5UVhWJFTSc2Ra5msHmDDNcjsYek,233
195
197
  odoo/addons/openupgrade_scripts/scripts/hr_work_entry/17.0.1.0/upgrade_analysis.txt,sha256=HjLcWFrP1MUO3f21UUH1ejUur7wQdp0u44OzKK29pq0,264
@@ -735,7 +737,7 @@ odoo/addons/openupgrade_scripts/scripts/website_twitter/17.0.1.0/upgrade_analysi
735
737
  odoo/addons/openupgrade_scripts/static/description/banner.png,sha256=KTIBu4gfxeZVw9zjs_fivTgFEOeaAorlBxajmCA1p6k,26859
736
738
  odoo/addons/openupgrade_scripts/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
737
739
  odoo/addons/openupgrade_scripts/static/description/index.html,sha256=iV41-zYBM4uvZPuunpcr7bQeRgBaojVsKo_gkeyJyA4,12639
738
- odoo_addon_openupgrade_scripts-17.0.1.0.1.306.dist-info/METADATA,sha256=mp2FooOEFjvi7M_uW84drmGeH7NjEt0wkr4H57sUxiU,3786
739
- odoo_addon_openupgrade_scripts-17.0.1.0.1.306.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
740
- odoo_addon_openupgrade_scripts-17.0.1.0.1.306.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
741
- odoo_addon_openupgrade_scripts-17.0.1.0.1.306.dist-info/RECORD,,
740
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.309.dist-info/METADATA,sha256=0rx8qmJsPOPLO8H2zINRIuLs36b7PusuRAk71X2Q5pU,3786
741
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.309.dist-info/WHEEL,sha256=9fEMia4zL7ZuZbnCOrcYogUhmn4XFIVaJ8G4YGI31xc,81
742
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.309.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
743
+ odoo_addon_openupgrade_scripts-17.0.1.0.1.309.dist-info/RECORD,,