Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions maintenance_location_hr/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
=======================
Maintenance Location Hr
=======================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:43cc61559aafa8bcee437c408c3b93177ff9302799a8cf7153f6f42146de5299
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github
:target: https://github.com/OCA/maintenance/tree/18.0/maintenance_location_hr
:alt: OCA/maintenance
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/maintenance-18-0/maintenance-18-0-maintenance_location_hr
: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/maintenance&target_branch=18.0
:alt: Try me on Runboat

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

Allow to assign equipments directly to a location.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/maintenance/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/maintenance/issues/new?body=module:%20maintenance_location_hr%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.

Credits
=======

Authors
-------

* Dixmit

Contributors
------------

- Enric Tobella
- `NuoBiT <https://www.nuobit.com>`__:

- Deniz Gallo dgallo@nuobit.com

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/maintenance <https://github.com/OCA/maintenance/tree/18.0/maintenance_location_hr>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions maintenance_location_hr/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions maintenance_location_hr/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Maintenance Location Hr",
"summary": """
Assign equipments to locations""",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/maintenance",
"depends": ["maintenance_location", "hr_maintenance"],
"data": [
"views/maintenance_location.xml",
"views/maintenance_equipment.xml",
],
"demo": [],
}
60 changes: 60 additions & 0 deletions maintenance_location_hr/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_location_hr
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-28 12:33+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__display_name
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__display_name
msgid "Display Name"
msgstr "Mostrar Nombre"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__id
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__id
msgid "ID"
msgstr "ID"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment____last_update
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location____last_update
msgid "Last Modified on"
msgstr "Última Modificación el"

#. module: maintenance_location_hr
#: model:ir.model.fields.selection,name:maintenance_location_hr.selection__maintenance_equipment__equipment_assign_to__location
msgid "Location"
msgstr "Localización"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_equipment
msgid "Maintenance Equipment"
msgstr "Mantenimiento de Equipos"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_location
msgid "Maintenance Location"
msgstr "Localización de Mantenimiento"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__owner_id
msgid "Owner"
msgstr "Propietario"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__equipment_assign_to
msgid "Used By"
msgstr "Utilizado Por"
60 changes: 60 additions & 0 deletions maintenance_location_hr/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_location_hr
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-06-18 12:02+0000\n"
"Last-Translator: Yann Papouin <ypa@decgroupe.com>\n"
"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__display_name
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__display_name
msgid "Display Name"
msgstr "Nom affiché"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__id
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__id
msgid "ID"
msgstr "ID"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment____last_update
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"

#. module: maintenance_location_hr
#: model:ir.model.fields.selection,name:maintenance_location_hr.selection__maintenance_equipment__equipment_assign_to__location
msgid "Location"
msgstr "Emplacement"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_equipment
msgid "Maintenance Equipment"
msgstr "Équipement de maintenance"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_location
msgid "Maintenance Location"
msgstr "Lieu de maintenance"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__owner_id
msgid "Owner"
msgstr "Propriétaire"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__equipment_assign_to
msgid "Used By"
msgstr "Utilisé par"
60 changes: 60 additions & 0 deletions maintenance_location_hr/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_location_hr
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-19 15:34+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__display_name
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__id
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__id
msgid "ID"
msgstr "ID"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment____last_update
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: maintenance_location_hr
#: model:ir.model.fields.selection,name:maintenance_location_hr.selection__maintenance_equipment__equipment_assign_to__location
msgid "Location"
msgstr "Ubicazione"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_equipment
msgid "Maintenance Equipment"
msgstr "Attrezzatura manutenzione"

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_location
msgid "Maintenance Location"
msgstr "Ubicazione manutenzione"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__owner_id
msgid "Owner"
msgstr "Proprietario"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__equipment_assign_to
msgid "Used By"
msgstr "Usata da"
57 changes: 57 additions & 0 deletions maintenance_location_hr/i18n/maintenance_location_hr.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_location_hr
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__display_name
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__display_name
msgid "Display Name"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__id
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__id
msgid "ID"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment____last_update
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location____last_update
msgid "Last Modified on"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model.fields.selection,name:maintenance_location_hr.selection__maintenance_equipment__equipment_assign_to__location
msgid "Location"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_equipment
msgid "Maintenance Equipment"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model,name:maintenance_location_hr.model_maintenance_location
msgid "Maintenance Location"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_location__owner_id
msgid "Owner"
msgstr ""

#. module: maintenance_location_hr
#: model:ir.model.fields,field_description:maintenance_location_hr.field_maintenance_equipment__equipment_assign_to
msgid "Used By"
msgstr ""
2 changes: 2 additions & 0 deletions maintenance_location_hr/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import maintenance_equipment
from . import maintenance_location
22 changes: 22 additions & 0 deletions maintenance_location_hr/models/maintenance_equipment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2023 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class MaintenanceEquipment(models.Model):
_inherit = "maintenance.equipment"

equipment_assign_to = fields.Selection(
selection_add=[("location", "Location")],
ondelete={"location": lambda r: r.write({"equipment_assign_to": "other"})},
)

@api.depends("employee_id", "department_id", "equipment_assign_to", "location_id")
def _compute_owner(self):
location_equipments = self.filtered(
lambda r: r.equipment_assign_to == "location"
)
for equipment in location_equipments:
equipment.owner_user_id = equipment.location_id.owner_id or self.env.user
return super(MaintenanceEquipment, self - location_equipments)._compute_owner()
10 changes: 10 additions & 0 deletions maintenance_location_hr/models/maintenance_location.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Copyright 2023 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class MaintenanceLocation(models.Model):
_inherit = "maintenance.location"

owner_id = fields.Many2one("res.users")
3 changes: 3 additions & 0 deletions maintenance_location_hr/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 maintenance_location_hr/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- Enric Tobella
- [NuoBiT](https://www.nuobit.com):
- Deniz Gallo <dgallo@nuobit.com>
1 change: 1 addition & 0 deletions maintenance_location_hr/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow to assign equipments directly to a location.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading