Skip to content

Commit

Permalink
[FIX] project_timesheet_time_control: Avoid incompatibilities
Browse files Browse the repository at this point in the history
Some modules that add new fields dynamically, as analytic_tag_dimension, will cause an error when trying to read the fields to get them from cache. With this change we avoid that read and we make a copy of the analytic line if the wizard is opened from its and we create a new analytic line if don't.
  • Loading branch information
CarlosRoca13 committed Nov 3, 2022
1 parent 3475102 commit f1d6bdc
Show file tree
Hide file tree
Showing 10 changed files with 215 additions and 513 deletions.
7 changes: 4 additions & 3 deletions project_timesheet_time_control/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Project timesheet time control
:target: https://github.com/OCA/project/tree/15.0/project_timesheet_time_control
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control
:target: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/140/15.0
:alt: Try me on Runbot

|badge1| |badge2| |badge3| |badge4| |badge5|
|badge1| |badge2| |badge3| |badge4| |badge5|

Allow to track the exact moment when a timesheet line is started (not only
the day, but also the minute and second) and let users start and stop timers
Expand Down Expand Up @@ -137,6 +137,7 @@ Contributors
* Luis M. ontalba
* Ernesto Tejeda
* Jairo Llopis
* Carlos Roca

Maintainers
~~~~~~~~~~~
Expand All @@ -157,7 +158,7 @@ promote its widespread use.

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ernestotejeda|
|maintainer-ernestotejeda|

This module is part of the `OCA/project <https://github.com/OCA/project/tree/15.0/project_timesheet_time_control>`_ project on GitHub.

Expand Down
197 changes: 16 additions & 181 deletions project_timesheet_time_control/i18n/es.po

Large diffs are not rendered by default.

171 changes: 6 additions & 165 deletions project_timesheet_time_control/i18n/project_timesheet_time_control.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-10-05 14:28+0000\n"
"PO-Revision-Date: 2022-10-05 14:28+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
Expand All @@ -25,7 +27,7 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_switch_form
msgid ""
".\n"
" If you continue, it will be stopped with"
" If you continue, it will be stopped with"
msgstr ""

#. module: project_timesheet_time_control
Expand Down Expand Up @@ -53,26 +55,11 @@ msgid ""
" </span>"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__amount
msgid "Amount"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__account_id
msgid "Analytic Account"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model,name:project_timesheet_time_control.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__timesheet_invoice_type
msgid "Billable Type"
msgstr ""

#. module: project_timesheet_time_control
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_switch_form
msgid "Cancel"
Expand All @@ -86,33 +73,11 @@ msgid ""
"again."
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__product_uom_category_id
msgid "Category"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__is_task_closed
msgid "Closing Stage"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__code
msgid "Code"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__company_id
msgid "Company"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__product_uom_category_id
msgid ""
"Conversion between Units of Measure can only occur if they belong to the "
"same category. The conversion will be made based on the ratios."
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__create_uid
msgid "Created by"
Expand All @@ -124,45 +89,20 @@ msgid "Created on"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__currency_id
msgid "Currency"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__date
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.view_task_form2_inherited
msgid "Date"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__department_id
msgid "Department"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__name
msgid "Description"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_account_analytic_line__display_name
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__display_name
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_time_control_mixin__display_name
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_project__display_name
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_task__display_name
msgid "Display Name"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__employee_id
msgid "Employee"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__encoding_uom_id
msgid "Encoding Uom"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_account_analytic_line__date_time_end
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__date_time_end
Expand All @@ -181,65 +121,26 @@ msgstr ""
msgid "End work"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__general_account_id
msgid "Financial Account"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__group_id
msgid "Group"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model,name:project_timesheet_time_control.model_hr_timesheet_switch
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_account_analytic_line__id
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__id
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_time_control_mixin__id
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_project__id
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_task__id
msgid "ID"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_account_analytic_line__show_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__show_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_time_control_mixin__show_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_project_project__show_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_project_task__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__timesheet_invoice_id
msgid "Invoice"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__timesheet_invoice_id
msgid "Invoice created from the timesheet"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__is_so_line_edited
msgid "Is So Line Edited"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__move_id
msgid "Journal Item"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_account_analytic_line____last_update
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch____last_update
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_time_control_mixin____last_update
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_project____last_update
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_task____last_update
msgid "Last Modified on"
msgstr ""

