-
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.
[16.0][MIG] repair_order_type: Migration to 16.0 (#81)
* [ADD] repair_order_type: New object repair order type. (#72) Co-authored-by: Tu Nombre <[email protected]> * [FIX] repair_order_type: sequence goes up twice (#75) * [MIG] repair_order_type: Migration to 16.0 * [MIG] repair_order_type: Migration to 16.0 --------- Co-authored-by: Berezi <[email protected]> Co-authored-by: Tu Nombre <[email protected]> Co-authored-by: oihane <[email protected]>
- Loading branch information
1 parent
25e624a
commit 3cf4257
Showing
15 changed files
with
613 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,30 @@ | ||
.. 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 Order Type | ||
================= | ||
|
||
* New object repair order type. | ||
* A field to this new object in repair order. | ||
* If this field is not null, the repair will be numbered according to the sequence in this field. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/avanzosc/mrp-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 | ||
------------ | ||
* Ana Juaristi <[email protected]> | ||
* Alfredo de la Fuente <[email protected]> | ||
* Berezi Amubieta <[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,21 @@ | ||
# Copyright 2022 Berezi Amubieta - AvanzOSC | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). | ||
{ | ||
"name": "Repair Order Type", | ||
"version": "16.0.1.0.0", | ||
"category": "Manufacturing", | ||
"author": "AvanzOSC", | ||
"website": "http://www.avanzosc.es", | ||
"license": "AGPL-3", | ||
"depends": [ | ||
'repair', | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"data/default_type.xml", | ||
"views/repair_order_view.xml", | ||
"views/repair_order_type_view.xml", | ||
"views/stock_location_view.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,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<odoo noupdate="1"> | ||
<record id="normal_repair_type" model="repair.order.type"> | ||
<field name="name">Normal Order</field> | ||
<field name="sequence_id" ref="repair.seq_repair"/> | ||
</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,139 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_type | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-02-25 07:27+0000\n" | ||
"PO-Revision-Date: 2022-02-25 07: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_order_type | ||
#: model_terms:ir.actions.act_window,help:repair_order_type.repair_order_type_action | ||
msgid "Click to set a new type for repair order." | ||
msgstr "Haga clic para establecer un nuevo tipo de orden de reparación." | ||
|
||
#. module: repair_order_type | ||
#: model:ir.ui.menu,name:repair_order_type.menu_repair_configuration | ||
msgid "Configuration" | ||
msgstr "Configuración" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__create_uid | ||
msgid "Created by" | ||
msgstr "Creado por" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__create_date | ||
msgid "Created on" | ||
msgstr "Creado el" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__location_dest_id | ||
msgid "Destination Location" | ||
msgstr "Ubicación destino" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_stock_location__repair_eligible | ||
msgid "Eligible in Repairs" | ||
msgstr "Elegible en reparaciones" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__sequence_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Entry Sequence" | ||
msgstr "Secuencia del asiento" | ||
|
||
#. module: repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Group By" | ||
msgstr "Agrupar por" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_stock_location | ||
msgid "Inventory Locations" | ||
msgstr "Ubicaciones de inventario" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type____last_update | ||
msgid "Last Modified on" | ||
msgstr "Última modificación en" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__write_uid | ||
msgid "Last Updated by" | ||
msgstr "Última actualización por" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__write_date | ||
msgid "Last Updated on" | ||
msgstr "Última actualización el" | ||
|
||
#. module: repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Location Destination" | ||
msgstr "Ubicación destino" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__location_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Location Origin" | ||
msgstr "Ubicación origen" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__name | ||
msgid "Name" | ||
msgstr "Nombre" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_line | ||
msgid "Repair Line (parts)" | ||
msgstr "Línea de Reparación (partes)" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "Orden de reparación" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.view_repair_order_form_filter | ||
msgid "Repair Order Type" | ||
msgstr "Tipo de orden de reparación" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.actions.act_window,name:repair_order_type.repair_order_type_action | ||
#: model:ir.ui.menu,name:repair_order_type.repair_order_type_menu | ||
msgid "Repair Order Types" | ||
msgstr "Tipos de orden de reparación" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__reparation_location_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Reparation Location" | ||
msgstr "Ubicación de la reparación" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order__type_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_form_view | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Type" | ||
msgstr "Tipo" | ||
|
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,139 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * repair_order_type | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 12.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2022-02-25 07:27+0000\n" | ||
"PO-Revision-Date: 2022-02-25 07: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_order_type | ||
#: model_terms:ir.actions.act_window,help:repair_order_type.repair_order_type_action | ||
msgid "Click to set a new type for repair order." | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.ui.menu,name:repair_order_type.menu_repair_configuration | ||
msgid "Configuration" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__create_uid | ||
msgid "Created by" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__create_date | ||
msgid "Created on" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__location_dest_id | ||
msgid "Destination Location" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__display_name | ||
msgid "Display Name" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_stock_location__repair_eligible | ||
msgid "Eligible in Repairs" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__sequence_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Entry Sequence" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Group By" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_stock_location | ||
msgid "Inventory Locations" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type____last_update | ||
msgid "Last Modified on" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__write_uid | ||
msgid "Last Updated by" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__write_date | ||
msgid "Last Updated on" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Location Destination" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__location_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Location Origin" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__name | ||
msgid "Name" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_line | ||
msgid "Repair Line (parts)" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_order | ||
msgid "Repair Order" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model,name:repair_order_type.model_repair_order_type | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.view_repair_order_form_filter | ||
msgid "Repair Order Type" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.actions.act_window,name:repair_order_type.repair_order_type_action | ||
#: model:ir.ui.menu,name:repair_order_type.repair_order_type_menu | ||
msgid "Repair Order Types" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order_type__reparation_location_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Reparation Location" | ||
msgstr "" | ||
|
||
#. module: repair_order_type | ||
#: model:ir.model.fields,field_description:repair_order_type.field_repair_order__type_id | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_form_view | ||
#: model_terms:ir.ui.view,arch_db:repair_order_type.repair_order_type_search_view | ||
msgid "Type" | ||
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,4 @@ | ||
from . import repair_order_type | ||
from . import repair_order | ||
from . import repair_line | ||
from . import stock_location |
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 2022 Berezi Amubieta - AvanzOSC | ||
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html | ||
from odoo import api, models | ||
|
||
|
||
class RepairLine(models.Model): | ||
_inherit = 'repair.line' | ||
|
||
@api.onchange('type', 'repair_id', 'repair_id.type_id') | ||
def onchange_operation_type(self): | ||
super(RepairLine, self).onchange_operation_type() | ||
if self.type == 'add': | ||
self.location_id = self.repair_id.type_id.location_id.id | ||
self.location_dest_id = self.repair_id.type_id.location_dest_id.id | ||
else: | ||
self.location_id = self.repair_id.type_id.location_dest_id.id | ||
self.location_dest_id = self.repair_id.type_id.location_id.id |
Oops, something went wrong.