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
[IMP] mail, hr: avatar card preview #121943
Closed
Closed
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
juliusc2066
force-pushed
the
master-avatar-card-preview-juca
branch
from
May 22, 2023 13:26
645093c
to
57d1769
Compare
juliusc2066
force-pushed
the
master-avatar-card-preview-juca
branch
7 times, most recently
from
May 26, 2023 14:40
652f5be
to
824b5f7
Compare
juliusc2066
force-pushed
the
master-avatar-card-preview-juca
branch
5 times, most recently
from
July 4, 2023 08:37
642bdf4
to
b71dd5c
Compare
juliusc2066
force-pushed
the
master-avatar-card-preview-juca
branch
from
July 18, 2023 08:05
b71dd5c
to
89ad506
Compare
C3POdoo
requested review from
a team,
FrancoisGe and
kebeclibre
and removed request for
a team
July 18, 2023 08:07
addons/web/static/src/views/fields/many2one_avatar/many2one_avatar_field.xml
Outdated
Show resolved
Hide resolved
juliusc2066
force-pushed
the
master-avatar-card-preview-juca
branch
from
July 19, 2023 08:52
89ad506
to
afb4164
Compare
robodoo r+ |
hugocarlier
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Nov 7, 2023
Impacted modules: - resource - hr - hr_skills - hr_holidays - hr_homeworking This commits introduces avatar card preview for resource.resource and hr.employee(.public) records in a similar way to what has been done in mail for res.users records (see odoo#121943 and odoo#131355). resource.resource ================= The following field components are created to display the popover card when clicking on the avatar of the resource.resource record: - widget many2one_avatar_resource (based on many2one_avatar_user) - widget many2many_avatar_resource (based on many2many_avatar_user) The behavior implemented when clicking on a resource.resource record's avatar is the following: - If the resource is human, a popover card is displayed. A "Send Message" button is displayed on the card if a user is associated to the record. - If the resource is material, no popover card is displayed. nb: this behavior is modified in planning The design of the popover card is for resource.resource records is similar to the one initially implemented for res.users records. The choice is made to override existing widget/components instead of patching them as field dependencies need to be added for resource.resource records to distinguish material from human resources (and have the necessary information to determine if the popover card has to be displayed for material resources). Note: It is currently not possible to add _relatedFields_ option to M2O fields due to framework restriction that could evolve in Odoo 18. The behavior of the many2one_avatar_resource widget therefore exhibits the following limitations: - related field 'resource_type' that need to be fetched to determine if an avatar is displayed or not needs to be added to the model whose views will use this widget. - a popover card is displayed even if the human resource has no user linked to it. For the same reason, a related field user_id should be added to other models which is not really desirable and could lead to confusion. This should be refactored when a support of the _relatedFields_ option is added for M2O fields. hr.employee =========== The following widgets are patched to display the popover card when clicking on the avatar of the hr.employee record: - many2many_avatar_user - many2one_avatar_user The card displayed uses the same template as the one used for resource.resource records. task-3457031
hugocarlier
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Nov 15, 2023
Impacted modules: - resource - hr - hr_skills - hr_holidays - hr_homeworking This commits introduces avatar card preview for resource.resource and hr.employee(.public) records in a similar way to what has been done in mail for res.users records (see odoo#121943 and odoo#131355). resource.resource ================= The following field components are created to display the popover card when clicking on the avatar of the resource.resource record: - widget many2one_avatar_resource (based on many2one_avatar_user) - widget many2many_avatar_resource (based on many2many_avatar_user) The behavior implemented when clicking on a resource.resource record's avatar is the following: - If the resource is human, a popover card is displayed. A "Send Message" button is displayed on the card if a user is associated to the record. - If the resource is material, no popover card is displayed. nb: this behavior is modified in planning The design of the popover card is for resource.resource records is similar to the one initially implemented for res.users records. The choice is made to override existing widget/components instead of patching them as field dependencies need to be added for resource.resource records to distinguish material from human resources (and have the necessary information to determine if the popover card has to be displayed for material resources). Note: It is currently not possible to add _relatedFields_ option to M2O fields due to framework restriction that could evolve in Odoo 18. The behavior of the many2one_avatar_resource widget therefore exhibits the following limitations: - related field 'resource_type' that need to be fetched to determine if an avatar is displayed or not needs to be added to the model whose views will use this widget. - a popover card is displayed even if the human resource has no user linked to it. For the same reason, a related field user_id should be added to other models which is not really desirable and could lead to confusion. This should be refactored when a support of the _relatedFields_ option is added for M2O fields. hr.employee =========== The following widgets are patched to display the popover card when clicking on the avatar of the hr.employee record: - many2many_avatar_user - many2one_avatar_user The card displayed uses the same template as the one used for resource.resource records. task-3457031
hugocarlier
pushed a commit
to odoo-dev/odoo
that referenced
this pull request
Dec 1, 2023
Impacted modules: - hr - hr_skills - hr_holidays - hr_homeworking - resource_mail (new module) This commits introduces avatar card preview for resource.resource and hr.employee(.public) records in a similar way to what has been done in mail for res.users records (see odoo#121943 and odoo#131355). resource.resource ================= The following field components are created to display the popover card when clicking on the avatar of the resource.resource record: - widget many2one_avatar_resource (based on many2one_avatar_user) - widget many2many_avatar_resource (based on many2many_avatar_user) The behavior implemented when clicking on a resource.resource record's avatar is the following: - If the resource is human, a popover card is displayed. A "Send Message" button is displayed on the card if a user is associated to the record. - If the resource is material, no popover card is displayed. nb: this behavior is modified in planning The design of the popover card is for resource.resource records is similar to the one initially implemented for res.users records. The choice is made to override existing widget/components instead of patching them as field dependencies need to be added for resource.resource records to distinguish material from human resources (and have the necessary information to determine if the popover card has to be displayed for material resources). Note: It is currently not possible to add _relatedFields_ option to M2O fields due to framework restriction that could evolve in Odoo 18. The behavior of the many2one_avatar_resource widget therefore exhibits the following limitations: - related field 'resource_type' that need to be fetched to determine if an avatar is displayed or not needs to be added to the model whose views will use this widget. - a popover card is displayed even if the human resource has no user linked to it. For the same reason, a related field user_id should be added to other models which is not really desirable and could lead to confusion. This should be refactored when a support of the _relatedFields_ option is added for M2O fields. hr.employee =========== The following widgets are patched to display the popover card when clicking on the avatar of the hr.employee record: - many2many_avatar_user - many2one_avatar_user The card displayed uses the same template as the one used for resource.resource records. task-3457031
robodoo
pushed a commit
that referenced
this pull request
Dec 1, 2023
Impacted modules: - hr - hr_skills - hr_holidays - hr_homeworking - resource_mail (new module) This commits introduces avatar card preview for resource.resource and hr.employee(.public) records in a similar way to what has been done in mail for res.users records (see #121943 and #131355). resource.resource ================= The following field components are created to display the popover card when clicking on the avatar of the resource.resource record: - widget many2one_avatar_resource (based on many2one_avatar_user) - widget many2many_avatar_resource (based on many2many_avatar_user) The behavior implemented when clicking on a resource.resource record's avatar is the following: - If the resource is human, a popover card is displayed. A "Send Message" button is displayed on the card if a user is associated to the record. - If the resource is material, no popover card is displayed. nb: this behavior is modified in planning The design of the popover card is for resource.resource records is similar to the one initially implemented for res.users records. The choice is made to override existing widget/components instead of patching them as field dependencies need to be added for resource.resource records to distinguish material from human resources (and have the necessary information to determine if the popover card has to be displayed for material resources). Note: It is currently not possible to add _relatedFields_ option to M2O fields due to framework restriction that could evolve in Odoo 18. The behavior of the many2one_avatar_resource widget therefore exhibits the following limitations: - related field 'resource_type' that need to be fetched to determine if an avatar is displayed or not needs to be added to the model whose views will use this widget. - a popover card is displayed even if the human resource has no user linked to it. For the same reason, a related field user_id should be added to other models which is not really desirable and could lead to confusion. This should be refactored when a support of the _relatedFields_ option is added for M2O fields. hr.employee =========== The following widgets are patched to display the popover card when clicking on the avatar of the hr.employee record: - many2many_avatar_user - many2one_avatar_user The card displayed uses the same template as the one used for resource.resource records. task-3457031 closes #137915 Related: odoo/enterprise#48808 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
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.
This commit adds the possibility to see additional information about a
user with a card that appears when hovering avatar user fields for a
set amount of time. This card contains the following information:
and with HR installed:
Task-3167110