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 15, 2022
1 parent 4538b63 commit b06f3eb
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 493 deletions.
1 change: 1 addition & 0 deletions project_timesheet_time_control/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Contributors
* Luis M. ontalba
* Ernesto Tejeda
* Jairo Llopis
* Carlos Roca

Maintainers
~~~~~~~~~~~
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
9 changes: 5 additions & 4 deletions project_timesheet_time_control/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
<title>Project timesheet time control</title>
<style type="text/css">

Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="title">Project timesheet time control</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/project/tree/14.0/project_timesheet_time_control"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/140/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/project/tree/15.0/project_timesheet_time_control"><img alt="OCA/project" src="https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/140/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>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
easily.</p>
Expand Down Expand Up @@ -464,7 +464,7 @@ <h1><a class="toc-backref" href="#id4">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/project/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_timesheet_time_control%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/project/issues/new?body=module:%20project_timesheet_time_control%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -488,6 +488,7 @@ <h2><a class="toc-backref" href="#id7">Contributors</a></h2>
<li>Luis M. ontalba</li>
<li>Ernesto Tejeda</li>
<li>Jairo Llopis</li>
<li>Carlos Roca</li>
</ul>
</blockquote>
</li>
Expand All @@ -502,7 +503,7 @@ <h2><a class="toc-backref" href="#id8">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external" href="https://github.com/ernestotejeda"><img alt="ernestotejeda" src="https://github.com/ernestotejeda.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/14.0/project_timesheet_time_control">OCA/project</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/project/tree/15.0/project_timesheet_time_control">OCA/project</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
Loading

0 comments on commit b06f3eb

Please sign in to comment.