-
-
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
[FIX] [16.0] partner_industry_secondary: Add an option to display Child Industries first on it's name #1958
base: 16.0
Are you sure you want to change the base?
Conversation
abc6a21
to
aad9c44
Compare
…stries first on it's name
aad9c44
to
8219032
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.
display_last_child_first = fields.Boolean( | ||
string="Display Child Industries first", | ||
help="Set if you want to show the last child industries first " | ||
"when searching for industries.\nChild (Dad < Grampa < Ancestor)", |
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.
issue: this affects display, not search AFAICS. Besides, let's be a bit more formal here 😁
"when searching for industries.\nChild (Dad < Grampa < Ancestor)", | |
"when displaying industries.\nChild (Parent < Grandparent)", |
cat_name = f"{cat_name} ({' < '.join(parent_cats)})" | ||
result.append((cat.id, cat_name)) | ||
return result | ||
# Default display (Ancestor / Grandpa / Dad / Child) |
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.
suggestion: just for the sake of uniformity
# Default display (Ancestor / Grandpa / Dad / Child) | |
# Default display (Grandparent / Parent / Child) |
@@ -7,3 +7,4 @@ | |||
* Jordi Ballester Alomar <[email protected]> | |||
* Miquel Raïch <[email protected]> | |||
* Cristina Martin R. | |||
* Eduardo de Miguel `Moduon <https://www.moduon.team/>`_ |
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 think the official template suggest to put the company within parenthesis:
* Eduardo de Miguel `Moduon <https://www.moduon.team/>`_ | |
* Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__) |
if ( | ||
self.env["ir.config_parameter"] | ||
.sudo() | ||
.get_param("partner_industry_secondary.display_last_child_first") |
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.
thought: don't you believe the "children first" format would be a better default value?
cc @rafaelbn
Added an option to display Child Industries first on it's name.
closes #1954
MT-8595 @moduon @rafaelbn @simahawk @yajo please review if you want :)