Skip to content

Commit

Permalink
[MIG] hr_personal_equipment_request: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
peluko00 committed Apr 4, 2024
1 parent 0a9929c commit f5fb0bd
Show file tree
Hide file tree
Showing 18 changed files with 148 additions and 128 deletions.
70 changes: 40 additions & 30 deletions hr_personal_equipment_request/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,19 @@ Hr Personal Equipment Request
: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/16.0/hr_personal_equipment_request
:target: https://github.com/OCA/hr/tree/17.0/hr_personal_equipment_request
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_personal_equipment_request
:target: https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_personal_equipment_request
: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=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to create a personal equipment request and manage allocation of employee personal equipment.
This module allows to create a personal equipment request and manage
allocation of employee personal equipment.

**Table of contents**

Expand All @@ -38,52 +39,61 @@ This module allows to create a personal equipment request and manage allocation
Usage
=====

First, products which can be requested by employees should be marked as employee personal equipment.
1. Go to *Products* (In *Inventory* App for example).
2. Select a product.
3. Mark the *Is Employee Personal Equipment* flag.(An additional page appears which serves as a hook if additional fields are needed).

To create a personal equipment request, a common user should follow the next steps:
1. Go to menu *Employees -> Personal Equipment-> Employee Personal Equipment Request*
2. Current employee is set as default. (An Hr Officer can change the employee if needed).
3. At *Personal Equipment* select the equipments you want to request.
4. Add "Observations" at *Observations* if desired.

Then, an HR Manager should:
1. If everything is correct, "Accept" the request.
2. Finally, when the equipment is given to the employee, the allocation should be validated. This can be done in two ways:
a) Click the allocation in the equipment request that you want to validate, the form view will be opened, and click "Validate".
b) Go to *Employees -> Personal Equipment-> Allocations*. Select the corresponding allocation and click "Validate".

A common user can only see its own allocations. The HR Officer can see all of them.

If needed, the allocation can be expired clicking the button "Expire", which can be found at the allocation form view.
First, products which can be requested by employees should be marked as
employee personal equipment. 1. Go to *Products* (In *Inventory* App for
example). 2. Select a product. 3. Mark the *Is Employee Personal
Equipment* flag.(An additional page appears which serves as a hook if
additional fields are needed).

To create a personal equipment request, a common user should follow the
next steps: 1. Go to menu *Employees -> Personal Equipment-> Employee
Personal Equipment Request* 2. Current employee is set as default. (An
Hr Officer can change the employee if needed). 3. At *Personal
Equipment* select the equipments you want to request. 4. Add
"Observations" at *Observations* if desired.

Then, an HR Manager should: 1. If everything is correct, "Accept" the
request. 2. Finally, when the equipment is given to the employee, the
allocation should be validated. This can be done in two ways: a) Click
the allocation in the equipment request that you want to validate, the
form view will be opened, and click "Validate". b) Go to *Employees ->
Personal Equipment-> Allocations*. Select the corresponding allocation
and click "Validate".

A common user can only see its own allocations. The HR Officer can see
all of them.

If needed, the allocation can be expired clicking the button "Expire",
which can be found at the allocation form view.

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_personal_equipment_request%0Aversion:%2016.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_personal_equipment_request%0Aversion:%2017.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.

Credits
=======

Authors
~~~~~~~
-------

* Creu Blanca

Contributors
~~~~~~~~~~~~
------------

- Alba Riera <[email protected]>
- `APSL <https://apsl.tech>`__:

* Alba Riera <[email protected]>
- Antoni Marroig <[email protected]>

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

Expand All @@ -95,6 +105,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/16.0/hr_personal_equipment_request>`_ project on GitHub.
This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/17.0/hr_personal_equipment_request>`_ 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_personal_equipment_request/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Hr Personal Equipment Request",
"summary": """
This addon allows to manage employee personal equipment""",
"version": "16.0.1.0.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
Expand Down
1 change: 0 additions & 1 deletion hr_personal_equipment_request/models/hr_employee.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class HrEmployee(models.Model):

_inherit = "hr.employee"

