Skip to content

Commit

Permalink
[IMP] project_timesheet_time_control: Refactor with mixin
Browse files Browse the repository at this point in the history
Models related to timesheet time controls now inherit from a mixin that adds most needed logic automatically.

This requires the changes introduced in OCA/project#596.
  • Loading branch information
yajo authored and carolinafernandez-tecnativa committed Sep 25, 2023
1 parent b67d186 commit 4cac372
Show file tree
Hide file tree
Showing 10 changed files with 151 additions and 191 deletions.
2 changes: 1 addition & 1 deletion crm_timesheet/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{
'name': "CRM Timesheet",
'category': 'Customer Relationship Management',
'version': '12.0.2.0.0',
'version': '12.0.2.1.0',
'depends': [
'crm',
'project_timesheet_time_control'
Expand Down
22 changes: 0 additions & 22 deletions crm_timesheet/i18n/crm_timesheet.pot
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,6 @@ msgstr ""
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
Expand All @@ -41,32 +36,15 @@ msgid "Project"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
Expand Down
22 changes: 0 additions & 22 deletions crm_timesheet/i18n/cs_CZ.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ msgstr "Analytická linka"
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
Expand All @@ -47,32 +42,15 @@ msgid "Project"
msgstr "Projekt"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
Expand Down
22 changes: 0 additions & 22 deletions crm_timesheet/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ msgstr "Kostenstellenbuchung"
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
Expand All @@ -44,32 +39,15 @@ msgid "Project"
msgstr "Projekt"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
Expand Down
35 changes: 7 additions & 28 deletions crm_timesheet/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-03 05:20+0000\n"
"PO-Revision-Date: 2018-03-03 05:20+0000\n"
"Last-Translator: enjolras <yo@miguelrevilla.com>, 2018\n"
"PO-Revision-Date: 2020-05-18 12:19+0000\n"
"Last-Translator: Josep M <jmyepes@mac.com>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
Expand All @@ -27,12 +28,7 @@ msgstr "Línea analítica"
#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_hr_timesheet_switch
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""
msgstr "Asistente para cambiar entre lineas de partes de horas"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
Expand All @@ -47,31 +43,14 @@ msgid "Project"
msgstr "Proyecto"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""
msgstr "Iniciar tarea"

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
Expand All @@ -81,7 +60,7 @@ msgstr ""
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
msgid "Stop work"
msgstr ""
msgstr "Detener tarea"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
Expand Down
22 changes: 0 additions & 22 deletions crm_timesheet/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ msgstr "Ligne analytique"
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
Expand All @@ -46,32 +41,15 @@ msgid "Project"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
Expand Down
22 changes: 0 additions & 22 deletions crm_timesheet/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ msgstr "Riga analitica"
msgid "Helper to quickly switch between timesheet lines"
msgstr ""

#. module: crm_timesheet
#: model:ir.model.fields,help:crm_timesheet.field_crm_lead__show_time_control
msgid "Indicate which time control button to show, if any."
msgstr ""

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
Expand All @@ -47,32 +42,15 @@ msgid "Project"
msgstr "Progetto"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__show_time_control
msgid "Show Time Control"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Start"
msgstr ""

#. module: crm_timesheet
#: code:addons/crm_timesheet/models/crm_lead.py:58
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
#, python-format
msgid "Start work"
msgstr ""

#. module: crm_timesheet
#: selection:crm.lead,show_time_control:0
msgid "Stop"
msgstr ""

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
Expand Down
66 changes: 66 additions & 0 deletions crm_timesheet/i18n/pt.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_timesheet
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-05-26 00:19+0000\n"
"Last-Translator: Pedro Castro Silva <[email protected]>\n"
"Language-Team: none\n"
"Language: pt\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_account_analytic_line
msgid "Analytic Line"
msgstr "Linha Analítica"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_hr_timesheet_switch
msgid "Helper to quickly switch between timesheet lines"
msgstr "Ajudante para alternar rapidamente entre linhas de folhas de horas"

#. module: crm_timesheet
#: model:ir.model,name:crm_timesheet.model_crm_lead
#: model:ir.model.fields,field_description:crm_timesheet.field_account_analytic_line__lead_id
#: model:ir.model.fields,field_description:crm_timesheet.field_hr_timesheet_switch__lead_id
msgid "Lead/Opportunity"
msgstr "Lead/Oportunidade"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__project_id
msgid "Project"
msgstr "Projeto"

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
msgid "Start work"
msgstr "Iniciar Trabalho"

#. module: crm_timesheet
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_kanban_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_tree_view_oppor
#: model_terms:ir.ui.view,arch_db:crm_timesheet.view_crm_lead_kanban
msgid "Stop work"
msgstr "Parar Trabalho"

#. module: crm_timesheet
#: model:ir.model.fields,field_description:crm_timesheet.field_crm_lead__timesheet_ids
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_leads
#: model_terms:ir.ui.view,arch_db:crm_timesheet.crm_case_form_view_oppor
msgid "Timesheet"
msgstr "Registo de horas"
Loading

0 comments on commit 4cac372

Please sign in to comment.