Expand Down Expand Up @@ -267,13 +168,8 @@ msgid ""
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__non_allow_billable
msgid "Non-Billable"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__partner_id
msgid "Partner"
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__analytic_line_id
msgid "Origin line"
msgstr ""

#. module: project_timesheet_time_control
Expand All @@ -292,56 +188,28 @@ msgstr ""
msgid "Previous timer start"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__product_id
msgid "Product"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model,name:project_timesheet_time_control.model_project_project
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__project_id
msgid "Project"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__stock_task_id
msgid "Project Task"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__unit_amount
msgid "Quantity"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__ref
msgid "Ref."
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__account_analytic_line__show_time_control__resume
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__hr_timesheet_switch__show_time_control__resume
msgid "Resume"
msgstr ""

#. module: project_timesheet_time_control
#: code:addons/project_timesheet_time_control/models/account_analytic_line.py:0
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.account_analytic_line_tree
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_line_form
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.view_kanban_account_analytic_line
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.view_task_form2_inherited
#, python-format
msgid "Resume work"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__so_line
msgid "Sales Order Item"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_account_analytic_line__show_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__show_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_time_control_mixin__show_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_project__show_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_project_task__show_time_control
Expand Down Expand Up @@ -384,7 +252,6 @@ msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__account_analytic_line__show_time_control__stop
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__hr_timesheet_switch__show_time_control__stop
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__hr_timesheet_time_control_mixin__show_time_control__stop
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__project_project__show_time_control__stop
#: model:ir.model.fields.selection,name:project_timesheet_time_control.selection__project_task__show_time_control__stop
Expand All @@ -402,7 +269,6 @@ msgid "Stop that very old timer and start the new one"
msgstr ""

#. module: project_timesheet_time_control
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.account_analytic_line_tree
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_line_form
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.project_invoice_form
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.view_kanban_account_analytic_line
Expand All @@ -413,22 +279,12 @@ msgstr ""
msgid "Stop work"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__tag_ids
msgid "Tags"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model,name:project_timesheet_time_control.model_project_task
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__task_id
msgid "Task"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__is_task_closed
msgid "Tasks in this stage are considered as closed."
msgstr ""

#. module: project_timesheet_time_control
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_switch_form
msgid "That is a lot of time! Make sure it is fine before saving."
Expand All @@ -444,16 +300,6 @@ msgstr ""
msgid "This timer is running and will be stopped"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__product_uom_id
msgid "Unit of Measure"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,field_description:project_timesheet_time_control.field_hr_timesheet_switch__user_id
msgid "User"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__running_timer_duration
msgid "When the previous timer is stopped, it will save this duration."
Expand All @@ -464,11 +310,6 @@ msgstr ""
msgid "You have a running timer called"
msgstr ""

#. module: project_timesheet_time_control
#: model:ir.model.fields,help:project_timesheet_time_control.field_hr_timesheet_switch__non_allow_billable
msgid "Your timesheet will not be billed."
msgstr ""

#. module: project_timesheet_time_control
#: model_terms:ir.ui.view,arch_db:project_timesheet_time_control.hr_timesheet_switch_form
msgid "and started at"
Expand Down
1 change: 1 addition & 0 deletions project_timesheet_time_control/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
* Luis M. ontalba
* Ernesto Tejeda
* Jairo Llopis
* Carlos Roca
Loading

0 comments on commit f1d6bdc

Please sign in to comment.