equipment_request_ids = fields.One2many(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@


class HrPersonalEquipment(models.Model):

_name = "hr.personal.equipment"
_description = "Adds personal equipment information and allocation"
_inherit = ["mail.thread", "mail.activity.mixin"]
Expand Down Expand Up @@ -57,7 +56,7 @@ def _onchange_uom_id(self):
def _compute_name(self):
for rec in self:
if rec.product_id.name and rec.employee_id.name:
rec.name = "{} to {}".format(rec.product_id.name, rec.employee_id.name)
rec.name = f"{rec.product_id.name} to {rec.employee_id.name}"
else:
rec.name = False

Check warning on line 61 in hr_personal_equipment_request/models/hr_personal_equipment.py

View check run for this annotation

Codecov / codecov/patch

hr_personal_equipment_request/models/hr_personal_equipment.py#L61

Added line #L61 was not covered by tests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class HrPersonalEquipmentRequest(models.Model):

_name = "hr.personal.equipment.request"
_description = "This model allows to create a personal equipment request"
_inherit = ["mail.thread", "mail.activity.mixin"]
Expand Down
1 change: 0 additions & 1 deletion hr_personal_equipment_request/models/product_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@


class ProductTemplate(models.Model):

_inherit = "product.template"

is_personal_equipment = fields.Boolean(
Expand Down
3 changes: 3 additions & 0 deletions hr_personal_equipment_request/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions hr_personal_equipment_request/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Alba Riera \<<[email protected]>\>
- [APSL](https://apsl.tech):
- Antoni Marroig \<<[email protected]>\>
1 change: 0 additions & 1 deletion hr_personal_equipment_request/readme/CONTRIBUTORS.rst

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
This module allows to create a personal equipment request and manage allocation of employee personal equipment.
This module allows to create a personal equipment request and manage
allocation of employee personal equipment.
26 changes: 26 additions & 0 deletions hr_personal_equipment_request/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
First, products which can be requested by employees should be marked as
employee personal equipment. 1. Go to *Products* (In *Inventory* App for
example). 2. Select a product. 3. Mark the *Is Employee Personal
Equipment* flag.(An additional page appears which serves as a hook if
additional fields are needed).

To create a personal equipment request, a common user should follow the
next steps: 1. Go to menu *Employees -\> Personal Equipment-\> Employee
Personal Equipment Request* 2. Current employee is set as default. (An
Hr Officer can change the employee if needed). 3. At *Personal
Equipment* select the equipments you want to request. 4. Add
"Observations" at *Observations* if desired.

Then, an HR Manager should: 1. If everything is correct, "Accept" the
request. 2. Finally, when the equipment is given to the employee, the
allocation should be validated. This can be done in two ways: a) Click
the allocation in the equipment request that you want to validate, the
form view will be opened, and click "Validate". b) Go to *Employees -\>
Personal Equipment-\> Allocations*. Select the corresponding allocation
and click "Validate".

A common user can only see its own allocations. The HR Officer can see
all of them.

If needed, the allocation can be expired clicking the button "Expire",
which can be found at the allocation form view.
20 changes: 0 additions & 20 deletions hr_personal_equipment_request/readme/USAGE.rst

This file was deleted.

51 changes: 31 additions & 20 deletions hr_personal_equipment_request/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,9 @@ <h1 class="title">Hr Personal Equipment Request</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:c2e4d816b2325ecac17625c9c563499d3f1a0a7d48f16690ecbed0c1bcf3ccf8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/16.0/hr_personal_equipment_request"><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-16-0/hr-16-0-hr_personal_equipment_request"><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=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to create a personal equipment request and manage allocation of employee personal equipment.</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/17.0/hr_personal_equipment_request"><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_personal_equipment_request"><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>This module allows to create a personal equipment request and manage
allocation of employee personal equipment.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -386,29 +387,35 @@ <h1 class="title">Hr Personal Equipment Request</h1>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>First, products which can be requested by employees should be marked as employee personal equipment.
1. Go to <em>Products</em> (In <em>Inventory</em> App for example).
2. Select a product.
3. Mark the <em>Is Employee Personal Equipment</em> flag.(An additional page appears which serves as a hook if additional fields are needed).</p>
<p>To create a personal equipment request, a common user should follow the next steps:
1. Go to menu <em>Employees -&gt; Personal Equipment-&gt; Employee Personal Equipment Request</em>
2. Current employee is set as default. (An Hr Officer can change the employee if needed).
3. At <em>Personal Equipment</em> select the equipments you want to request.
4. Add “Observations” at <em>Observations</em> if desired.</p>
<p>Then, an HR Manager should:
1. If everything is correct, “Accept” the request.
2. Finally, when the equipment is given to the employee, the allocation should be validated. This can be done in two ways:
a) Click the allocation in the equipment request that you want to validate, the form view will be opened, and click “Validate”.
b) Go to <em>Employees -&gt; Personal Equipment-&gt; Allocations</em>. Select the corresponding allocation and click “Validate”.</p>
<p>A common user can only see its own allocations. The HR Officer can see all of them.</p>
<p>If needed, the allocation can be expired clicking the button “Expire”, which can be found at the allocation form view.</p>
<p>First, products which can be requested by employees should be marked as
employee personal equipment. 1. Go to <em>Products</em> (In <em>Inventory</em> App for
example). 2. Select a product. 3. Mark the <em>Is Employee Personal
Equipment</em> flag.(An additional page appears which serves as a hook if
additional fields are needed).</p>
<p>To create a personal equipment request, a common user should follow the
next steps: 1. Go to menu <em>Employees -&gt; Personal Equipment-&gt; Employee
Personal Equipment Request</em> 2. Current employee is set as default. (An
Hr Officer can change the employee if needed). 3. At <em>Personal
Equipment</em> select the equipments you want to request. 4. Add
“Observations” at <em>Observations</em> if desired.</p>
<p>Then, an HR Manager should: 1. If everything is correct, “Accept” the
request. 2. Finally, when the equipment is given to the employee, the
allocation should be validated. This can be done in two ways: a) Click
the allocation in the equipment request that you want to validate, the
form view will be opened, and click “Validate”. b) Go to <em>Employees -&gt;
Personal Equipment-&gt; Allocations</em>. Select the corresponding allocation
and click “Validate”.</p>
<p>A common user can only see its own allocations. The HR Officer can see
all of them.</p>
<p>If needed, the allocation can be expired clicking the button “Expire”,
which can be found at the allocation form view.</p>
</div>
<div class="section" id="bug-tracker">
<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_personal_equipment_request%0Aversion:%2016.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_personal_equipment_request%0Aversion:%2017.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 @@ -423,6 +430,10 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Alba Riera &lt;<a class="reference external" href="mailto:alba.riera&#64;creublanca.es">alba.riera&#64;creublanca.es</a>&gt;</li>
<li><a class="reference external" href="https://apsl.tech">APSL</a>:<ul>
<li>Antoni Marroig &lt;<a class="reference external" href="mailto:amarroig&#64;apsl.net">amarroig&#64;apsl.net</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -432,7 +443,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/16.0/hr_personal_equipment_request">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/17.0/hr_personal_equipment_request">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
Loading

0 comments on commit f5fb0bd

Please sign in to comment.