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

[17.0][MIG] base_name_search_improved: Migration to 17.0 #2831

Open
wants to merge 74 commits into
base: 17.0
Choose a base branch
from

Conversation

rov-adhoc
Copy link

No description provided.

@thomaspaulb
Copy link
Contributor

Same comment as in #2833: any idea why _search_smart_search doesn't seem to receive coverage?

@Bart-dh
Copy link

Bart-dh commented May 29, 2024

Hi! I was wondering - is there still ongoing work on this? Does it work functionally?

@rov-adhoc
Copy link
Author

@thomaspaulb Hey! I really I don't know how to solve the problem of coverage because it is working fine in my computer

@thomaspaulb
Copy link
Contributor

@thomaspaulb Hey! I really I don't know how to solve the problem of coverage because it is working fine in my computer

https://en.wikipedia.org/wiki/Code_coverage

@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch 2 times, most recently from cb2c6b5 to bd3b119 Compare May 30, 2024 15:08
@rov-adhoc
Copy link
Author

@thomaspaulb Hey! thanks! Now it should be correct

Regards

@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from bd3b119 to dc1e352 Compare July 2, 2024 11:28
@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from dc1e352 to 2f4c3cc Compare July 3, 2024 17:12
@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from 2f4c3cc to a91048f Compare July 4, 2024 10:43
@StefanRijnhart
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

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

OCA-git-bot added a commit that referenced this pull request Jul 4, 2024
Signed-off-by StefanRijnhart
@OCA-git-bot
Copy link
Contributor

@StefanRijnhart The merge process could not be finalized, because command oca-gen-addon-readme --if-source-changed --org-name OCA --repo-name server-tools --branch 17.0 --addons-dir /tmp/tmp5uc11ybe --commit failed with output:

