Initial commit: Odoo 18.0-20251222 extra-addons
Some checks failed
pre-commit / pre-commit (push) Has been cancelled
tests / Detect unreleased dependencies (push) Has been cancelled
tests / test with OCB (push) Has been cancelled
tests / test with Odoo (push) Has been cancelled

This commit is contained in:
tocmo0nlord
2026-03-13 20:43:25 +00:00
parent 36e847a7df
commit adbe430761
9472 changed files with 1265727 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association
============================
Maintenance Request Employee
============================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a3a484ae562f429e0bd2c636b65395334b3eac8f732ba1d0b87d652c0a4c6251
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png
:target: https://odoo-community.org/page/development-status
:alt: Production/Stable
.. |badge2| image:: https://img.shields.io/badge/license-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_request_employee
: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_request_employee
: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|
This module adds the option to define employees in maintenance requests.
**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_request_employee%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
-------
* Tecnativa
Contributors
------------
- `Tecnativa <https://www.tecnativa.com>`__
- Pedro M. Baeza
- Víctor Martínez
- Carlos Lopez
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__
- Bhavesh Heliconia
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.
.. |maintainer-victoralmau| image:: https://github.com/victoralmau.png?size=40px
:target: https://github.com/victoralmau
:alt: victoralmau
Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:
|maintainer-victoralmau|
This module is part of the `OCA/maintenance <https://github.com/OCA/maintenance/tree/18.0/maintenance_request_employee>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View File

@@ -0,0 +1 @@
from . import models

View File

@@ -0,0 +1,15 @@
# Copyright 2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Maintenance Request Employee",
"version": "18.0.1.0.0",
"category": "Maintenance",
"website": "https://github.com/OCA/maintenance",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["hr_maintenance"],
"data": ["views/maintenance_request_views.xml"],
"installable": True,
"maintainers": ["victoralmau"],
"development_status": "Production/Stable",
}

View File

@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_employee
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-02-22 10:23+0000\n"
"PO-Revision-Date: 2023-07-06 20:08+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"
#. module: maintenance_request_employee
#: model:ir.model.fields,field_description:maintenance_request_employee.field_maintenance_request__employee_ids
msgid "Employees"
msgstr "Empleados"
#. module: maintenance_request_employee
#: model_terms:ir.ui.view,arch_db:maintenance_request_employee.maintenance_request_view_search_inherit_hr
msgid "Involved Maintenances"
msgstr "Mantenimientos involucrados"
#. module: maintenance_request_employee
#: model:ir.model,name:maintenance_request_employee.model_maintenance_request
msgid "Maintenance Request"
msgstr "Petición de mantenimiento"
#~ msgid "Employee"
#~ msgstr "Empleado"

View File

@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_employee
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-03-08 21:22+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.14.1\n"
#. module: maintenance_request_employee
#: model:ir.model.fields,field_description:maintenance_request_employee.field_maintenance_request__employee_ids
msgid "Employees"
msgstr "Dipendenti"
#. module: maintenance_request_employee
#: model_terms:ir.ui.view,arch_db:maintenance_request_employee.maintenance_request_view_search_inherit_hr
msgid "Involved Maintenances"
msgstr "Manutenzioni coinvolte"
#. module: maintenance_request_employee
#: model:ir.model,name:maintenance_request_employee.model_maintenance_request
msgid "Maintenance Request"
msgstr "Richiesta manutenzione"
#~ msgid "Employee"
#~ msgstr "Dipendente"

View File

@@ -0,0 +1,29 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_employee
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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_request_employee
#: model:ir.model.fields,field_description:maintenance_request_employee.field_maintenance_request__employee_ids
msgid "Employees"
msgstr ""
#. module: maintenance_request_employee
#: model_terms:ir.ui.view,arch_db:maintenance_request_employee.maintenance_request_view_search_inherit_hr
msgid "Involved Maintenances"
msgstr ""
#. module: maintenance_request_employee
#: model:ir.model,name:maintenance_request_employee.model_maintenance_request
msgid "Maintenance Request"
msgstr ""

View File

@@ -0,0 +1 @@
from . import maintenance_request

View File

@@ -0,0 +1,10 @@
# Copyright 2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MaintenanceRequest(models.Model):
_inherit = "maintenance.request"
employee_ids = fields.Many2many(comodel_name="hr.employee", string="Employees")

View File

@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"

View File

@@ -0,0 +1,6 @@
- [Tecnativa](https://www.tecnativa.com)
- Pedro M. Baeza
- Víctor Martínez
- Carlos Lopez
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia

View File

@@ -0,0 +1 @@
This module adds the option to define employees in maintenance requests.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="50"
height="50"
viewBox="0 0 50 50"
fill="none"
version="1.1"
id="svg11"
sodipodi:docname="maintenance.svg"
inkscape:version="1.4 (1:1.4+202410161351+e7c3feb100)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview11"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="17.62"
inkscape:cx="25.028377"
inkscape:cy="25"
inkscape:window-width="1920"
inkscape:window-height="1131"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg11" />
<path
d="M12.1709 24.1927C12.1709 24.1927 18.2922 21.6069 19.9491 19.9501C21.6059 18.2932 24.1917 12.1719 24.1917 12.1719L37.6267 25.6069C37.6267 25.6069 31.5283 28.1698 29.8486 29.8495C28.1689 31.5293 25.6059 37.6277 25.6059 37.6277L12.1709 24.1927Z"
fill="#1BB6F9"
id="path1" />
<path
d="M12.1709 24.1927C12.1709 24.1927 18.2922 21.6069 19.9491 19.9501C21.6059 18.2932 24.1917 12.1719 24.1917 12.1719L37.6267 25.6069C37.6267 25.6069 31.5283 28.1698 29.8486 29.8495C28.1689 31.5293 25.6059 37.6277 25.6059 37.6277L12.1709 24.1927Z"
fill="url(#paint0_linear_3358_13642)"
fill-opacity="0.2"
id="path2" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M42.577 22.7782C46.8728 18.4824 46.8728 11.5176 42.577 7.22182C38.2812 2.92606 31.3164 2.92606 27.0207 7.22183C22.7249 11.5176 22.7249 18.4824 27.0207 22.7782C31.3164 27.0739 38.2812 27.0739 42.577 22.7782ZM38.3344 18.5355C40.287 16.5829 40.287 13.4171 38.3344 11.4645C36.3817 9.51185 33.2159 9.51185 31.2633 11.4645C29.3107 13.4171 29.3107 16.5829 31.2633 18.5355C33.2159 20.4882 36.3818 20.4882 38.3344 18.5355Z"
fill="#0382F3"
id="path3" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M42.577 22.7782C46.8728 18.4824 46.8728 11.5176 42.577 7.22182C38.2812 2.92606 31.3164 2.92606 27.0207 7.22183C22.7249 11.5176 22.7249 18.4824 27.0207 22.7782C31.3164 27.0739 38.2812 27.0739 42.577 22.7782ZM38.3344 18.5355C40.287 16.5829 40.287 13.4171 38.3344 11.4645C36.3817 9.51185 33.2159 9.51185 31.2633 11.4645C29.3107 13.4171 29.3107 16.5829 31.2633 18.5355C33.2159 20.4882 36.3818 20.4882 38.3344 18.5355Z"
fill="url(#paint1_linear_3358_13642)"
fill-opacity="0.2"
id="path4" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M22.7782 42.577C27.0739 38.2812 27.0739 31.3164 22.7782 27.0207C18.4824 22.7249 11.5176 22.7249 7.22182 27.0207C2.92606 31.3164 2.92606 38.2812 7.22183 42.577C11.5176 46.8728 18.4824 46.8728 22.7782 42.577ZM18.5355 38.3344C20.4882 36.3817 20.4882 33.2159 18.5355 31.2633C16.5829 29.3107 13.4171 29.3107 11.4645 31.2633C9.51185 33.2159 9.51185 36.3817 11.4645 38.3344C13.4171 40.287 16.5829 40.287 18.5355 38.3344Z"
fill="#0382F3"
id="path5" />
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M22.7782 42.577C27.0739 38.2812 27.0739 31.3164 22.7782 27.0207C18.4824 22.7249 11.5176 22.7249 7.22182 27.0207C2.92606 31.3164 2.92606 38.2812 7.22183 42.577C11.5176 46.8728 18.4824 46.8728 22.7782 42.577ZM18.5355 38.3344C20.4882 36.3817 20.4882 33.2159 18.5355 31.2633C16.5829 29.3107 13.4171 29.3107 11.4645 31.2633C9.51185 33.2159 9.51185 36.3817 11.4645 38.3344C13.4171 40.287 16.5829 40.287 18.5355 38.3344Z"
fill="url(#paint2_linear_3358_13642)"
fill-opacity="0.2"
id="path6" />
<defs
id="defs11">
<linearGradient
id="paint0_linear_3358_13642"
x1="12.1709"
y1="12.1719"
x2="42.119"
y2="19.6589"
gradientUnits="userSpaceOnUse">
<stop
stop-color="white"
id="stop6" />
<stop
offset="1"
stop-color="white"
stop-opacity="0"
id="stop7" />
</linearGradient>
<linearGradient
id="paint1_linear_3358_13642"
x1="23.7988"
y1="4"
x2="49.6812"
y2="10.4706"
gradientUnits="userSpaceOnUse">
<stop
stop-color="white"
id="stop8" />
<stop
offset="1"
stop-color="white"
stop-opacity="0"
id="stop9" />
</linearGradient>
<linearGradient
id="paint2_linear_3358_13642"
x1="4"
y1="23.7988"
x2="29.8824"
y2="30.2694"
gradientUnits="userSpaceOnUse">
<stop
stop-color="white"
id="stop10" />
<stop
offset="1"
stop-color="white"
stop-opacity="0"
id="stop11" />
</linearGradient>
</defs>
<g
id="g6"
transform="matrix(0.34392735,0,0,0.34392735,27.23269,30.916004)">
<path
d="m 34,17 a 9,9 0 1 1 -18,0 9,9 0 0 1 18,0 z"
fill="#985184"
id="path1-6" />
<path
d="m 12,24 a 4,4 0 1 1 -8,0 4,4 0 0 1 8,0 z"
fill="#fbb945"
id="path2-2" />
<path
d="m 46,24 a 4,4 0 1 1 -8,0 4,4 0 0 1 8,0 z"
fill="#1ad3bb"
id="path3-9" />
<path
d="M 25,30 H 4 a 4,4 0 0 0 -4,4 v 4 a 4,4 0 0 0 4,4 h 21 z"
fill="#fbb945"
id="path4-1" />
<path
d="M 46,30 H 25 v 12 h 21 a 4,4 0 0 0 4,-4 v -4 a 4,4 0 0 0 -4,-4 z"
fill="#1ad3bb"
id="path5-2" />
<path
d="m 12,30 h 14 c 6.627,0 12,5.373 12,12 H 24 C 17.373,42 12,36.627 12,30 Z"
fill="#985184"
id="path6-7" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

@@ -0,0 +1,440 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>README.rst</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document">
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
</a>
<div class="section" id="maintenance-request-employee">
<h1>Maintenance Request Employee</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:a3a484ae562f429e0bd2c636b65395334b3eac8f732ba1d0b87d652c0a4c6251
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.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/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/maintenance/tree/18.0/maintenance_request_employee"><img alt="OCA/maintenance" src="https://img.shields.io/badge/github-OCA%2Fmaintenance-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/maintenance-18-0/maintenance-18-0-maintenance_request_employee"><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/maintenance&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 adds the option to define employees in maintenance requests.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="bug-tracker">
<h2><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h2>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/maintenance/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/maintenance/issues/new?body=module:%20maintenance_request_employee%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">
<h2><a class="toc-backref" href="#toc-entry-2">Credits</a></h2>
<div class="section" id="authors">
<h3><a class="toc-backref" href="#toc-entry-3">Authors</a></h3>
<ul class="simple">
<li>Tecnativa</li>
</ul>
</div>
<div class="section" id="contributors">
<h3><a class="toc-backref" href="#toc-entry-4">Contributors</a></h3>
<ul class="simple">
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a><ul>
<li>Pedro M. Baeza</li>
<li>Víctor Martínez</li>
<li>Carlos Lopez</li>
</ul>
</li>
<li><a class="reference external" href="https://www.heliconia.io">Heliconia Solutions Pvt. Ltd.</a><ul>
<li>Bhavesh Heliconia</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h3><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h3>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<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>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainer</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/victoralmau"><img alt="victoralmau" src="https://github.com/victoralmau.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/18.0/maintenance_request_employee">OCA/maintenance</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>
</div>
</div>
</body>
</html>

View File

@@ -0,0 +1 @@
from . import test_maintenance_request_employee

View File

@@ -0,0 +1,39 @@
# Copyright 2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import TransactionCase
class TestMaintenanceRequest(TransactionCase):
def setUp(self):
super().setUp()
# Create some test employees
self.employee_1 = self.env["hr.employee"].create({"name": "Employee 1"})
self.employee_2 = self.env["hr.employee"].create({"name": "Employee 2"})
def test_maintenance_request_with_employees(self):
# Create a maintenance request and assign employees
maintenance_request = self.env["maintenance.request"].create(
{
"name": "Test Request",
"employee_ids": [(6, 0, [self.employee_1.id, self.employee_2.id])],
}
)
# Ensure the request was created
self.assertTrue(maintenance_request)
# Check if employees are correctly linked
self.assertEqual(len(maintenance_request.employee_ids), 2)
self.assertIn(self.employee_1, maintenance_request.employee_ids)
self.assertIn(self.employee_2, maintenance_request.employee_ids)
def test_maintenance_request_without_employees(self):
# Create a maintenance request without assigning any employees
maintenance_request = self.env["maintenance.request"].create(
{
"name": "Test Request No Employees",
}
)
# Ensure no employees are assigned
self.assertEqual(len(maintenance_request.employee_ids), 0)

View File

@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="maintenance_request_view_search_inherit_hr" model="ir.ui.view">
<field name="name">maintenance.request.view.search.inherit.hr</field>
<field
name="inherit_id"
ref="hr_maintenance.maintenance_request_view_search_inherit_hr"
/>
<field name="model">maintenance.request</field>
<field name="arch" type="xml">
<field name="employee_id" position="after">
<field name="employee_ids" />
</field>
<xpath expr="//filter[@name='my_maintenances']" position="after">
<filter
string="Involved Maintenances"
name="involved_maintenances"
domain="[('employee_ids.user_id', '=', uid)]"
/>
</xpath>
</field>
</record>
<record id="maintenance_request_view_form_inherit_hr" model="ir.ui.view">
<field name="name">maintenance.request.view.form.inherit.hr</field>
<field
name="inherit_id"
ref="hr_maintenance.maintenance_request_view_form_inherit_hr"
/>
<field name="model">maintenance.request</field>
<field name="arch" type="xml">
<field name="employee_id" position="after">
<field name="employee_ids" widget="many2many_tags" />
</field>
</field>
</record>
<record id="maintenance_request_view_kanban_inherit_hr" model="ir.ui.view">
<field name="name">maintenance.request.view.kanban.inherit.hr</field>
<field
name="inherit_id"
ref="hr_maintenance.maintenance_request_view_kanban_inherit_hr"
/>
<field name="model">maintenance.request</field>
<field name="arch" type="xml">
<field name="user_id" position="after">
<field name="employee_ids" invisible="1" />
</field>
<xpath expr="//field[@name='employee_id']" position="after">
<div t-if="record.employee_ids.raw_value">
<field name="employee_ids" widget="many2many_avatar_user" />
</div>
</xpath>
</field>
</record>
</odoo>