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

[MIG] base name search improved to 16.0 #2477

Merged
merged 62 commits into from
Jun 7, 2023

Conversation

maq-adhoc
Copy link

No description provided.

dreispt and others added 30 commits November 29, 2022 08:46
Currently translated at 100.0% (2 of 2 strings)

Translation: server-tools-9.0/server-tools-9.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-9-0/server-tools-9-0-base_name_search_improved/ca/
- Descriptor: change __openerp__.py file to __manifest__.py also update module
  version from 9.0.1.0.0 to 11.0.1.0.0
- Update README using guideline
- Views: replace view tag openerp to odoo and rename files to match guideline
- Models

  - update imports from openerp to odoo
  - remove enconding line # -*- coding: utf-8 -*-
  - update to make it compatible
  - remove use of SUPERUSER_ID use sudo instead.
  - rename class name to make it match with guideline.
  - update methods to match api used in version 11.0
  - fix pylint errors
  - replace use of non exist self._model with self._name
  - use `Model `is not None instead of if `Model` this becuase the last one is
    a empty recordset and this one was evaluate to False and never was
    patching the method.

- apply changes resquested/suggested in the PR by the reviewers.
Updated by Update PO files to match POT (msgmerge) hook in Weblate.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-14.0/server-tools-14.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_name_search_improved/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-14.0/server-tools-14.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_name_search_improved/
OCA-git-bot and others added 3 commits November 29, 2022 08:46
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-14.0/server-tools-14.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-base_name_search_improved/
@maq-adhoc maq-adhoc force-pushed the 16.0-mig-base_name_search_improved branch 4 times, most recently from 21f7996 to 11e7133 Compare November 29, 2022 13:52
Copy link
Contributor

@jjscarafia jjscarafia left a comment

Choose a reason for hiding this comment

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

LGTM.
Tested on runboat, working properly

@maq-adhoc maq-adhoc force-pushed the 16.0-mig-base_name_search_improved branch from 11e7133 to be034aa Compare November 30, 2022 18:43
@kikopeiro
Copy link
Contributor

I have detected problems when uninstalling the module. The error obtained is the following

Traceback (most recent call last):
  File "/opt/odoo/odoo-base/odoo-server/odoo/http.py", line 1584, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo-base/odoo-server/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/opt/odoo/odoo-base/odoo-server/odoo/http.py", line 1613, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo-base/odoo-server/odoo/http.py", line 1810, in dispatch
    result = self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo-base/odoo-server/odoo/addons/base/models/ir_http.py", line 149, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo-base/odoo-server/odoo/http.py", line 699, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/odoo-base/odoo-server/addons/web/controllers/dataset.py", line 46, in call_button
    action = self._call_kw(model, method, args, kwargs)
  File "/opt/odoo/odoo-base/odoo-server/addons/web/controllers/dataset.py", line 33, in _call_kw
    return call_kw(request.env[model], method, args, kwargs)
  File "/opt/odoo/odoo-base/odoo-server/odoo/api.py", line 461, in call_kw
    result = _call_kw_multi(method, model, args, kwargs)
  File "/opt/odoo/odoo-base/odoo-server/odoo/api.py", line 448, in _call_kw_multi
    result = method(recs, *args, **kwargs)
  File "/opt/odoo/odoo-base/odoo-server/odoo/addons/base/wizard/base_module_uninstall.py", line 59, in action_uninstall
    return modules.button_immediate_uninstall()
  File "<decorator-gen-81>", line 2, in button_immediate_uninstall
  File "/opt/odoo/odoo-base/odoo-server/odoo/addons/base/models/ir_module.py", line 76, in check_and_log
    return method(self, *args, **kwargs)
  File "/opt/odoo/odoo-base/odoo-server/odoo/addons/base/models/ir_module.py", line 640, in button_immediate_uninstall
    return self._button_immediate_function(type(self).button_uninstall)
  File "/opt/odoo/odoo-base/odoo-server/odoo/addons/base/models/ir_module.py", line 615, in _button_immediate_function
    registry = modules.registry.Registry.new(self._cr.dbname, update_module=True)
  File "<decorator-gen-14>", line 2, in new
  File "/opt/odoo/odoo-base/odoo-server/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/opt/odoo/odoo-base/odoo-server/odoo/modules/registry.py", line 90, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/opt/odoo/odoo-base/odoo-server/odoo/modules/loading.py", line 564, in load_modules
    getattr(py_module, uninstall_hook)(cr, registry)
  File "/opt/odoo/odoo-base/common-16.0/server-tools/base_name_search_improved/hooks.py", line 10, in uninstall_hook
    models.BaseModel._revert_method("fields_view_get")
  File "/opt/odoo/odoo-base/odoo-server/odoo/models.py", line 5031, in _revert_method
    method = getattr(cls, name)
AttributeError: type object 'BaseModel' has no attribute 'fields_view_get'

@maq-adhoc , could you review the problem?

@maq-adhoc maq-adhoc force-pushed the 16.0-mig-base_name_search_improved branch 2 times, most recently from 681c71b to 9d2b445 Compare March 15, 2023 12:04
@kikopeiro
Copy link
Contributor

Seems work fine! (without code review)

@RodrigoBM
Copy link
Contributor

PR MIG: #2412

@maq-adhoc maq-adhoc force-pushed the 16.0-mig-base_name_search_improved branch from 9d2b445 to 1d55e62 Compare May 11, 2023 13:19
Copy link

@chusamo chusamo left a comment

Choose a reason for hiding this comment

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

LGTM

@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). 🤖

@bguillot
Copy link
Contributor

bguillot commented Jun 7, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

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

@OCA-git-bot OCA-git-bot merged commit 64f282e into OCA:16.0 Jun 7, 2023
@OCA-git-bot
Copy link
Contributor

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