Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][MIG] project_timesheet_time_control: Migration to version 16.0 #1148

Conversation

stefan-tecnativa
Copy link
Contributor

cc @Tecnativa TT43239

@Yadier-Tecnativa @CarlosRoca13 please review!

this PR superseeds #1133

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-project_timesheet_time_control branch from b7d4495 to 5eae638 Compare July 6, 2023 14:23
Copy link
Contributor

@Yadier-Tecnativa Yadier-Tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the code LGTM

@ygol
Copy link
Contributor

ygol commented Jul 8, 2023

getting error on runbot

  1. click on "Start work" in a task
  2. add a description
  3. click on "Start New Timer"
  4. getting following error
Traceback (most recent call last):
  File "/opt/odoo/odoo/http.py", line 1584, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/service/model.py", line 133, in retrying
    result = func()
  File "/opt/odoo/odoo/http.py", line 1611, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/http.py", line 1815, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/http.py", line 697, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/addons/web/controllers/dataset.py", line 48, in call_button
    return clean_action(action, env=request.env)
  File "/opt/odoo/addons/web/controllers/utils.py", line 35, in clean_action
    readable_fields = env[action['type']]._get_readable_fields()
  File "/opt/odoo/odoo/api.py", line 537, in __getitem__
    return self.registry[model_name](self, (), ())
  File "/opt/odoo/odoo/modules/registry.py", line 190, in __getitem__
    return self.models[model_name]
KeyError: 'ir.actions.act_multi'

The above server error caused the following client error:
RPC_ERROR: Odoo Server Error
    at makeErrorFromResponse (http://oca-project-16-0-pr1148-5eae6387e809.runboat.odoo-community.org/web/assets/627-1bdd447/web.assets_backend.min.js:985:163)
    at XMLHttpRequest.<anonymous> (http://oca-project-16-0-pr1148-5eae6387e809.runboat.odoo-community.org/web/assets/627-1bdd447/web.assets_backend.min.js:993:13)

@pedrobaeza
Copy link
Member

/ocabot migration project_timesheet_time_control

@stefan-tecnativa please remove the code that is doing reference to the removed dependencies, like the one with the action ir.actions.act_multi.

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Jul 10, 2023
@OCA-git-bot OCA-git-bot mentioned this pull request Jul 10, 2023
38 tasks
@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-project_timesheet_time_control branch from 5eae638 to b9010d2 Compare July 10, 2023 08:43
@stefan-tecnativa
Copy link
Contributor Author

I closed it by mistake 😅
@ygol corrected, you can try again now.

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-project_timesheet_time_control branch from b9010d2 to d0b5283 Compare July 10, 2023 10:39
@ygol
Copy link
Contributor

ygol commented Jul 10, 2023

I closed it by mistake sweat_smile @ygol corrected, you can try again now.

Not getting the error anymore.

Copy link
Contributor

@CarlosRoca13 CarlosRoca13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code and functional review 👍

Copy link

@DorianMAG DorianMAG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @stefan-tecnativa.
Thx for this work !
Tested on ruboat.
LGTM

@stefan-tecnativa stefan-tecnativa force-pushed the 16.0-mig-project_timesheet_time_control branch from d0b5283 to 3f9662a Compare July 21, 2023 05:47
@AntoniRomera
Copy link

@pedrobaeza Is this already correct?

sergio-teruel and others added 6 commits August 1, 2023 19:58
* Decorate methods correctly + README imp
* Add tests
* Add button on tasks
* Better README
* open/close behaviour
Update README
Adapt tests
Redefine the new kanban and form view of account.analytic.line
to add 'Close/Open task' button and 'Stop' button
We need to override standard onchange, as it resets the previously
introduced task.
ibuioli and others added 20 commits August 1, 2023 19:59
Currently translated at 100.0% (67 of 67 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/es_AR/
Currently translated at 88.0% (59 of 67 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/nl/
Currently translated at 95.5% (64 of 67 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/fr/
Currently translated at 14.9% (10 of 67 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/it/
Currently translated at 100.0% (76 of 76 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/es_AR/
Currently translated at 96.0% (73 of 76 strings)

Translation: project-14.0/project-14.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_timesheet_time_control/fi/
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.
Since v14, `string` attribute of <button> elements are directly shown in
the views as text instead of being a tooltip, and thus, it takes a lot
of space in screen.

And it was not the intended visualization when the modules was
conceived, just a side effect.

Thus, we restore what we expect, moving `string` to `title` for having
the tooltips again.

TT40169
Currently translated at 100.0% (49 of 49 strings)

Translation: project-15.0/project-15.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control/es_AR/
Currently translated at 100.0% (49 of 49 strings)

Translation: project-15.0/project-15.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control/es/
Error: AttributeError: type object 'expression' has no attribute AND
That way, we don't have an error coming from the previous version
Currently translated at 100.0% (49 of 49 strings)

Translation: project-15.0/project-15.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control/it/
Currently translated at 100.0% (49 of 49 strings)

Translation: project-15.0/project-15.0-project_timesheet_time_control
Translate-URL: https://translation.odoo-community.org/projects/project-15-0/project-15-0-project_timesheet_time_control/it/
Co-Authored-By: Stefan Ungureanu <stefan.ungureanu@tecnativa.com>
Co-Authored-By: Pedro M. Baeza <pedro.baeza@tecnativa.com>
@pedrobaeza pedrobaeza force-pushed the 16.0-mig-project_timesheet_time_control branch from 3f9662a to d11d992 Compare August 1, 2023 18:00
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 16.0-ocabot-merge-pr-1148-by-pedrobaeza-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Aug 1, 2023
Signed-off-by pedrobaeza
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 75ea46e. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.