Skip to content

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

Merged
OCA-git-bot merged 74 commits into
OCA:17.0from
adhoc-dev:17.0-mig-base_name_search_improved
Sep 24, 2025
Merged

OCA-git-bot merged 74 commits into
OCA:17.0from
adhoc-dev:17.0-mig-base_name_search_improved

Conversation

@rov-adhoc

Copy link
Copy Markdown
Contributor

No description provided.

@thomaspaulb

Copy link
Copy Markdown
Contributor

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

@Bart-dh

Bart-dh commented May 29, 2024

Copy link
Copy Markdown

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

@rov-adhoc

Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
Contributor Author

@thomaspaulb Hey! thanks! Now it should be correct

Regards

Comment thread base_name_search_improved/hooks.py Outdated
@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
Comment thread base_name_search_improved/hooks.py Outdated
@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
Comment thread base_name_search_improved/hooks.py Outdated
@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
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Comment thread base_name_search_improved/README.rst Outdated
@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
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
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
@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
Copy Markdown
Contributor 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
Copy Markdown
Contributor Author

@StefanRijnhart HI! Just a friendly reminder 😊

@rov-adhoc

Copy link
Copy Markdown
Contributor Author

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

@hbrunn

hbrunn commented Nov 20, 2024

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 17.0-ocabot-merge-pr-2831-by-hbrunn-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Nov 20, 2024
Signed-off-by hbrunn
# TODO perhaps better to create only the field when enabled on the model
smart_search = fields.Char(
compute="_compute_smart_search", search="_search_smart_search", translate=False
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@rov-adhoc how did you try to implement @StefanRijnhart's suggestion? I'd expect it to work to override _setup_fields, check via sql if the model has the functionality enabled, and if so, add the field to self._fields.

Just setting translate to False can't work because it's not about the translations of data from the field, but about things like its label.

@OCA-git-bot

Copy link
Copy Markdown
Contributor

@hbrunn your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-2831-by-hbrunn-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

@dreispt

dreispt commented Mar 16, 2025

Copy link
Copy Markdown
Member

/ocabot migration base_name_search_improved
/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Mar 16, 2025
OCA-git-bot added a commit that referenced this pull request Mar 16, 2025
Signed-off-by dreispt
@OCA-git-bot OCA-git-bot mentioned this pull request Mar 16, 2025
39 tasks
@OCA-git-bot

Copy link
Copy Markdown
Contributor

@dreispt your merge command was aborted due to failed check(s), which you can inspect on this commit of 17.0-ocabot-merge-pr-2831-by-dreispt-bump-nobump.

After fixing the problem, you can re-issue a merge command. Please refrain from merging manually as it will most probably make the target branch red.

def patch_name_search():
@api.model
def _name_search(
self, name="", domain=None, operator="ilike", limit=100, order=None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The signature is incorrect, especially limit=100 gives incorrect results with domains like [("parent_id", "ilike", ...)])

@denris

denris commented Jul 21, 2025

Copy link
Copy Markdown

Just checking in if something is holding this back from being merged?

@thomaspaulb

Copy link
Copy Markdown
Contributor

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

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

@OCA-git-bot
OCA-git-bot merged commit b23d2df into OCA:17.0 Sep 24, 2025
2 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

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