- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 291
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
[18.0][MIG] res_company_code: Migration to 18.0 #752
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-13.0/multi-company-13.0-res_company_code Translate-URL: https://translation.odoo-community.org/projects/multi-company-13-0/multi-company-13-0-res_company_code/
Currently translated at 100.0% (5 of 5 strings) Translation: multi-company-13.0/multi-company-13.0-res_company_code Translate-URL: https://translation.odoo-community.org/projects/multi-company-13-0/multi-company-13-0-res_company_code/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-14.0/multi-company-14.0-res_company_code Translate-URL: https://translation.odoo-community.org/projects/multi-company-14-0/multi-company-14-0-res_company_code/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: multi-company-16.0/multi-company-16.0-res_company_code Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-res_company_code/
Currently translated at 100.0% (5 of 5 strings) Translation: multi-company-16.0/multi-company-16.0-res_company_code Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-res_company_code/it/
@api.model | ||
def name_search(self, name, args=None, operator="ilike", limit=100): | ||
args = args or [] | ||
domain = [] | ||
if name: | ||
domain = ["|", ("code", operator, name), ("name", operator, name)] | ||
company = self.search(domain + args, limit=limit) | ||
return company.name_get() | ||
return company._search_display_name() |
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.
_search_display_name
has a different signature in the main Odoo codebase. Just move the one-liner here instead?
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.
@amh-mw , Thank you for the suggestions! it's fixed can you rereview it?
17444ba
to
d11047b
Compare
if not company.code: | ||
company.complete_name = company.name | ||
else: | ||
company.complete_name = f"{company.code} - {company.name}" |
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.
I wonder if this couldn't become _compute_display_name instead and the complete_name field dropped entirely. Worth consideration, but perhaps outside the scope of this migration. LGTM.
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.
@amh-mw , Thank you for the suggestions! it's fixed can you rereview it?
d11047b
to
d2a7a84
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.
Code review only. LGTM.
Inside the test-requirements.txt file you should put the link to the PR involved with the next format, all in one line (Version >= 17): |
7d3ca64
to
03eedb4
Compare
@Christian-RB , |
@HeliconiaSolutions Check that the pre-commit is trying to edit the new file, maybe that's the reason |
03eedb4
to
4c0e8b0
Compare
4c0e8b0
to
fe3745d
Compare
@Christian-RB, I fixed the pre-commit issues and pushed my changes, but the pipeline is still failing in one case. Am I missing something? Could you guide me? Thank you in advance! |
Everything is perfect now, @HeliconiaSolutions! The runboat has been created, and tests are passing. The only failing test is due to the pending dependency itself. Once the dependency is merged, you should remove the [DONT MERGE] commit, rebase and everything should turn green. Thank you |
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.
Code review only. LGTM.
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.
LGTM
@legalsylvain, Can you please proceed with merging this PR? |
/ocabot migration res_company_code
no. waiting for #751 |
@legalsylvain , #751 has been merged. Could you take a look now? |
CI is red, because you should remove fe3745d now. thanks ! |
fe3745d
to
5943203
Compare
@legalsylvain, I've removed fe3745d, and the CI is green now. Please review. Thanks! |
This PR has the |
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at e3072cc. Thanks a lot for contributing to OCA. ❤️ |
Depends on: