-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[14.0][ADD] repair_date_done: In repair order new field "Date Done".
- Loading branch information
1 parent
de55961
commit e7b1d99
Showing
11 changed files
with
214 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
|
||
================ | ||
Repair date done | ||
================ | ||
|
||
* In repair order new field "Date Done". When the repair is complete, the | ||
system date will be set in this field. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/mrp-repair-addons/issues>`_. In case of trouble, | ||
please check there if your issue has already been reported. If you spotted it | ||
first, help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Contributors | ||
------------ | ||
* Alfredo de la Fuente <[email protected]> | ||
* Ana Juaristi <[email protected]> | ||
|
||
Do not contact contributors directly about support or help with technical issues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Repair Date Done", | ||
"version": "14.0.1.0.0", | ||
"category": "Inventory/Inventory", | ||
"license": "AGPL-3", | ||
"author": "AvanzOSC", | ||
"website": "https://github.com/avanzosc/mrp-repair-addons", | ||
"depends": ["repair"], | ||
"data": [ | ||
"views/repair_order_views.xml", | ||
], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_date_done | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-27 12:27+0000\n" | ||
"PO-Revision-Date: 2024-11-27 12:27+0000\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: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__date_done | ||
msgid "Date Done" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model,name:repair_date_done.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_date_done | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-27 12:28+0000\n" | ||
"PO-Revision-Date: 2024-11-27 12:28+0000\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: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__date_done | ||
msgid "Date Done" | ||
msgstr "Fecha fin" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última modificación el" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model,name:repair_date_done.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Orden de reparación" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_date_done | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 14.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-11-27 12:27+0000\n" | ||
"PO-Revision-Date: 2024-11-27 12:27+0000\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: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__date_done | ||
msgid "Date Done" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model.fields,field_description:repair_date_done.field_repair_order____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: repair_date_done | ||
#: model:ir.model,name:repair_date_done.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import repair_order |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2024 Alfredo de la Fuente - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class RepairOrder(models.Model): | ||
_inherit = "repair.order" | ||
|
||
date_done = fields.Date(string="Date Done", copy=False) | ||
|
||
def action_repair_end(self): | ||
result = super(RepairOrder, self).action_repair_end() | ||
repairs = self.filtered(lambda x: x.state in ("done", "2binvoiced")) | ||
if repairs: | ||
repairs.write({"date_done": fields.Date.context_today(self)}) | ||
return result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
<record id="view_repair_order_form" model="ir.ui.view"> | ||
<field name="model">repair.order</field> | ||
<field name="inherit_id" ref="repair.view_repair_order_form" /> | ||
<field name="arch" type="xml"> | ||
<field name="location_id" position="before"> | ||
<field name="date_done" readonly="1" /> | ||
</field> | ||
</field> | ||
</record> | ||
|
||
<record id="view_repair_order_tree" model="ir.ui.view"> | ||
<field name="model">repair.order</field> | ||
<field name="inherit_id" ref="repair.view_repair_order_tree" /> | ||
<field name="arch" type="xml"> | ||
<field name="state" position="before"> | ||
<field name="date_done" readonly="1" optional="show" /> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../repair_date_done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |