-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[14.0][ADD] New module web_custom_label #2801
base: 14.0
Are you sure you want to change the base?
Conversation
@OCA/web-maintainers : Here is the module presented in the last OCA Days regarding the customization of label, helper, placeholder... Thank you for your review. FYI : @majouda @ahmedtrigui |
@majouda some screenshots of the module and a standard description on the description of the PR would be great |
Hi @etobella , Thank you for your feedback. The description and screenshots of the module are located in the readme folder. Do you want us to add more details? cc @majouda @ahmedtrigui cc @TumbaoJu |
Here would be a great point for starting. It is great to include the information on the readme, but we should remember that contributors are doing this on their free time. We need to make it easy for them to review. Otherwise, we don't know if the module is interesting and people might ignore the PR. I am just trying to help you on this 😄 |
Hi @etobella Should we add a description here in the comments along with some screenshots? |
Yes, this way we all can see if it is intersting to us, otherwise, we need to dig in the module |
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.
please move the changes to web_custom_modifier
into a separate commit, or better a separate PR
from typing import List, Mapping | ||
|
||
|
||
def set_custom_labels_on_fields(labels: List[dict], fields: Mapping[str, dict]): |
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'd suggest to move all those functions into some abstract model, or move them into the base model with some prefix like _web_custom_label
- your current approach makes it more difficult than necessary to change the behavior of this module (ORM and type hints mix just fine)
return arch_with_custom_labels, name_manager | ||
|
||
|
||
def _add_custom_labels_to_view_arch(labels, arch): |
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.
same here, just some function is much harder to override than model functions
Hi @etobella in addition, not only the label can be customized, but the placeholder, a selction field and a help for a field can alos be edited. The module is userfriendly, the customer can make changes by himself. No technical skills are needed. Please find attached an exmple of edited field label. FYI @abenzbiria @TumbaoJu |
Done, thank you for your feedback. |
@OCA/website-maintainers : All checks have passed. Can you review it and merge if everything is ok. |
This module allows you to easily modify the labels of a field without
any development.
The module allows you to modify :
Exemple:
As a simple user of the system, I want to rename the label "Internal Reference" to "SKU".
I can easily use the custom labels menu to create a record that will do the job without any développement.