Skip to content

Commit

Permalink
[MIG] hr_announcement: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjosesegui-tecnativa committed Sep 6, 2024
1 parent a76173d commit 45a652e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions hr_announcement/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ Contributors
- `Tecnativa <https://www.tecnativa.com>`__:

- Pilar Vargas
- Juan José Seguí

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion hr_announcement/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Announcement",
"version": "15.0.1.0.0",
"version": "17.0.1.0.0",
"summary": "",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
Expand Down
4 changes: 2 additions & 2 deletions hr_announcement/models/announcement.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def _update_read_unread_announcements(self):
itself"""
for announcement in self:
for employee in announcement.employee_ids.filtered(
lambda x: x.user_id
and announcement
lambda x, ann=announcement: x.user_id
and ann
not in (
x.user_id.read_announcement_ids + x.user_id.unread_announcement_ids
)
Expand Down
1 change: 1 addition & 0 deletions hr_announcement/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):
- Pilar Vargas
- Juan José Seguí
1 change: 1 addition & 0 deletions hr_announcement/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
<li>Pilar Vargas</li>
<li>Juan José Seguí</li>
</ul>
</li>
</ul>
Expand Down
9 changes: 6 additions & 3 deletions hr_announcement/views/announcement_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@
name="employee_ids"
options="{'no_create': True}"
widget="many2many_tags"
attrs="{'invisible': [('announcement_type', '!=', 'employee')], 'required': [('announcement_type', '=', 'employee')]}"
invisible="announcement_type != 'employee'"
required="announcement_type == 'employee'"
/>
<field
name="department_ids"
options="{'no_create': True}"
widget="many2many_tags"
attrs="{'invisible': [('announcement_type', '!=', 'department')], 'required': [('announcement_type', '=', 'department')]}"
invisible="announcement_type != 'department'"
required="announcement_type == 'department'"
/>
<field
name="position_ids"
options="{'no_create': True}"
widget="many2many_tags"
attrs="{'invisible': [('announcement_type', '!=', 'job_position')], 'required': [('announcement_type', '=', 'job_position')]}"
invisible="announcement_type != 'job_position'"
required="announcement_type == 'job_position'"
/>
</xpath>
</field>
Expand Down

0 comments on commit 45a652e

Please sign in to comment.