Skip to content

Conversation

@wowerliu
Copy link

@wowerliu wowerliu commented Nov 3, 2018

No description provided.

dreispt and others added 16 commits November 3, 2018 14:39
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.
@oca-clabot
Copy link

Hey @wowerliu, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

  • mtbochaca (no github login found)
  • Druid Liu(刘震) (no github login found)
  • Katherine Zaoral (no github login found)

Appreciation of efforts,
OCA CLAbot

@pedrobaeza pedrobaeza added this to the 12.0 milestone Nov 3, 2018
@pedrobaeza
Copy link
Member

Please check Travis.

@OCA-git-bot OCA-git-bot mentioned this pull request Nov 3, 2018
32 tasks
Copy link

@elicoidal elicoidal left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution
some details + travis

Additional search fields can be configured at Settings > Technical > Database > Models,
using the "Name Search Fields" field.

.. figure:: https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image1.png

Choose a reason for hiding this comment

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

to be updated to v12

Additionally, an Administrator can configure other fields to also lookup into.
For example, Customers could be additionally searched by City or Phone number.

.. figure:: https://raw.githubusercontent.com/OCA/server-tools/11.0/base_name_search_improved/images/image2.png

Choose a reason for hiding this comment

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

update here too


def setUp(self):
super(NameSearchCase, self).setUp()
phone_field = self.env.ref('base.field_res_partner_phone')
Copy link
Member

Choose a reason for hiding this comment

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

Tests are failing because of this: the field XML Id changed to base.field_res_partner__phone

@levkar
Copy link

levkar commented Sep 21, 2019

This error raises when search yields no results:

  File "/home/odoo/src/user/base_name_search_improved/models/ir_model.py", line 22, in _extend_name_results
    if result_count < limit:
TypeError: '<' not supported between instances of 'int' and 'NoneType'

@mfhm95
Copy link

mfhm95 commented Nov 19, 2019

This error raises when search yields no results:

  File "/home/odoo/src/user/base_name_search_improved/models/ir_model.py", line 22, in _extend_name_results
    if result_count < limit:
TypeError: '<' not supported between instances of 'int' and 'NoneType'

how do you solve it ?


def _extend_name_results(self, domain, results, limit):
result_count = len(results)
if result_count < limit:
Copy link

Choose a reason for hiding this comment

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

Suggested change
if result_count < limit:
if not limit:
domain += [('id', 'not in', [x[0] for x in results])]
recs = self.search(domain)
results.extend(recs.name_get())
elif result_count < limit:

Copy link

Choose a reason for hiding this comment

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

This patch solves the typeerror

Copy link

@mfhm95 mfhm95 Nov 19, 2019

Choose a reason for hiding this comment

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

Thank you very much dear

Copy link
Contributor

@AaronHForgeFlow AaronHForgeFlow 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 fine.

@unique4
Copy link

unique4 commented May 17, 2020

I see all passed, could anyone merge this branch?

@pedrobaeza
Copy link
Member

It requires 2 approvals.

@conroyke56
Copy link

Any updates on this merge?

@dreispt
Copy link
Member

dreispt commented Aug 20, 2021

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-1419-by-dreispt-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Aug 20, 2021
Signed-off-by dreispt
@OCA-git-bot
Copy link
Contributor

@dreispt your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-1419-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.

@dreispt dreispt changed the title 12.0 mig base name search improved [12.0][MIG] base_name_search_improved Dec 4, 2021
@github-actions
Copy link

github-actions bot commented Aug 6, 2023

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 6, 2023
@dreispt
Copy link
Member

dreispt commented Aug 11, 2023

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

This PR looks fantastic, let's merge it!
Prepared branch 12.0-ocabot-merge-pr-1419-by-dreispt-bump-nobump, awaiting test results.

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

@dreispt your merge command was aborted due to failed check(s), which you can inspect on this commit of 12.0-ocabot-merge-pr-1419-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.

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Aug 13, 2023
@github-actions
Copy link

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 17, 2023
@github-actions github-actions bot closed this Jan 21, 2024
SiesslPhillip pushed a commit to grueneerde/OCA-server-tools that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/server-tools (15.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs fixing stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.