/tmp/tmp5uc11ybe/base_name_search_improved/README.rst:87: (ERROR/3) Duplicate substitution definition name: "image1".
Traceback (most recent call last):
  File "/usr/local/bin/oca-gen-addon-readme", line 11, in <module>
    load_entry_point('oca-maintainers-tools', 'console_scripts', 'oca-gen-addon-readme')()
  File "/ocamt/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/ocamt/lib/python3.8/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/ocamt/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/ocamt/lib/python3.8/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/ocamt/src/oca-maintainers-tools/tools/gen_addon_readme.py", line 575, in gen_addon_readme
    check_rst(readme_filename)
  File "/ocamt/src/oca-maintainers-tools/tools/gen_addon_readme.py", line 398, in check_rst
    publish_file(
  File "/ocamt/lib/python3.8/site-packages/docutils/core.py", line 422, in publish_file
    output, publisher = publish_programmatically(
  File "/ocamt/lib/python3.8/site-packages/docutils/core.py", line 722, in publish_programmatically
    output = publisher.publish(enable_exit_status=enable_exit_status)
  File "/ocamt/lib/python3.8/site-packages/docutils/core.py", line 234, in publish
    self.document = self.reader.read(self.source, self.parser,
  File "/ocamt/lib/python3.8/site-packages/docutils/readers/__init__.py", line 70, in read
    self.parse()
  File "/ocamt/lib/python3.8/site-packages/docutils/readers/__init__.py", line 76, in parse
    self.parser.parse(self.input, document)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/__init__.py", line 184, in parse
    self.statemachine.run(inputlines, document, inliner=self.inliner)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 169, in run
    results = StateMachineWS.run(self, input_lines, input_offset,
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 3024, in text
    self.section(title.lstrip(), source, style, lineno + 1, messages)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 325, in section
    self.new_subsection(title, lineno, messages)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection
    newabsoffset = self.nested_parse(
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
    state_machine.run(block, input_offset, memo=self.memo,
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2785, in underline
    self.section(title, source, style, lineno - 1, messages)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 325, in section
    self.new_subsection(title, lineno, messages)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 391, in new_subsection
    newabsoffset = self.nested_parse(
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 279, in nested_parse
    state_machine.run(block, input_offset, memo=self.memo,
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 195, in run
    results = StateMachineWS.run(self, input_lines, input_offset)
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 233, in run
    context, next_state, result = self.check_line(
  File "/ocamt/lib/python3.8/site-packages/docutils/statemachine.py", line 445, in check_line
    return method(match, context, next_state)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2355, in explicit_markup
    nodelist, blank_finish = self.explicit_construct(match)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2367, in explicit_construct
    return method(self, expmatch)
  File "/ocamt/lib/python3.8/site-packages/docutils/parsers/rst/states.py", line 2085, in substitution_def
    self.document.note_substitution_def(
  File "/ocamt/lib/python3.8/site-packages/docutils/nodes.py", line 1550, in note_substitution_def
    msg = self.reporter.error(
  File "/ocamt/lib/python3.8/site-packages/docutils/utils/__init__.py", line 231, in error
    return self.system_message(self.ERROR_LEVEL, *args, **kwargs)
  File "/ocamt/lib/python3.8/site-packages/docutils/utils/__init__.py", line 197, in system_message
    raise SystemMessage(msg, level)
docutils.utils.SystemMessage: /tmp/tmp5uc11ybe/base_name_search_improved/README.rst:87: (ERROR/3) Duplicate substitution definition name: "image1".

@StefanRijnhart
Copy link
Member

Huh, looks like the README compilation is struggling with three images in two snippets. Can you play around to see if you can get it to work?

@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from a91048f to 6e1e404 Compare July 4, 2024 15:46

.. |image1| image:: https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image1.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image1.png
Copy link
Member

@StefanRijnhart StefanRijnhart Jul 5, 2024

Choose a reason for hiding this comment

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

This almost works, but this change the README.rst is overwritten when the README.rst is generated using oca-gen-addon-readme from https://github.com/OCA/maintainer-tools. You can install this tool locally in your python env and run it using ca-gen-addon-readme --repo-name server-tools --branch 17.- --addon-dir . if you change into the module directory on your setup.

You need to make the change in the files in readme.

--- a/base_name_search_improved/readme/CONFIGURE.md
+++ b/base_name_search_improved/readme/CONFIGURE.md
@@ -5,4 +5,4 @@ the top right search box, is not affected.
 Additional search fields can be configured at Settings \> Technical \>
 Database \> Models, using the "Name Search Fields" field.
 
-![](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image1.png)
+![image1](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image1.png)
diff --git a/base_name_search_improved/readme/DESCRIPTION.md b/base_name_search_improved/readme/DESCRIPTION.md
index 88b7ee5448..e117da5604 100644
--- a/base_name_search_improved/readme/DESCRIPTION.md
+++ b/base_name_search_improved/readme/DESCRIPTION.md
@@ -10,13 +10,13 @@ relaxed search also looks up for records containing all the words, so
 "John M. Brown" would be a match. It also tolerates words in a different
 order, so searching for "brown john" also works.
 
-![](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image0.png)
+![image0](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image0.png)
 
 Additionally, an Administrator can configure other fields to also lookup
 into. For example, Customers could be additionally searched by City or
 Phone number.
 
-![](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image2.png)
+![image2](https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image2.png)
 
 How it works:
 

@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from 6e1e404 to bbbaff8 Compare July 10, 2024 12:10
@StefanRijnhart
Copy link
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 17.0-ocabot-merge-pr-2831-by-StefanRijnhart-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Jul 10, 2024
Signed-off-by StefanRijnhart
oca-transbot and others added 26 commits October 23, 2024 11:43
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/
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/
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/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-16.0/server-tools-16.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_name_search_improved/
Currently translated at 100.0% (25 of 25 strings)

Translation: server-tools-16.0/server-tools-16.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_name_search_improved/es/
Currently translated at 36.0% (9 of 25 strings)

Translation: server-tools-16.0/server-tools-16.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_name_search_improved/it/
Currently translated at 36.0% (9 of 25 strings)

Translation: server-tools-16.0/server-tools-16.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_name_search_improved/it/
Currently translated at 100.0% (25 of 25 strings)

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

Translation: server-tools-16.0/server-tools-16.0-base_name_search_improved
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-base_name_search_improved/
When applying monkey patches, we want to skip abstract models because patching
those may mess up the inheritance. An example of this is ir.model which is
assigned the studio mixin using inherit = ['studio.mixin', 'ir.model'].
If the mixin itself is patched, and the method is overridden once again (in,
say, enterprise 15's documents_spreadsheet), the super() method called in that
override is the patched version of studio.mixin rather than the override of
ir.model in the base module, which is now skipped entirely.
@rov-adhoc rov-adhoc force-pushed the 17.0-mig-base_name_search_improved branch from 441e0e2 to f1b908b Compare October 23, 2024 14:46
@rov-adhoc
Copy link
Author

@StefanRijnhart Hey please disregard my previous message. I've tried to implement what you requested, but it didn't work properly. I added the translation in the smart_search field to false. I hope this solves the merge problem.

@rov-adhoc
Copy link
Author

@StefanRijnhart HI! Just a friendly reminder 😊

@rov-adhoc
Copy link
Author

@StefanRijnhart Hi! I would like to ask you if you can check if its now ok
regards

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.