Skip to content

Commit 49052f7

Browse files
[ADD] repair_sent: Adds the "Quotation Sent" status to repair orders
1 parent 2a9a2c5 commit 49052f7

16 files changed

Lines changed: 706 additions & 0 deletions

File tree

repair_sent/README.rst

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
5+
===========
6+
Repair Sent
7+
===========
8+
9+
..
10+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11+
!! This file is generated by oca-gen-addon-readme !!
12+
!! changes will be overwritten. !!
13+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14+
!! source digest: sha256:9e0bb9aa64538d2ecb745be721a686535c7c823623c80c6e44466d6c5351de57
15+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16+
17+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
18+
:target: https://odoo-community.org/page/development-status
19+
:alt: Beta
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
21+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
22+
:alt: License: AGPL-3
23+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frepair-lightgray.png?logo=github
24+
:target: https://github.com/OCA/repair/tree/16.0/repair_sent
25+
:alt: OCA/repair
26+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27+
:target: https://translation.odoo-community.org/projects/repair-16-0/repair-16-0-repair_sent
28+
:alt: Translate me on Weblate
29+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/repair&target_branch=16.0
31+
:alt: Try me on Runboat
32+
33+
|badge1| |badge2| |badge3| |badge4| |badge5|
34+
35+
Adds the "Quotation Sent" status to repair orders
36+
37+
**Table of contents**
38+
39+
.. contents::
40+
:local:
41+
42+
Bug Tracker
43+
===========
44+
45+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/repair/issues>`_.
46+
In case of trouble, please check there if your issue has already been reported.
47+
If you spotted it first, help us to smash it by providing a detailed and welcomed
48+
`feedback <https://github.com/OCA/repair/issues/new?body=module:%20repair_sent%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
49+
50+
Do not contact contributors directly about support or help with technical issues.
51+
52+
Credits
53+
=======
54+
55+
Authors
56+
-------
57+
58+
* ACSONE SA/NV
59+
60+
Contributors
61+
------------
62+
63+
- Nicolas Delbovier nicolas.delbovier@acsone.eu
64+
65+
Maintainers
66+
-----------
67+
68+
This module is maintained by the OCA.
69+
70+
.. image:: https://odoo-community.org/logo.png
71+
:alt: Odoo Community Association
72+
:target: https://odoo-community.org
73+
74+
OCA, or the Odoo Community Association, is a nonprofit organization whose
75+
mission is to support the collaborative development of Odoo features and
76+
promote its widespread use.
77+
78+
This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/16.0/repair_sent>`_ project on GitHub.
79+
80+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

repair_sent/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from . import models
2+
from . import wizards

repair_sent/__manifest__.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright 2026 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Repair Sent",
6+
"summary": """Adds the "Quotation Sent" status to repair orders""",
7+
"version": "16.0.1.0.0",
8+
"license": "AGPL-3",
9+
"author": "ACSONE SA/NV,Odoo Community Association (OCA)",
10+
"website": "https://github.com/OCA/repair",
11+
"depends": ["repair"],
12+
"data": [
13+
"views/repair_order.xml",
14+
],
15+
"demo": [],
16+
}

repair_sent/models/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import repair_order

repair_sent/models/repair_order.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2026 ACSONE SA/NV
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
from odoo import fields, models
5+
6+
7+
class RepairOrder(models.Model):
8+
_inherit = "repair.order"
9+
state = fields.Selection(
10+
selection_add=[("confirmed",), ("sent", "Quotation Sent"), ("done",)],
11+
ondelete={"sent": "set confirmed"},
12+
)
13+
quotation_sent = fields.Boolean(readonly=True)
14+
15+
def write(self, vals):
16+
res = super().write(vals)
17+
if vals.get("quotation_sent") and self.state in ("draft", "confirmed"):
18+
self.state = "sent"
19+
return res
20+
21+
def action_send_mail(self):
22+
return super().action_send_mail()
23+
24+
def action_repair_start(self):
25+
"""Allow starting repairs from 'sent' by temporarily shifting state."""
26+
sent_repairs = self.filtered(lambda r: r.state == "sent")
27+
28+
if sent_repairs:
29+
sent_repairs.update({"state": "confirmed"})
30+
31+
try:
32+
return super().action_repair_start()
33+
except Exception:
34+
if sent_repairs:
35+
sent_repairs.update({"state": "sent"})
36+
raise

repair_sent/readme/CONTRIBUTORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Nicolas Delbovier <nicolas.delbovier@acsone.eu>

repair_sent/readme/DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds the "Quotation Sent" status to repair orders
9.23 KB
Loading

0 commit comments

Comments
 (0)