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] helpdesk_mgmt_timesheet: Migration 16.0 #483

Merged
merged 42 commits into from
Aug 3, 2023

Conversation

AntoniRomera
Copy link

@AntoniRomera AntoniRomera commented Jul 4, 2023

Depends on OCA/project#1148

dalonsod and others added 30 commits July 4, 2023 10:41
Currently translated at 100.0% (20 of 20 strings)

Translation: helpdesk-13.0/helpdesk-13.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-13-0/helpdesk-13-0-helpdesk_mgmt_timesheet/es/
Before this commit, in any view with ticket_id present but unused the onchange would be called and set project and task to False. It was found while trying to integrate project_timesheet_time_control with helpdesk_mgmt_timesheet, where this onchange overrides the results of default_get.

After this commit, if a helpdesk ticket is not present when calling onchange, project and task ids are not reset to False.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: helpdesk-13.0/helpdesk-13.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-13-0/helpdesk-13-0-helpdesk_mgmt_timesheet/
Currently translated at 95.0% (19 of 20 strings)

Translation: helpdesk-13.0/helpdesk-13.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-13-0/helpdesk-13-0-helpdesk_mgmt_timesheet/hu/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: helpdesk-13.0/helpdesk-13.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-13-0/helpdesk-13-0-helpdesk_mgmt_timesheet/
Currently translated at 100.0% (32 of 32 strings)

Translation: helpdesk-14.0/helpdesk-14.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-14-0/helpdesk-14-0-helpdesk_mgmt_timesheet/es_AR/
Currently translated at 100.0% (32 of 32 strings)

Translation: helpdesk-14.0/helpdesk-14.0-helpdesk_mgmt_timesheet
Translate-URL: https://translation.odoo-community.org/projects/helpdesk-14-0/helpdesk-14-0-helpdesk_mgmt_timesheet/pt_BR/
@AntoniRomera
Copy link
Author

@pedrobaeza New PR with all the funcionality

@manuelcalerosolis
Copy link

Trying to install the module gives me the following error:

