-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
[IMP] partner_(ref,vat)_unique: enable name search by the VAT Identification Number and Reference #1691
[IMP] partner_(ref,vat)_unique: enable name search by the VAT Identification Number and Reference #1691
Conversation
@luisg123v could you review, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comments left on OCA/project#1246
PR title:
|
2836ccc
to
c978f3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
03efe4c
to
6ec69cd
Compare
Hello @pedrobaeza @yajo Could you review, please? Regards. |
This PR has the |
Could you help me here too, please Tio? |
@api.model | ||
def _name_search(self, name="", args=None, operator="ilike", limit=100): | ||
"""Allow searching by ref by default.""" | ||
if name and operator in ["=", "ilike", "=ilike", "like", "=like"]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is faster:
if name and operator in ["=", "ilike", "=ilike", "like", "=like"]: | |
if name and operator in {"=", "ilike", "=ilike", "like", "=like"}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggested change applied.
The search functionality has been improved to include the Partner Reference. This enhancement is achieved by inheriting the _name_search method to include the Partner Reference in the search domain. Additionally, tests have been added for this new inheritance.
…n Number The search functionality has been improved to include the VAT Identification Number. This enhancement is achieved by inheriting the _name_search method to include the VAT Identification Number in the search domain. Additionally, tests have been added for this new inheritance.
Since the class SavepointCase has been merged into TransactionCase, it has been replaced in the module tests.
6ec69cd
to
e753209
Compare
/ocabot merge patch |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 4a69cb5. Thanks a lot for contributing to OCA. ❤️ |
The search functionality has been improved to include the VAT
Identification Number and Partner Reference. This enhancement
is achieved by inheriting the _name_search method to include
the VAT Identification Number and Partner Reference in the
search domain.
Additionally, tests have been added for this new inheritance.