forked from OCA/partner-contact
-
Notifications
You must be signed in to change notification settings - Fork 0
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] base_location: Migration to 18.0 #3
Open
Kimkhoi3010
wants to merge
460
commits into
18.0
Choose a base branch
from
18.0-mig-base_location
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently translated at 100.0% (16 of 16 strings) Translation: partner-contact-17.0/partner-contact-17.0-partner_firstname Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_firstname/it/
Steps to reproduce: - Install `hr` and `partner_firstname` - Go to Employees > any employee > action menu > Create User > Save - 💥 Traceback Suspected cause: in `defaul_get()`, the field `name` is not present in `fields_list` (probably because it's computed). So `result.get("name", "")` will always return `""` and `firstname` and `lastname` are not computed.
Currently translated at 100.0% (16 of 16 strings) Translation: partner-contact-17.0/partner-contact-17.0-partner_firstname Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_firstname/sv/
Previously, creating a non-company partner by passing the `name` field would trigger the `_inverse_name_after_cleaning_whitespace` method which, for values of `firstname` and `lastname` with multiple words, would result in most of those words being set to the `lastname` field, even if the correct values were explicitly passed to the `create` method. For example, duplicating a non-company partner with the following field values: firstname = Francisco Javier lastname = Garcia Cabeza De Vaca Would result in a partner with these values: firstname = Francisco lastname = Javier Garcia Cabeza De Vaca (copy) A similar issue can be reproduced when recalculating names: when explicitly calling `_compute_name`, the `_inverse_name_after_cleaning_whitespace` is called and the `firstname` and `lastname` fields are modified, if they contain more than one word. This commit solves the issue and prevents the `_inverse_name_after_cleaning_whitespace` from being called when creating a non-company partner while explicitly providing the `firstname` or `lastname` fields, and when recalculating names. In addition to the 16.0: Complying with E501 linting rule
…ication This PR ensures that when duplicating a partner, the '(copy)' suffix is added at the end of `lastname2` instead of `lastname`, in case the order from settings is `first_last`; otherwise, no action is needed.
Otherwise the following is raised > odoo.addons.partner_firstname.exceptions.EmptyNamesError: ("Error(s) with partner 1425's name.", 'No name is set.')
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-17.0/partner-contact-17.0-partner_firstname Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_firstname/
Currently translated at 100.0% (18 of 18 strings) Translation: partner-contact-17.0/partner-contact-17.0-partner_firstname Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_firstname/it/
Currently translated at 100.0% (18 of 18 strings) Translation: partner-contact-17.0/partner-contact-17.0-partner_firstname Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-partner_firstname/ca/
chaule97
reviewed
Oct 15, 2024
base_location/models/res_partner.py
Outdated
|
||
from lxml import etree | ||
|
||
from odoo import _, api, fields, models |
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
from odoo import _, api, fields, models | |
from odoo import api, fields, models |
Kimkhoi3010
force-pushed
the
18.0-mig-base_location
branch
from
October 15, 2024 03:45
792d794
to
e830ff9
Compare
[UPD] Update partner_pricelist_search.pot [UPD] README.rst Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-14.0/partner-contact-14.0-partner_pricelist_search Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-partner_pricelist_search/
partner_pricelist_search 14.0.1.0.1 [IMP] update dotfiles [ci skip]
…uments [UPD] Update partner_pricelist_search.pot partner_pricelist_search 14.0.1.0.2
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-14.0/partner-contact-14.0-partner_pricelist_search Translate-URL: https://translation.odoo-community.org/projects/partner-contact-14-0/partner-contact-14-0-partner_pricelist_search/
Currently translated at 97.2% (35 of 36 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/
Currently translated at 57.1% (20 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/fr/
Currently translated at 82.8% (29 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/it/
Currently translated at 60.0% (21 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/hr/
Currently translated at 82.8% (29 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/it/
Currently translated at 48.5% (17 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/sl/
Currently translated at 100.0% (35 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/fr/
Currently translated at 68.5% (24 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/hr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/
Currently translated at 100.0% (35 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/pt_BR/
Currently translated at 100.0% (35 of 35 strings) Translation: partner-contact-16.0/partner-contact-16.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-16-0/partner-contact-16-0-base_location/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: partner-contact-17.0/partner-contact-17.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-base_location/
Currently translated at 100.0% (35 of 35 strings) Translation: partner-contact-17.0/partner-contact-17.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-base_location/sv/
Currently translated at 100.0% (35 of 35 strings) Translation: partner-contact-17.0/partner-contact-17.0-base_location Translate-URL: https://translation.odoo-community.org/projects/partner-contact-17-0/partner-contact-17-0-base_location/ca/
… the zip_id field to _address_fields() TT33047
Kimkhoi3010
force-pushed
the
18.0-mig-base_location
branch
from
October 29, 2024 03:12
5e1f1ee
to
d964b09
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.