Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4f17c65
[11.0][ADD] maintenance_request_sequence
Nov 13, 2019
2fade62
[12.0][MIG] maintenance_request_sequence
Jan 9, 2020
0614979
[IMP] maintenance_request_sequence: black, isort, prettier
Jul 16, 2020
f67165f
[13.0][MIG] maintenance_request_sequence
Jul 16, 2020
8baab95
Added translation using Weblate (Italian)
mymage Jul 28, 2021
0bb6c0e
Translated using Weblate (Italian)
mymage Jul 28, 2021
c498082
[IMP] maintenance_request_sequence: black, isort, prettier
mariadforgeflow Aug 18, 2021
19dc8af
[MIG] maintenance_request_sequence: Migration to 14.0
mariadforgeflow Aug 18, 2021
8dd2ffd
[MIG] maintenance_request_sequence: Migration to 15.0
olgamarcocb May 20, 2022
9194ecf
[UPD] Update maintenance_request_sequence.pot
Jul 12, 2022
d42dda4
[UPD] README.rst
OCA-git-bot Jul 12, 2022
d16a9f9
[IMP] maintenance_request_sequence: pre-commit stuff
Jun 14, 2023
140b1ce
[MIG] maintenance_request_sequence: Migration to 16.0
Jun 22, 2023
df263c7
[UPD] Update maintenance_request_sequence.pot
Jun 29, 2023
fc042ec
[UPD] README.rst
OCA-git-bot Jun 29, 2023
fe5994e
Update translation files
weblate Jun 29, 2023
ef7b33f
[UPD] README.rst
OCA-git-bot Sep 3, 2023
cae1967
[16.0][FIX] maintenance_request_sequence: add create_multi
kluna1998 Oct 23, 2024
f7baf74
[BOT] post-merge updates
OCA-git-bot Oct 24, 2024
579f240
[MIG] maintenance_request_sequence: Migration to 18.0
JordiBForgeFlow Jul 21, 2025
323a7f7
[UPD] Update maintenance_request_sequence.pot
Sep 4, 2025
c09bc32
[BOT] post-merge updates
OCA-git-bot Sep 4, 2025
1aecd9c
[MIG] maintenance_request_sequence: Migration to 19.0
MiquelRForgeFlow Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions maintenance_request_sequence/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
.. image:: https://odoo-community.org/readme-banner-image
:target: https://odoo-community.org/get-involved?utm_source=readme
:alt: Odoo Community Association

============================
Maintenance Request Sequence
============================

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

.. |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/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/19.0/maintenance_request_sequence
:alt: OCA/maintenance
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/maintenance-19-0/maintenance-19-0-maintenance_request_sequence
: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=19.0
:alt: Try me on Runboat

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

Adds a sequence field to maintenance teams. Maintenance requests will
follow the sequence of its team.

**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_sequence%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Creu Blanca

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

