-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
ADD: siren/siret fields are now displayed according to a boolean computed field #568
Open
damdam-s
wants to merge
2
commits into
OCA:14.0
Choose a base branch
from
damdam-s:l10n_fr_siret_display_fields_on_partner
base: 14.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.
Open
ADD: siren/siret fields are now displayed according to a boolean computed field #568
damdam-s
wants to merge
2
commits into
OCA:14.0
from
damdam-s:l10n_fr_siret_display_fields_on_partner
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
Hi @alexis-via, |
damdam-s
force-pushed
the
l10n_fr_siret_display_fields_on_partner
branch
2 times, most recently
from
September 25, 2024 13:40
8e1535d
to
3fe34b6
Compare
damdam-s
force-pushed
the
l10n_fr_siret_display_fields_on_partner
branch
from
September 25, 2024 13:48
3fe34b6
to
f467862
Compare
damdam-s
changed the title
ADD: siren/siret fields are not displayed according to a boolean computed field
ADD: siren/siret fields are now displayed according to a boolean computed field
Sep 25, 2024
petrus-v
reviewed
Sep 27, 2024
l10n_fr_siret/models/res_partner.py
Outdated
Comment on lines
144
to
150
countries_show_siret = self.env["res.country"].search( | ||
[("show_siret_fields", "=", True)] | ||
) | ||
for record in self: | ||
record.show_siret_fields = record.country_id in countries_show_siret and ( | ||
record.is_company or record.parent_is_company | ||
) |
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.
instead to search all countries to display siret, could we write something like this:
Suggested change
countries_show_siret = self.env["res.country"].search( | |
[("show_siret_fields", "=", True)] | |
) | |
for record in self: | |
record.show_siret_fields = record.country_id in countries_show_siret and ( | |
record.is_company or record.parent_is_company | |
) | |
for record in self: | |
record.show_siret_fields = record.country_id.show_siret_fields and ( | |
record.is_company or record.parent_is_company | |
) |
petrus-v
approved these changes
Sep 27, 2024
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.