mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-19 11:12:02 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,81 @@
|
|||
====================
|
||||
Maintenance Projects
|
||||
====================
|
||||
|
||||
..
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:d68a0f7d567eafa344eb212be0520f6c37c4dccc3ec106ebad8884fa57af3fa9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |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/16.0/maintenance_project
|
||||
:alt: OCA/maintenance
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/maintenance-16-0/maintenance-16-0-maintenance_project
|
||||
: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=16.0
|
||||
:alt: Try me on Runboat
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
|
||||
This module extends the functionality of Odoo Maintenance module adding this features:
|
||||
|
||||
- Adds a project to an equipment. You can link an existing project or create a new one (with the Create project button) after creating the equipment.
|
||||
- Adds project and task to a maintenance request. The default project for a request will be the equipment one, including the preventive requests periodically created.
|
||||
|
||||
This is is a technical addon to allow timesheet assignment to a maintenance request.
|
||||
|
||||
**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_project%0Aversion:%2016.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
|
||||
~~~~~~~
|
||||
|
||||
* Solvos
|
||||
|
||||
Contributors
|
||||
~~~~~~~~~~~~
|
||||
|
||||
* David Alonso <david.alonso@solvos.es>
|
||||
|
||||
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/16.0/maintenance_project>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import models
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
# Copyright 2019 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
{
|
||||
"name": "Maintenance Projects",
|
||||
"summary": "Adds projects to maintenance equipments and requests",
|
||||
"version": "16.0.2.0.0",
|
||||
"author": "Odoo Community Association (OCA), Solvos",
|
||||
"license": "AGPL-3",
|
||||
"category": "Maintenance",
|
||||
"website": "https://github.com/OCA/maintenance",
|
||||
"depends": ["base_maintenance", "project"],
|
||||
"data": [
|
||||
"views/maintenance_equipment_views.xml",
|
||||
"views/maintenance_request_views.xml",
|
||||
"views/project_project_views.xml",
|
||||
"report/maintenance_request_report.xml",
|
||||
],
|
||||
"demo": ["data/demo_maintenance_project.xml"],
|
||||
"installable": True,
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
<odoo noupdate="1">
|
||||
<record id="project_project_1" model="project.project">
|
||||
<field name="name">General equipment project</field>
|
||||
<field name="user_id" ref="base.user_admin" />
|
||||
</record>
|
||||
<record id="project_task_11" model="project.task">
|
||||
<field name="user_ids" eval="[(4, ref('base.user_admin'))]" />
|
||||
<field name="project_id" ref="maintenance_project.project_project_1" />
|
||||
<field name="name">General task</field>
|
||||
</record>
|
||||
<record id="project_task_12" model="project.task">
|
||||
<field name="user_ids" eval="[(4, ref('base.user_admin'))]" />
|
||||
<field name="project_id" ref="maintenance_project.project_project_1" />
|
||||
<field name="name">Default preventive task</field>
|
||||
</record>
|
||||
<record id="equipment_1" model="maintenance.equipment">
|
||||
<field name="name">Generic Monitor</field>
|
||||
<field name="category_id" ref="maintenance.equipment_monitor" />
|
||||
<field name="owner_user_id" ref="base.user_admin" />
|
||||
<field name="technician_user_id" ref="base.user_admin" />
|
||||
<field name="assign_date" eval="time.strftime('%Y-%m-10')" />
|
||||
<field name="serial_no">S/N 1</field>
|
||||
<field name="model">MODEL1</field>
|
||||
<field name="project_id" ref="maintenance_project.project_project_1" />
|
||||
</record>
|
||||
<record id="equipment_2" model="maintenance.equipment">
|
||||
<field name="name">Generic Monitor with preventive</field>
|
||||
<field name="category_id" ref="maintenance.equipment_monitor" />
|
||||
<field name="owner_user_id" ref="base.user_admin" />
|
||||
<field name="technician_user_id" ref="base.user_admin" />
|
||||
<field
|
||||
name="maintenance_team_id"
|
||||
ref="maintenance.equipment_team_maintenance"
|
||||
/>
|
||||
<field name="assign_date" eval="time.strftime('%Y-%m-10')" />
|
||||
<field name="serial_no">S/N 2</field>
|
||||
<field name="model">MODEL2</field>
|
||||
<field name="project_id" ref="maintenance_project.project_project_1" />
|
||||
<field name="period" eval="30" />
|
||||
<field name="maintenance_duration" eval="2" />
|
||||
<field
|
||||
name="preventive_default_task_id"
|
||||
ref="maintenance_project.project_task_12"
|
||||
/>
|
||||
</record>
|
||||
<record id="equipment_3" model="maintenance.equipment">
|
||||
<field name="name">Generic Computer with own project</field>
|
||||
<field name="category_id" ref="maintenance.equipment_computer" />
|
||||
<field name="owner_user_id" ref="base.user_admin" />
|
||||
<field name="technician_user_id" ref="base.user_admin" />
|
||||
<field name="assign_date" eval="time.strftime('%Y-%m-10')" />
|
||||
<field name="serial_no">S/N 3</field>
|
||||
<field name="model">MODEL3</field>
|
||||
</record>
|
||||
<function
|
||||
model="maintenance.equipment"
|
||||
name="action_create_project"
|
||||
eval="[[ref('equipment_3')]]"
|
||||
/>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.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_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_form
|
||||
msgid "<span class=\"fa fa-plus\"/><span> Create project</span>"
|
||||
msgstr "<span class=\"fa fa-plus\"/><span> Kreiraj projekat</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Equipments</span>"
|
||||
msgstr "<span class=\"o_label\">Oprema</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Requests</span>"
|
||||
msgstr "<span class=\"o_label\">Zahtjevi</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Project:</strong>"
|
||||
msgstr "<strong>Projekat:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Task:</strong>"
|
||||
msgstr "<strong>Zadatak:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__preventive_default_task_id
|
||||
msgid "Default Task"
|
||||
msgstr "Podrazumijevani zadatak"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_count
|
||||
msgid "Equipment Count"
|
||||
msgstr "Broj opreme"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_ids
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Equipments"
|
||||
msgstr "Oprema"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,name:maintenance_project.project_project_1
|
||||
msgid "General equipment project"
|
||||
msgstr "Opšti projekat opreme"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_3
|
||||
msgid "Generic Computer with own project"
|
||||
msgstr "Generički računar sa vlastitim projektom"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_1
|
||||
msgid "Generic Monitor"
|
||||
msgstr "Generički monitor"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_2
|
||||
msgid "Generic Monitor with preventive"
|
||||
msgstr "Generički monitor sa preventivnim održavanjem"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Oprema za održavanje"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_request
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Zahtjev za održavanje"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_count
|
||||
msgid "Maintenance Request Count"
|
||||
msgstr "Broj zahtjeva za održavanje"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_ids
|
||||
msgid "Maintenance Requests"
|
||||
msgstr "Zahtjevi za održavanje"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_project_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__project_id
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__project_id
|
||||
msgid "Project"
|
||||
msgstr "Projekat"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_request_view_kanban
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_kanban
|
||||
msgid "Project:"
|
||||
msgstr "Projekat:"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Requests"
|
||||
msgstr "Zahtjevi"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__task_id
|
||||
msgid "Task"
|
||||
msgstr "Zadatak"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,label_tasks:maintenance_project.project_project_1
|
||||
msgid "Tasks"
|
||||
msgstr "Zadaci"
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 12.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2019-09-18 17:04+0000\n"
|
||||
"PO-Revision-Date: 2023-07-22 23:09+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: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_form
|
||||
msgid "<span class=\"fa fa-plus\"/><span> Create project</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Equipments</span>"
|
||||
msgstr "<span class=\"o_label\">Equipos</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Requests</span>"
|
||||
msgstr "<span class=\"o_label\">Peticiones</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Project:</strong>"
|
||||
msgstr "<strong>Proyecto:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Task:</strong>"
|
||||
msgstr "<strong>Tarea:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__preventive_default_task_id
|
||||
msgid "Default Task"
|
||||
msgstr "Tarea por defecto"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_count
|
||||
msgid "Equipment Count"
|
||||
msgstr "N??mero de equipos"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_ids
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Equipments"
|
||||
msgstr "Equipos"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,name:maintenance_project.project_project_1
|
||||
msgid "General equipment project"
|
||||
msgstr "Proyecto de equipamiento general"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_3
|
||||
msgid "Generic Computer with own project"
|
||||
msgstr "Ordenador gen??rico con su propio proyecto"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_1
|
||||
msgid "Generic Monitor"
|
||||
msgstr "Monitor gen??rico"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_2
|
||||
msgid "Generic Monitor with preventive"
|
||||
msgstr "Monitor gen??rico con preventivo"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Equipo"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_request
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Petici??n de mantenimiento"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_count
|
||||
msgid "Maintenance Request Count"
|
||||
msgstr "N??mero de peticiones de mantenimiento"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_ids
|
||||
msgid "Maintenance Requests"
|
||||
msgstr "Peticiones de mantenimiento"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_project_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__project_id
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__project_id
|
||||
msgid "Project"
|
||||
msgstr "Proyecto"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_request_view_kanban
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_kanban
|
||||
msgid "Project:"
|
||||
msgstr "Proyecto:"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Requests"
|
||||
msgstr "Peticiones"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__task_id
|
||||
msgid "Task"
|
||||
msgstr "Tarea"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,label_tasks:maintenance_project.project_project_1
|
||||
msgid "Tasks"
|
||||
msgstr "Tareas"
|
||||
|
||||
#~ msgid "Create Project From Equipment"
|
||||
#~ msgstr "Crear proyecto a partir del equipo"
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nombre a mostrar"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Última modificación en"
|
||||
|
|
@ -0,0 +1,138 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 14.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-12-31 16:06+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 5.6.2\n"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_form
|
||||
msgid "<span class=\"fa fa-plus\"/><span> Create project</span>"
|
||||
msgstr "<span class=\"fa fa-plus\"/><span> Crea progetto</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Equipments</span>"
|
||||
msgstr "<span class=\"o_label\">Attrezzature</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Requests</span>"
|
||||
msgstr "<span class=\"o_label\">Richieste</span>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Project:</strong>"
|
||||
msgstr "<strong>Progetto:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Task:</strong>"
|
||||
msgstr "<strong>Lavoro:</strong>"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__preventive_default_task_id
|
||||
msgid "Default Task"
|
||||
msgstr "Lavoro predefinito"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_count
|
||||
msgid "Equipment Count"
|
||||
msgstr "Conteggio attrezzature"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_ids
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Equipments"
|
||||
msgstr "Attrezzature"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,name:maintenance_project.project_project_1
|
||||
msgid "General equipment project"
|
||||
msgstr "Progetto attrezzatura generica"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_3
|
||||
msgid "Generic Computer with own project"
|
||||
msgstr "Computer generico con progetto proprio"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_1
|
||||
msgid "Generic Monitor"
|
||||
msgstr "Monitor generico"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_2
|
||||
msgid "Generic Monitor with preventive"
|
||||
msgstr "Monitor generico con preventiva"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr "Attrezzatura manutenzione"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_request
|
||||
msgid "Maintenance Request"
|
||||
msgstr "Richiesta manutenzione"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_count
|
||||
msgid "Maintenance Request Count"
|
||||
msgstr "Conta richiesta manutenzione"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_ids
|
||||
msgid "Maintenance Requests"
|
||||
msgstr "Richieste di manutenzione"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_project_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__project_id
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__project_id
|
||||
msgid "Project"
|
||||
msgstr "Progetto"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_request_view_kanban
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_kanban
|
||||
msgid "Project:"
|
||||
msgstr "Progetto:"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Requests"
|
||||
msgstr "Richieste"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__task_id
|
||||
msgid "Task"
|
||||
msgstr "Lavoro"
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,label_tasks:maintenance_project.project_project_1
|
||||
msgid "Tasks"
|
||||
msgstr "Lavori"
|
||||
|
||||
#~ msgid "Create Project From Equipment"
|
||||
#~ msgstr "Crea un progetto dall'attrezzatura"
|
||||
|
||||
#~ msgid "Display Name"
|
||||
#~ msgstr "Nome visualizzato"
|
||||
|
||||
#~ msgid "ID"
|
||||
#~ msgstr "ID"
|
||||
|
||||
#~ msgid "Last Modified on"
|
||||
#~ msgstr "Ultima modifica il"
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * maintenance_project
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.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_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_form
|
||||
msgid "<span class=\"fa fa-plus\"/><span> Create project</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Equipments</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.view_project_kanban
|
||||
msgid "<span class=\"o_label\">Requests</span>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Project:</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.report_maintenance_request_document
|
||||
msgid "<strong>Task:</strong>"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__preventive_default_task_id
|
||||
msgid "Default Task"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_count
|
||||
msgid "Equipment Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__equipment_ids
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Equipments"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,name:maintenance_project.project_project_1
|
||||
msgid "General equipment project"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_3
|
||||
msgid "Generic Computer with own project"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_1
|
||||
msgid "Generic Monitor"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:maintenance.equipment,name:maintenance_project.equipment_2
|
||||
msgid "Generic Monitor with preventive"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_equipment
|
||||
msgid "Maintenance Equipment"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_maintenance_request
|
||||
msgid "Maintenance Request"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_count
|
||||
msgid "Maintenance Request Count"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_project_project__maintenance_request_ids
|
||||
msgid "Maintenance Requests"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model,name:maintenance_project.model_project_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_equipment__project_id
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__project_id
|
||||
msgid "Project"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_request_view_kanban
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.hr_equipment_view_kanban
|
||||
msgid "Project:"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model_terms:ir.ui.view,arch_db:maintenance_project.edit_project
|
||||
msgid "Requests"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:ir.model.fields,field_description:maintenance_project.field_maintenance_request__task_id
|
||||
msgid "Task"
|
||||
msgstr ""
|
||||
|
||||
#. module: maintenance_project
|
||||
#: model:project.project,label_tasks:maintenance_project.project_project_1
|
||||
msgid "Tasks"
|
||||
msgstr ""
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
# Copyright 2024 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from openupgradelib import openupgrade
|
||||
|
||||
|
||||
@openupgrade.migrate()
|
||||
def migrate(env, version):
|
||||
env.ref("maintenance.group_equipment_manager").write(
|
||||
{"implied_ids": [(3, env.ref("project.group_project_manager").id)]}
|
||||
)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
from . import maintenance_equipment
|
||||
from . import maintenance_request
|
||||
from . import project_project
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright 2019 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# Copyright 2024 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class MaintenanceEquipment(models.Model):
|
||||
_inherit = "maintenance.equipment"
|
||||
|
||||
project_id = fields.Many2one(comodel_name="project.project", ondelete="restrict")
|
||||
preventive_default_task_id = fields.Many2one(
|
||||
string="Default Task", comodel_name="project.task"
|
||||
)
|
||||
|
||||
def action_create_project(self):
|
||||
self.ensure_one()
|
||||
if not self.project_id:
|
||||
self.project_id = self.env["project.project"].create(
|
||||
self._prepare_project_from_equipment_values()
|
||||
)
|
||||
|
||||
def _prepare_project_from_equipment_values(self):
|
||||
"""
|
||||
Default project data creation hook
|
||||
"""
|
||||
return {"name": self.name}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
# Copyright 2019 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MaintenanceRequest(models.Model):
|
||||
_inherit = "maintenance.request"
|
||||
|
||||
project_id = fields.Many2one(comodel_name="project.project")
|
||||
task_id = fields.Many2one(comodel_name="project.task")
|
||||
|
||||
@api.model_create_multi
|
||||
def create(self, vals_list):
|
||||
"""
|
||||
We ensure for appropiate project and task for new requests,
|
||||
specially the automatically generated ones
|
||||
"""
|
||||
newreqs = super().create(vals_list)
|
||||
for newreq in newreqs:
|
||||
if not newreq.project_id and newreq.equipment_id:
|
||||
newreq.project_id = newreq.equipment_id.project_id
|
||||
if not newreq.task_id and newreq.maintenance_type == "preventive":
|
||||
newreq.task_id = newreq.equipment_id.preventive_default_task_id
|
||||
|
||||
return newreqs
|
||||
|
||||
@api.onchange("equipment_id")
|
||||
def onchange_equipment_id(self):
|
||||
res = super().onchange_equipment_id()
|
||||
if self.equipment_id and self.equipment_id.project_id:
|
||||
self.project_id = self.equipment_id.project_id
|
||||
return res
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
# Copyright 2019 Solvos Consultoría Informática (<http://www.solvos.es>)
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class ProjectProject(models.Model):
|
||||
_inherit = "project.project"
|
||||
|
||||
equipment_count = fields.Integer(compute="_compute_equipment_count")
|
||||
equipment_ids = fields.One2many(
|
||||
"maintenance.equipment", "project_id", string="Equipments"
|
||||
)
|
||||
maintenance_request_count = fields.Integer(
|
||||
compute="_compute_maintenance_request_count"
|
||||
)
|
||||
maintenance_request_ids = fields.One2many(
|
||||
"maintenance.request", "project_id", string="Maintenance Requests"
|
||||
)
|
||||
|
||||
@api.depends("equipment_ids")
|
||||
def _compute_equipment_count(self):
|
||||
for project in self:
|
||||
project.equipment_count = len(project.equipment_ids)
|
||||
|
||||
def action_view_equipment_ids(self):
|
||||
"""
|
||||
Access to the current equipments for this project
|
||||
"""
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"maintenance.hr_equipment_action"
|
||||
)
|
||||
action["domain"] = [("project_id", "=", self.id)]
|
||||
action["context"] = {
|
||||
"default_project_id": self.id,
|
||||
"default_create_project_from_equipment": False,
|
||||
}
|
||||
return action
|
||||
|
||||
@api.depends("maintenance_request_ids")
|
||||
def _compute_maintenance_request_count(self):
|
||||
for project in self:
|
||||
project.maintenance_request_count = len(
|
||||
project.maintenance_request_ids.filtered(lambda x: not x.stage_id.done)
|
||||
)
|
||||
|
||||
def action_view_maintenance_request_ids(self):
|
||||
"""
|
||||
Access to the undone maintenance requests for this project
|
||||
"""
|
||||
self.ensure_one()
|
||||
action = self.env["ir.actions.actions"]._for_xml_id(
|
||||
"maintenance.hr_equipment_request_action"
|
||||
)
|
||||
action["domain"] = [("project_id", "=", self.id), ("stage_id.done", "=", False)]
|
||||
action["context"] = {"default_project_id": self.id}
|
||||
return action
|
||||
|
|
@ -0,0 +1 @@
|
|||
* David Alonso <david.alonso@solvos.es>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
This module extends the functionality of Odoo Maintenance module adding this features:
|
||||
|
||||
- Adds a project to an equipment. You can link an existing project or create a new one (with the Create project button) after creating the equipment.
|
||||
- Adds project and task to a maintenance request. The default project for a request will be the equipment one, including the preventive requests periodically created.
|
||||
|
||||
This is is a technical addon to allow timesheet assignment to a maintenance request.
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<template
|
||||
id="report_maintenance_request_document"
|
||||
inherit_id="base_maintenance.report_maintenance_request_document"
|
||||
>
|
||||
<xpath expr="//div[@id='schedule_informations']" position="after">
|
||||
<div class="row mt32 mb32" id="project_informations">
|
||||
<div t-if="doc.project_id" class="col-auto mw-100 mb-2">
|
||||
<strong>Project:</strong>
|
||||
<p class="m-0" t-field="doc.project_id" />
|
||||
</div>
|
||||
<div t-if="doc.task_id" class="col-auto mw-100 mb-2">
|
||||
<strong>Task:</strong>
|
||||
<p class="m-0" t-field="doc.task_id" />
|
||||
</div>
|
||||
</div>
|
||||
</xpath>
|
||||
</template>
|
||||
</odoo>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
|
|
@ -0,0 +1,428 @@
|
|||
<!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>Maintenance Projects</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" id="maintenance-projects">
|
||||
<h1 class="title">Maintenance Projects</h1>
|
||||
|
||||
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:d68a0f7d567eafa344eb212be0520f6c37c4dccc3ec106ebad8884fa57af3fa9
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<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/maintenance/tree/16.0/maintenance_project"><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-16-0/maintenance-16-0-maintenance_project"><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&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 extends the functionality of Odoo Maintenance module adding this features:</p>
|
||||
<ul class="simple">
|
||||
<li>Adds a project to an equipment. You can link an existing project or create a new one (with the Create project button) after creating the equipment.</li>
|
||||
<li>Adds project and task to a maintenance request. The default project for a request will be the equipment one, including the preventive requests periodically created.</li>
|
||||
</ul>
|
||||
<p>This is is a technical addon to allow timesheet assignment to a maintenance request.</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">
|
||||
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
|
||||
<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_project%0Aversion:%2016.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">
|
||||
<h1><a class="toc-backref" href="#toc-entry-2">Credits</a></h1>
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-3">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>Solvos</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="contributors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>David Alonso <<a class="reference external" href="mailto:david.alonso@solvos.es">david.alonso@solvos.es</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
|
||||
<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>This module is part of the <a class="reference external" href="https://github.com/OCA/maintenance/tree/16.0/maintenance_project">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>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
from . import test_maintenance_project
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
# Copyright 2019 Solvos Consultor??a Inform??tica (<http://www.solvos.es>)
|
||||
# Copyright 2024 Tecnativa - Víctor Martínez
|
||||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
|
||||
|
||||
from odoo.tests import Form, new_test_user
|
||||
from odoo.tests.common import users
|
||||
|
||||
from odoo.addons.base.tests.common import BaseCommon
|
||||
|
||||
|
||||
class TestMaintenanceProject(BaseCommon):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super().setUpClass()
|
||||
cls.cron = cls.env.ref("maintenance.maintenance_requests_cron")
|
||||
cls.project1 = cls.env["project.project"].create({"name": "My project"})
|
||||
cls.project_demo = cls.env.ref("maintenance_project.project_project_1")
|
||||
new_test_user(
|
||||
cls.env,
|
||||
login="test-user",
|
||||
groups="maintenance.group_equipment_manager,project.group_project_user",
|
||||
)
|
||||
new_test_user(
|
||||
cls.env,
|
||||
login="test-project_manager-user",
|
||||
groups="maintenance.group_equipment_manager,project.group_project_manager",
|
||||
)
|
||||
cls.equipment1 = cls.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "My equipment",
|
||||
"maintenance_team_id": cls.env.ref(
|
||||
"maintenance.equipment_team_metrology"
|
||||
).id,
|
||||
"period": 30,
|
||||
"maintenance_duration": 1.0,
|
||||
}
|
||||
)
|
||||
cls.equipment2 = cls.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "My equipment without project",
|
||||
}
|
||||
)
|
||||
cls.equipment3 = cls.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "My equipment with related project",
|
||||
"project_id": cls.project1.id,
|
||||
}
|
||||
)
|
||||
cls.equipment_demo = cls.env.ref("maintenance_project.equipment_3")
|
||||
|
||||
def test_maintenance_equipment_project_misc(self):
|
||||
self.assertFalse(self.equipment1.project_id)
|
||||
self.assertFalse(self.equipment2.project_id)
|
||||
self.assertEqual(self.equipment3.project_id, self.project1)
|
||||
self.assertEqual(self.equipment_demo.name, self.equipment_demo.project_id.name)
|
||||
|
||||
@users("test-project_manager-user")
|
||||
def test_maintenance_equipment_project_admin(self):
|
||||
equipment_a = self.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "Test equipment A",
|
||||
}
|
||||
)
|
||||
self.assertFalse(equipment_a.project_id)
|
||||
equipment_a.action_create_project()
|
||||
self.assertTrue(equipment_a.project_id)
|
||||
self.assertEqual(equipment_a.name, equipment_a.project_id.name)
|
||||
equipment_b = self.env["maintenance.equipment"].create(
|
||||
{
|
||||
"name": "Test equipment b",
|
||||
"project_id": self.project1.id,
|
||||
}
|
||||
)
|
||||
self.assertEqual(equipment_b.project_id, self.project1)
|
||||
equipment_b.action_create_project()
|
||||
self.assertEqual(equipment_b.project_id, self.project1)
|
||||
|
||||
def test_project_equipment_count(self):
|
||||
self.equipment1.action_create_project()
|
||||
self.assertEqual(self.project1.equipment_count, 1)
|
||||
self.assertEqual(self.equipment1.project_id.equipment_count, 1)
|
||||
self.assertEqual(self.project_demo.equipment_count, 2)
|
||||
self.assertEqual(self.equipment_demo.project_id.equipment_count, 1)
|
||||
|
||||
@users("test-user")
|
||||
def test_request_equipment(self):
|
||||
request_form_1 = Form(self.env["maintenance.request"])
|
||||
request_form_1.name = "My test request #1"
|
||||
self.assertFalse(request_form_1.project_id)
|
||||
request_form_1.equipment_id = self.equipment1
|
||||
self.assertEqual(request_form_1.project_id, self.equipment1.project_id)
|
||||
request_form_2 = Form(self.env["maintenance.request"])
|
||||
request_form_2.name = "My test request #2"
|
||||
request_form_2.equipment_id = self.equipment2
|
||||
self.assertFalse(request_form_2.project_id)
|
||||
|
||||
def test_generate_requests(self):
|
||||
self.cron.method_direct_trigger()
|
||||
generated_requests = self.env["maintenance.request"].search(
|
||||
[("project_id", "!=", False)]
|
||||
)
|
||||
for req in generated_requests:
|
||||
self.assertEqual(req.project_id, req.equipment_id.project_id)
|
||||
self.assertEqual(req.task_id, req.equipment_id.preventive_default_task_id)
|
||||
self.assertEqual(req.project_id.maintenance_request_count, 1)
|
||||
|
||||
def test_project_action_views(self):
|
||||
act1 = self.project1.action_view_equipment_ids()
|
||||
self.assertEqual(act1["domain"][0][2], self.project1.id)
|
||||
self.assertEqual(act1["context"]["default_project_id"], self.project1.id)
|
||||
self.assertFalse(act1["context"]["default_create_project_from_equipment"])
|
||||
act2 = self.project1.action_view_maintenance_request_ids()
|
||||
self.assertEqual(act2["domain"][0][2], self.project1.id)
|
||||
self.assertEqual(act2["context"]["default_project_id"], self.project1.id)
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_equipment_view_search" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='owner_user_id']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_view_tree" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_view_kanban" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='activity_state']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_kanban_record_body')]" position="inside">
|
||||
<div
|
||||
t-if="record.project_id.raw_value"
|
||||
groups="project.group_project_user"
|
||||
>
|
||||
<small>Project: <t t-raw="record.project_id.value" /></small>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_view_form" model="ir.ui.view">
|
||||
<field name="model">maintenance.equipment</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='location']" position="after">
|
||||
<field name="project_id" invisible="1" />
|
||||
<label for="project_id" groups="project.group_project_user" />
|
||||
<div>
|
||||
<field
|
||||
name="project_id"
|
||||
groups="project.group_project_user"
|
||||
class="oe_inline"
|
||||
/>
|
||||
<button
|
||||
name="action_create_project"
|
||||
groups="project.group_project_manager"
|
||||
type="object"
|
||||
class="oe_link"
|
||||
attrs="{'invisible': ['|', ('id', '=', False),('project_id', '!=', False)]}"
|
||||
>
|
||||
<span class="fa fa-plus" /><span> Create project</span>
|
||||
</button>
|
||||
</div>
|
||||
</xpath>
|
||||
<xpath expr="//group[@name='maintenance']" position="after">
|
||||
<group name="project_task">
|
||||
<field
|
||||
name="preventive_default_task_id"
|
||||
domain="[('project_id', '=', project_id)]"
|
||||
context="{'default_project_id': project_id}"
|
||||
groups="project.group_project_user"
|
||||
/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="hr_equipment_request_view_search" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_search" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='maintenance_team_id']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_request_view_tree" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_tree" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='category_id']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_request_view_kanban" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='activity_state']" position="after">
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_kanban_record_body')]" position="inside">
|
||||
<div
|
||||
t-if="record.project_id.raw_value"
|
||||
groups="project.group_project_user"
|
||||
>
|
||||
<small>Project: <t t-raw="record.project_id.value" /></small>
|
||||
</div>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="hr_equipment_request_view_form" model="ir.ui.view">
|
||||
<field name="model">maintenance.request</field>
|
||||
<field name="inherit_id" ref="maintenance.hr_equipment_request_view_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='priority']" position="after">
|
||||
<field name="project_id" invisible="1" />
|
||||
<field name="project_id" groups="project.group_project_user" />
|
||||
<field name="task_id" invisible="1" />
|
||||
<field
|
||||
name="task_id"
|
||||
domain="[('project_id', '=', project_id)]"
|
||||
context="{'default_project_id': project_id}"
|
||||
groups="project.group_project_user"
|
||||
/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="view_project_kanban" model="ir.ui.view">
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="project.view_project_kanban" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='rating_status']" position="after">
|
||||
<field
|
||||
name="equipment_count"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
/>
|
||||
<field
|
||||
name="maintenance_request_count"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
/>
|
||||
</xpath>
|
||||
<xpath expr="//div[hasclass('o_project_kanban_boxes')]" position="inside">
|
||||
<a
|
||||
class="o_project_kanban_box"
|
||||
name="action_view_equipment_ids"
|
||||
type="object"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
>
|
||||
<div>
|
||||
<span class="o_value">
|
||||
<t t-esc="record.equipment_count.value" />
|
||||
</span>
|
||||
<span class="o_label">Equipments</span>
|
||||
</div>
|
||||
</a>
|
||||
<a
|
||||
class="o_project_kanban_box"
|
||||
name="action_view_maintenance_request_ids"
|
||||
type="object"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
>
|
||||
<div>
|
||||
<span class="o_value">
|
||||
<t t-esc="record.maintenance_request_count.value" />
|
||||
</span>
|
||||
<span class="o_label">Requests</span>
|
||||
</div>
|
||||
</a>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
<record id="edit_project" model="ir.ui.view">
|
||||
<field name="model">project.project</field>
|
||||
<field name="inherit_id" ref="project.edit_project" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//div[@name='button_box']" position="inside">
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="action_view_equipment_ids"
|
||||
type="object"
|
||||
icon="fa-ticket"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
>
|
||||
<field
|
||||
string="Equipments"
|
||||
name="equipment_count"
|
||||
widget="statinfo"
|
||||
/>
|
||||
</button>
|
||||
<button
|
||||
class="oe_stat_button"
|
||||
name="action_view_maintenance_request_ids"
|
||||
type="object"
|
||||
icon="fa-tasks"
|
||||
groups="maintenance.group_equipment_manager"
|
||||
>
|
||||
<field
|
||||
string="Requests"
|
||||
name="maintenance_request_count"
|
||||
widget="statinfo"
|
||||
/>
|
||||
</button>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Add table
Add a link
Reference in a new issue