Skip to content

Commit

Permalink
[MIG] hr_course: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
HeliconiaSolutions committed Dec 12, 2024
1 parent 83e060c commit cc38fc1
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 46 deletions.
17 changes: 9 additions & 8 deletions hr_course/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ HR Course
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/17.0/hr_course
:target: https://github.com/OCA/hr/tree/18.0/hr_course
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_course
:target: https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_course
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand Down Expand Up @@ -55,7 +55,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_course%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_course%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Expand All @@ -70,9 +70,10 @@ Authors
Contributors
------------

- Enric Tobella <etobella@creublanca.es>
- Jaime Arroyo <jaime.arroyo@creublanca.es>
- Manish Bohra manishkumarbohra@outlook.com
- Enric Tobella <etobella@creublanca.es>
- Jaime Arroyo <jaime.arroyo@creublanca.es>
- Manish Bohra manishkumarbohra@outlook.com
- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Maintainers
-----------
Expand All @@ -87,6 +88,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/17.0/hr_course>`_ project on GitHub.
This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/18.0/hr_course>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion hr_course/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "HR Course",
"summary": """
This module allows your to manage employee's training courses""",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
Expand Down
2 changes: 1 addition & 1 deletion hr_course/models/hr_course_schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def _waiting2inprogress_values(self):
lambda r: r.employee_id not in self.attendant_ids
):
attendants += course_attendee._remove_from_course()
deleted_attendees += "- %s <br></br>" % course_attendee.employee_id.name
deleted_attendees += f"- {course_attendee.employee_id.name} <br></br>"
if deleted_attendees != "":
message = (
_("Employees removed from this course: <br></br>%s") % deleted_attendees
Expand Down
2 changes: 2 additions & 0 deletions hr_course/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- Enric Tobella \<<etobella@creublanca.es>\>
- Jaime Arroyo \<<jaime.arroyo@creublanca.es>\>
- Manish Bohra <manishkumarbohra@outlook.com>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_

7 changes: 4 additions & 3 deletions hr_course/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">HR Course</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:daef8818c8922de2991b0186ce8d242b7ee0082d61e2c12e3c2e95f445864b99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/hr/tree/17.0/hr_course"><img alt="OCA/hr" src="https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_course"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/hr&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/hr/tree/18.0/hr_course"><img alt="OCA/hr" src="https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_course"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/hr&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows your to manage employee’s training courses, course
dates and all its validation process.</p>
<p><strong>Table of contents</strong></p>
Expand Down Expand Up @@ -399,7 +399,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/hr/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/OCA/hr/issues/new?body=module:%20hr_course%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/hr/issues/new?body=module:%20hr_course%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -416,6 +416,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
<li>Jaime Arroyo &lt;<a class="reference external" href="mailto:jaime.arroyo&#64;creublanca.es">jaime.arroyo&#64;creublanca.es</a>&gt;</li>
<li>Manish Bohra <a class="reference external" href="mailto:manishkumarbohra&#64;outlook.com">manishkumarbohra&#64;outlook.com</a></li>
<li><tt class="docutils literal">Heliconia Solutions Pvt. Ltd. <span class="pre">&lt;https://www.heliconia.io&gt;</span></tt>_</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -427,7 +428,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr/tree/17.0/hr_course">OCA/hr</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/hr/tree/18.0/hr_course">OCA/hr</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
6 changes: 3 additions & 3 deletions hr_course/views/hr_course_category_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
<field name="model">hr.course.category</field>
<field eval="8" name="priority" />
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
</tree>
</list>
</field>
</record>
<record id="open_view_course_category_form" model="ir.actions.act_window">
<field name="name">Course Categories</field>
<field name="res_model">hr.course.category</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_view_course_category_form"
Expand Down
27 changes: 10 additions & 17 deletions hr_course/views/hr_course_schedule_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,7 @@
</page>
</notebook>
</sheet>
<div class="oe_chatter">
<field
name="message_follower_ids"
widget="mail_followers"
groups="base.group_user"
/>
<field name="message_ids" widget="mail_thread" />
</div>
<chatter />
</form>
</field>
</record>
Expand All @@ -166,27 +159,27 @@
</search>
</field>
</record>
<record id="hr_course_schedule_tree_view" model="ir.ui.view">
<field name="name">hr.course.schedule.tree</field>
<record id="hr_course_schedule_list_view" model="ir.ui.view">
<field name="name">hr.course.schedule.list</field>
<field name="model">hr.course.schedule</field>
<field name="arch" type="xml">
<tree
<list
decoration-success="state=='completed'"
decoration-muted="state=='cancelled'"
>
<field name="name" />
<field name="start_date" />
<field name="end_date" />
<field name="state" />
</tree>
</list>
</field>
</record>
<record id="hr_course_attendee_tree_view" model="ir.ui.view">
<field name="name">hr.course.attendee.tree</field>
<record id="hr_course_attendee_list_view" model="ir.ui.view">
<field name="name">hr.course.attendee.list</field>
<field name="model">hr.course.attendee</field>
<field name="priority">30</field>
<field name="arch" type="xml">
<tree
<list
decoration-success="result=='passed'"
decoration-danger="result=='failed' or result=='absent'"
editable="bottom"
Expand All @@ -195,7 +188,7 @@
>
<field name="employee_id" />
<field name="result" />
</tree>
</list>
</field>
</record>
<record id="hr_course_attendee_form_view" model="ir.ui.view">
Expand All @@ -219,7 +212,7 @@
<record id="action_hr_course_schedule" model="ir.actions.act_window">
<field name="name">Courses Schedule</field>
<field name="res_model">hr.course.schedule</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_hr_course_schedule"
Expand Down
14 changes: 7 additions & 7 deletions hr_course/views/hr_course_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
</page>
<page string="Schedules">
<field name="course_schedule_ids" nolabel="1">
<tree editable="bottom">
<list editable="bottom">
<field name="name" />
<field
name="cost"
Expand All @@ -47,30 +47,30 @@
<field name="start_date" />
<field name="end_date" />
<field name="state" />
</tree>
</list>
</field>
</page>
</notebook>
</sheet>
</form>
</field>
</record>
<record id="hr_course_tree_view" model="ir.ui.view">
<field name="name">hr.course.tree</field>
<record id="hr_course_list_view" model="ir.ui.view">
<field name="name">hr.course.list</field>
<field name="model">hr.course</field>
<field name="arch" type="xml">
<tree>
<list>
<field name="name" />
<field name="category_id" />
<field name="content" />
<field name="objective" />
</tree>
</list>
</field>
</record>
<record id="action_hr_course" model="ir.actions.act_window">
<field name="name">Courses</field>
<field name="res_model">hr.course</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
</record>
<menuitem
id="menu_hr_course"
Expand Down
12 changes: 6 additions & 6 deletions hr_course/views/hr_employee_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</div>
</field>
</record>
<record model="ir.ui.view" id="hr_course_attendee_tree_employee_view">
<field name="name">hr.course.attendee.tree.employee</field>
<record model="ir.ui.view" id="hr_course_attendee_list_employee_view">
<field name="name">hr.course.attendee.list.employee</field>
<field name="model">hr.course.attendee</field>
<field name="priority">100</field>
<field name="arch" type="xml">
<tree
<list
create="false"
delete="false"
decoration-muted="state=='cancelled'"
Expand All @@ -35,17 +35,17 @@
<field name="course_start" />
<field name="course_end" />
<field name="result" />
</tree>
</list>
</field>
</record>
<record id="action_view_course" model="ir.actions.act_window">
<field name="name">Courses</field>
<field name="res_model">hr.course.attendee</field>
<field name="view_mode">tree,form</field>
<field name="view_mode">list,form</field>
<field
name="view_ids"
eval="[(5,0,0),
(0,0,{'view_mode':'tree', 'view_id': ref('hr_course_attendee_tree_employee_view')}),
(0,0,{'view_mode':'list', 'view_id': ref('hr_course_attendee_list_employee_view')}),
(0,0,{'view_mode':'form'})]"
/>
</record>
Expand Down

0 comments on commit cc38fc1

Please sign in to comment.