odoo_1 | View error context:
odoo_1 | '-no context-'
odoo_1 |
odoo_1 | 2023-07-14 08:23:59,433 1 ERROR alfinf odoo.http: Exception during request handling.
odoo_1 | Traceback (most recent call last):
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1998, in call
odoo_1 | response = request._serve_db()
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1584, in _serve_db
odoo_1 | return service_model.retrying(self._serve_ir_http, self.env)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 133, in retrying
odoo_1 | result = func()
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1611, in _serve_ir_http
odoo_1 | response = self.dispatcher.dispatch(rule.endpoint, args)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1815, in dispatch
odoo_1 | result = self.request.registry['ir.http']._dispatch(endpoint)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
odoo_1 | result = endpoint(**request.params)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 697, in route_wrapper
odoo_1 | result = endpoint(self, *args, **params_ok)
odoo_1 | File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 46, in call_button
odoo_1 | action = self._call_kw(model, method, args, kwargs)
odoo_1 | File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 33, in _call_kw
odoo_1 | return call_kw(request.env[model], method, args, kwargs)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/api.py", line 461, in call_kw
odoo_1 | result = _call_kw_multi(method, model, args, kwargs)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/api.py", line 448, in _call_kw_multi
odoo_1 | result = method(recs, *args, **kwargs)
odoo_1 | File "", line 2, in button_immediate_install
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
odoo_1 | return method(self, *args, **kwargs)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 491, in button_immediate_install
odoo_1 | return self._button_immediate_function(type(self).button_install)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
odoo_1 | registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
odoo_1 | File "", line 2, in new
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/func.py", line 87, in locked
odoo_1 | return func(inst, *args, **kwargs)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 90, in new
odoo_1 | odoo.modules.load_modules(registry, force_demo, status, update_module)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 488, in load_modules
odoo_1 | processed_modules += load_marked_modules(cr, graph,
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 372, in load_marked_modules
odoo_1 | loaded, processed = load_module_graph(
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 231, in load_module_graph
odoo_1 | load_data(cr, idref, mode, kind='data', package=package)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 71, in load_data
odoo_1 | tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 763, in convert_file
odoo_1 | convert_xml_import(cr, module, fp, idref, mode, noupdate)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 829, in convert_xml_import
odoo_1 | obj.parse(doc.getroot())
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 749, in parse
odoo_1 | self._tag_root(de)
odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 709, in _tag_root
odoo_1 | raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback
odoo_1 | odoo.tools.convert.ParseError: while parsing /opt/odoo/auto/addons/helpdesk_mgmt_timesheet/views/helpdesk_ticket_view.xml:33
odoo_1 | Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition
odoo_1 |
odoo_1 | View error context:
odoo_1 | '-no context-'

@AntoniRomera AntoniRomera force-pushed the 16.0-mig-helpdesk_mgmt_timesheet branch 2 times, most recently from 1330f75 to cf9fe09 Compare July 14, 2023 13:05
@AntoniRomera
Copy link
Author

Trying to install the module gives me the following error:

odoo_1 | View error context: odoo_1 | '-no context-' odoo_1 | odoo_1 | 2023-07-14 08:23:59,433 1 ERROR alfinf odoo.http: Exception during request handling. odoo_1 | Traceback (most recent call last): odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1998, in call odoo_1 | response = request._serve_db() odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1584, in _serve_db odoo_1 | return service_model.retrying(self._serve_ir_http, self.env) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/service/model.py", line 133, in retrying odoo_1 | result = func() odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1611, in _serve_ir_http odoo_1 | response = self.dispatcher.dispatch(rule.endpoint, args) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 1815, in dispatch odoo_1 | result = self.request.registry['ir.http']._dispatch(endpoint) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch odoo_1 | result = endpoint(**request.params) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/http.py", line 697, in route_wrapper odoo_1 | result = endpoint(self, *args, **params_ok) odoo_1 | File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 46, in call_button odoo_1 | action = self._call_kw(model, method, args, kwargs) odoo_1 | File "/opt/odoo/auto/addons/web/controllers/dataset.py", line 33, in _call_kw odoo_1 | return call_kw(request.env[model], method, args, kwargs) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/api.py", line 461, in call_kw odoo_1 | result = _call_kw_multi(method, model, args, kwargs) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/api.py", line 448, in _call_kw_multi odoo_1 | result = method(recs, *args, **kwargs) odoo_1 | File "", line 2, in button_immediate_install odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 76, in check_and_log odoo_1 | return method(self, *args, **kwargs) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 491, in button_immediate_install odoo_1 | return self._button_immediate_function(type(self).button_install) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function odoo_1 | registry = modules.registry.Registry.new(self._cr.dbname, update_module=True) odoo_1 | File "", line 2, in new odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/func.py", line 87, in locked odoo_1 | return func(inst, *args, **kwargs) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/registry.py", line 90, in new odoo_1 | odoo.modules.load_modules(registry, force_demo, status, update_module) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 488, in load_modules odoo_1 | processed_modules += load_marked_modules(cr, graph, odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 372, in load_marked_modules odoo_1 | loaded, processed = load_module_graph( odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 231, in load_module_graph odoo_1 | load_data(cr, idref, mode, kind='data', package=package) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/modules/loading.py", line 71, in load_data odoo_1 | tools.convert_file(cr, package.name, filename, idref, mode, noupdate, kind) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 763, in convert_file odoo_1 | convert_xml_import(cr, module, fp, idref, mode, noupdate) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 829, in convert_xml_import odoo_1 | obj.parse(doc.getroot()) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 749, in parse odoo_1 | self._tag_root(de) odoo_1 | File "/opt/odoo/custom/src/odoo/odoo/tools/convert.py", line 709, in _tag_root odoo_1 | raise ParseError(msg) from None # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback odoo_1 | odoo.tools.convert.ParseError: while parsing /opt/odoo/auto/addons/helpdesk_mgmt_timesheet/views/helpdesk_ticket_view.xml:33 odoo_1 | Inherited view cannot have 'Groups' define on the record. Use 'groups' attributes inside the view definition odoo_1 | odoo_1 | View error context: odoo_1 | '-no context-'

Corrected, I'm sorry, I was waiting for the dependency to be ready, I was missing a local commit.

@manuelcalerosolis
Copy link

@AntoniRomera functional review ok!

Copy link

@manuelcalerosolis manuelcalerosolis left a comment

Choose a reason for hiding this comment

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

Functional review ok

@AntoniRomera AntoniRomera force-pushed the 16.0-mig-helpdesk_mgmt_timesheet branch 6 times, most recently from afd6b02 to 2ee2806 Compare August 2, 2023 09:05
@AntoniRomera AntoniRomera force-pushed the 16.0-mig-helpdesk_mgmt_timesheet branch from 2ee2806 to 666969c Compare August 2, 2023 09:20
@AntoniRomera
Copy link
Author

AntoniRomera commented Aug 2, 2023

@manuelcalerosolis Can you make another functional revision? The migration of the "project_timesheet_time_control" has changed the wizard.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@pedrobaeza
Copy link
Member

/ocabot migration helpdesk_mgmt_timesheet
/ocabot merge nobump

@OCA-git-bot OCA-git-bot added this to the 16.0 milestone Aug 3, 2023
@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 16.0-ocabot-merge-pr-483-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot mentioned this pull request Jun 7, 2023
7 tasks
@OCA-git-bot OCA-git-bot merged commit 30f8853 into OCA:16.0 Aug 3, 2023
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 2ae50eb. 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.