-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
base: 14.0
Are you sure you want to change the base?
ADD: siren/siret fields are now displayed according to a boolean computed field #568
Conversation
Hi @alexis-via, |
8e1535d
to
3fe34b6
Compare
3fe34b6
to
f467862
Compare
l10n_fr_siret/models/res_partner.py
Outdated
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:
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 | |
) |
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. |
No description provided.