- Jaime Arroyo <jaime.arroyo@creublanca.es>
- Christian Ramos <c.ramos@binhex.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/19.0/maintenance_request_sequence>`_ project on GitHub.

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

{
"name": "Maintenance Request Sequence",
"summary": """
Adds sequence to maintenance requests""",
"version": "19.0.1.0.0",
"license": "AGPL-3",
"author": "Creu Blanca, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/maintenance",
"depends": ["maintenance"],
"data": [
"data/maintenance_request_data.xml",
"views/maintenance_team.xml",
"views/maintenance_request.xml",
],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo noupdate="1">
<record id="seq_maintenance_request_auto" model="ir.sequence">
<field name="name">Maintenance Request Default</field>
<field name="code">maintenance.request.default</field>
<field eval="5" name="padding" />
<field name="prefix">MR</field>
</record>
</odoo>
52 changes: 52 additions & 0 deletions maintenance_request_sequence/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-05-18 08:19+0000\n"
"Last-Translator: Enric Tobella <etobella@creublanca.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.10\n"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_request__code
msgid "Code"
msgstr "Código"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_request
msgid "Maintenance Request"
msgstr "Peticiones de mantenimiento"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_team
msgid "Maintenance Teams"
msgstr "Equipos de Mantenimiento"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid "Prefix for Team Reference"
msgstr "Prefijo por equipo"

#. module: maintenance_request_sequence
#: model:ir.model.fields,help:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid ""
"Prefix used to generate the internal reference for re created with this "
"category. If blank the default sequence will be used."
msgstr ""
"El prefijo se usará para generar la referencia interna de las peticiones "
"creadas en esta categoría. Si esta en blanco, se usará la secuencia por "
"defecto."

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__sequence_id
msgid "Team Sequence"
msgstr "Secuencia del equipo"
51 changes: 51 additions & 0 deletions maintenance_request_sequence/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2021-07-28 09:49+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.3.2\n"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_request__code
msgid "Code"
msgstr "Codice"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_request
msgid "Maintenance Request"
msgstr "Richiesta manutenzione"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_team
msgid "Maintenance Teams"
msgstr "Squadra manutenzione"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid "Prefix for Team Reference"
msgstr "Prefisso di riferimento squadra"

#. module: maintenance_request_sequence
#: model:ir.model.fields,help:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid ""
"Prefix used to generate the internal reference for re created with this "
"category. If blank the default sequence will be used."
msgstr ""
"Prefisso utilizzato per generare la referenza interna per la rigenerazione "
"con questa categoria. Se vuoto verrà utilizzata la sequenza predefinita."

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__sequence_id
msgid "Team Sequence"
msgstr "Sequenza squadra"
46 changes: 46 additions & 0 deletions maintenance_request_sequence/i18n/maintenance_request_sequence.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_sequence
#
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_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_request__code
msgid "Code"
msgstr ""

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_request
msgid "Maintenance Request"
msgstr ""

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_team
msgid "Maintenance Teams"
msgstr ""

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid "Prefix for Team Reference"
msgstr ""

#. module: maintenance_request_sequence
#: model:ir.model.fields,help:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid ""
"Prefix used to generate the internal reference for re created with this "
"category. If blank the default sequence will be used."
msgstr ""

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__sequence_id
msgid "Team Sequence"
msgstr ""
51 changes: 51 additions & 0 deletions maintenance_request_sequence/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * maintenance_request_sequence
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2020-06-23 22:10+0000\n"
"Last-Translator: Fernando Colus <fcolus1@gmail.com>\n"
"Language-Team: none\n"
"Language: pt_BR\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 3.10\n"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_request__code
msgid "Code"
msgstr "Código"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_request
msgid "Maintenance Request"
msgstr "Requisição de Manutenção"

#. module: maintenance_request_sequence
#: model:ir.model,name:maintenance_request_sequence.model_maintenance_team
msgid "Maintenance Teams"
msgstr "Equipes de Manutenção"

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid "Prefix for Team Reference"
msgstr "Prefixo para Referência da Equipe"

#. module: maintenance_request_sequence
#: model:ir.model.fields,help:maintenance_request_sequence.field_maintenance_team__code_prefix
msgid ""
"Prefix used to generate the internal reference for re created with this "
"category. If blank the default sequence will be used."
msgstr ""
"Prefixo usado para gerar a referência interna para recriar com esta "
"categoria. Se estiver em branco, a sequência padrão será usada."

#. module: maintenance_request_sequence
#: model:ir.model.fields,field_description:maintenance_request_sequence.field_maintenance_team__sequence_id
msgid "Team Sequence"
msgstr "Sequência da Equipe"
2 changes: 2 additions & 0 deletions maintenance_request_sequence/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import maintenance_request
from . import maintenance_team
24 changes: 24 additions & 0 deletions maintenance_request_sequence/models/maintenance_request.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class MaintenanceRequest(models.Model):
_inherit = "maintenance.request"
_rec_names_search = ["code"]

code = fields.Char(readonly=True, copy=False, default="/")

@api.model_create_multi
def create(self, vals_list):
for vals in vals_list:
if vals.get("code", "/") == "/":
team_id = vals.get("maintenance_team_id")
sequence = self.env["maintenance.team"].browse(
team_id
).sequence_id or self.env.ref(
"maintenance_request_sequence.seq_maintenance_request_auto"
)
vals["code"] = sequence.next_by_id()
return super().create(vals_list)
Loading
Loading