Skip to content

Commit fa1100b

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

16 files changed

Lines changed: 703 additions & 0 deletions

File tree

repair_sent/README.rst

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
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+
This new status is automatically tracked by the repair order so no
38+
manual action is required.
39+
40+
**Table of contents**
41+
42+
.. contents::
43+
:local:
44+
45+
Bug Tracker
46+
===========
47+
48+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/repair/issues>`_.
49+
In case of trouble, please check there if your issue has already been reported.
50+
If you spotted it first, help us to smash it by providing a detailed and welcomed
51+
`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**>`_.
52+
53+
Do not contact contributors directly about support or help with technical issues.
54+
55+
Credits
56+
=======
57+
58+
Authors
59+
-------
60+
61+
* ACSONE SA/NV
62+
63+
Contributors
64+
------------
65+
66+
- Nicolas Delbovier nicolas.delbovier@acsone.eu
67+
68+
Maintainers
69+
-----------
70+
71+
This module is maintained by the OCA.
72+
73+
.. image:: https://odoo-community.org/logo.png
74+
:alt: Odoo Community Association
75+
:target: https://odoo-community.org
76+
77+
OCA, or the Odoo Community Association, is a nonprofit organization whose
78+
mission is to support the collaborative development of Odoo features and
79+
promote its widespread use.
80+
81+
This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/16.0/repair_sent>`_ project on GitHub.
82+
83+
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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=[("draft",), ("sent", "Quotation Sent"), ("confirmed",)],
11+
ondelete={"sent": "set draft"},
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 (
18+
to_update_records := self.filtered(lambda ro: ro.state == "draft")
19+
):
20+
to_update_records.state = "sent"
21+
return res
22+
23+
def action_repair_confirm(self):
24+
"""Allow confirming repairs from 'sent' by temporarily shifting state."""
25+
self.write({"state": "draft"})
26+
res = super().action_repair_confirm()
27+
return res

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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Adds the "Quotation Sent" status to repair orders.
2+
3+
This new status is automatically tracked by the repair order so no manual action is required.
9.23 KB
Loading

0 commit comments

Comments
 (0)