diff --git a/crm_timesheet/__manifest__.py b/crm_timesheet/__manifest__.py index 2517b276f..73883b730 100644 --- a/crm_timesheet/__manifest__.py +++ b/crm_timesheet/__manifest__.py @@ -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' diff --git a/crm_timesheet/i18n/crm_timesheet.pot b/crm_timesheet/i18n/crm_timesheet.pot index 6b5544d35..498b9bcca 100644 --- a/crm_timesheet/i18n/crm_timesheet.pot +++ b/crm_timesheet/i18n/crm_timesheet.pot @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/cs_CZ.po b/crm_timesheet/i18n/cs_CZ.po index 64ccde1e8..56053a5b0 100644 --- a/crm_timesheet/i18n/cs_CZ.po +++ b/crm_timesheet/i18n/cs_CZ.po @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/de.po b/crm_timesheet/i18n/de.po index ea108aff7..b5433c86a 100644 --- a/crm_timesheet/i18n/de.po +++ b/crm_timesheet/i18n/de.po @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/es.po b/crm_timesheet/i18n/es.po index adfc88903..43134ce8d 100644 --- a/crm_timesheet/i18n/es.po +++ b/crm_timesheet/i18n/es.po @@ -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 , 2018\n" +"PO-Revision-Date: 2020-05-18 12:19+0000\n" +"Last-Translator: Josep M \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 @@ -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 @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/fr.po b/crm_timesheet/i18n/fr.po index e512ae9da..e588f9329 100644 --- a/crm_timesheet/i18n/fr.po +++ b/crm_timesheet/i18n/fr.po @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/it.po b/crm_timesheet/i18n/it.po index c3e77d577..f98a57337 100644 --- a/crm_timesheet/i18n/it.po +++ b/crm_timesheet/i18n/it.po @@ -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 @@ -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 diff --git a/crm_timesheet/i18n/pt.po b/crm_timesheet/i18n/pt.po new file mode 100644 index 000000000..fa3838a5d --- /dev/null +++ b/crm_timesheet/i18n/pt.po @@ -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 \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" diff --git a/crm_timesheet/i18n/pt_BR.po b/crm_timesheet/i18n/pt_BR.po new file mode 100644 index 000000000..b0b3ceaa7 --- /dev/null +++ b/crm_timesheet/i18n/pt_BR.po @@ -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-07-27 16:01+0000\n" +"Last-Translator: Fernando Colus \n" +"Language-Team: none\n" +"Language: pt_BR\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 "Auxiliar para alternar rapidamente entre linhas da Planilha 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 "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 "Planilha de Horas" diff --git a/crm_timesheet/models/crm_lead.py b/crm_timesheet/models/crm_lead.py index 34f98027a..54d89cd1b 100644 --- a/crm_timesheet/models/crm_lead.py +++ b/crm_timesheet/models/crm_lead.py @@ -3,22 +3,17 @@ # Copyright 2017 David Vidal # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import _, api, fields, models -from odoo.exceptions import UserError +from odoo import api, fields, models class CrmLead(models.Model): - _inherit = 'crm.lead' + _name = 'crm.lead' + _inherit = ['crm.lead', "hr.timesheet.time_control.mixin"] project_id = fields.Many2one( comodel_name='project.project', string="Project", ) - show_time_control = fields.Selection( - selection=[("start", "Start"), ("stop", "Stop")], - compute="_compute_show_time_control", - help="Indicate which time control button to show, if any.", - ) timesheet_ids = fields.One2many( comodel_name='account.analytic.line', inverse_name='lead_id', @@ -26,52 +21,16 @@ class CrmLead(models.Model): ) @api.model - def _timesheet_running_domain(self): - """Domain to find running timesheet lines.""" - return self.env["account.analytic.line"]._running_domain() + [ - ("lead_id", "in", self.ids), - ] + def _relation_with_timesheet_line(self): + return "lead_id" @api.depends("timesheet_ids.employee_id", "timesheet_ids.unit_amount") def _compute_show_time_control(self): - """Decide which time control button to show, if any.""" - grouped = self.env["account.analytic.line"].read_group( - domain=self._timesheet_running_domain(), - fields=["id"], - groupby=["lead_id"], - ) - lines_per_lead = {group["lead_id"][0]: group["lead_id_count"] - for group in grouped} - button_per_lines = {0: "start", 1: "stop"} - for lead in self: - lead.show_time_control = button_per_lines.get( - lines_per_lead.get(lead.id, 0), - False, - ) + return super()._compute_show_time_control() def button_start_work(self): - """Create a new record starting now, with a running timer.""" - return { - "context": { - "default_project_id": self.project_id.id, - "default_lead_id": self.id, - }, - "name": _("Start work"), - "res_model": "hr.timesheet.switch", - "target": "new", - "type": "ir.actions.act_window", - "view_mode": "form", - "view_type": "form", - } - - @api.multi - def button_end_work(self): - running_lines = self.env["account.analytic.line"].search( - self._timesheet_running_domain(), - ) - if not running_lines: - raise UserError( - _("No running timer found in lead/opportunity %s. " - "Refresh the page and check again.") % self.display_name, - ) - return running_lines.button_end_work() + result = super().button_start_work() + result["context"].update({ + "default_project_id": self.project_id.id, + }) + return result