From e077761568a4a51c2772aa122e53840c07e7003b Mon Sep 17 00:00:00 2001 From: Unai Beristain Date: Thu, 26 Dec 2024 18:06:48 +0100 Subject: [PATCH] [DEL] repair_order_type --- repair_order_type/README.rst | 30 ---- repair_order_type/__init__.py | 1 - repair_order_type/__manifest__.py | 21 --- repair_order_type/data/default_type.xml | 7 - repair_order_type/i18n/es.po | 139 ------------------ repair_order_type/i18n/repair_order_type.pot | 139 ------------------ repair_order_type/models/__init__.py | 4 - repair_order_type/models/repair_line.py | 18 --- repair_order_type/models/repair_order.py | 49 ------ repair_order_type/models/repair_order_type.py | 32 ---- repair_order_type/models/stock_location.py | 9 -- .../security/ir.model.access.csv | 2 - .../views/repair_order_type_view.xml | 136 ----------------- repair_order_type/views/repair_order_view.xml | 44 ------ .../views/stock_location_view.xml | 22 --- .../odoo/addons/repair_order_type | 1 - setup/repair_order_type/setup.py | 6 - 17 files changed, 660 deletions(-) delete mode 100644 repair_order_type/README.rst delete mode 100644 repair_order_type/__init__.py delete mode 100644 repair_order_type/__manifest__.py delete mode 100644 repair_order_type/data/default_type.xml delete mode 100644 repair_order_type/i18n/es.po delete mode 100644 repair_order_type/i18n/repair_order_type.pot delete mode 100644 repair_order_type/models/__init__.py delete mode 100644 repair_order_type/models/repair_line.py delete mode 100644 repair_order_type/models/repair_order.py delete mode 100644 repair_order_type/models/repair_order_type.py delete mode 100644 repair_order_type/models/stock_location.py delete mode 100644 repair_order_type/security/ir.model.access.csv delete mode 100644 repair_order_type/views/repair_order_type_view.xml delete mode 100644 repair_order_type/views/repair_order_view.xml delete mode 100644 repair_order_type/views/stock_location_view.xml delete mode 120000 setup/repair_order_type/odoo/addons/repair_order_type delete mode 100644 setup/repair_order_type/setup.py diff --git a/repair_order_type/README.rst b/repair_order_type/README.rst deleted file mode 100644 index 7600a48..0000000 --- a/repair_order_type/README.rst +++ /dev/null @@ -1,30 +0,0 @@ -.. 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 -`_. 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 -* Alfredo de la Fuente -* Berezi Amubieta - -Do not contact contributors directly about support or help with technical issues. diff --git a/repair_order_type/__init__.py b/repair_order_type/__init__.py deleted file mode 100644 index 0650744..0000000 --- a/repair_order_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from . import models diff --git a/repair_order_type/__manifest__.py b/repair_order_type/__manifest__.py deleted file mode 100644 index 2b88c1f..0000000 --- a/repair_order_type/__manifest__.py +++ /dev/null @@ -1,21 +0,0 @@ -# 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": "https://github.com/avanzosc/mrp-repair-addons", - "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, -} diff --git a/repair_order_type/data/default_type.xml b/repair_order_type/data/default_type.xml deleted file mode 100644 index c694d52..0000000 --- a/repair_order_type/data/default_type.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - Normal Order - - - diff --git a/repair_order_type/i18n/es.po b/repair_order_type/i18n/es.po deleted file mode 100644 index fef4ddc..0000000 --- a/repair_order_type/i18n/es.po +++ /dev/null @@ -1,139 +0,0 @@ -# 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" - diff --git a/repair_order_type/i18n/repair_order_type.pot b/repair_order_type/i18n/repair_order_type.pot deleted file mode 100644 index 387bb33..0000000 --- a/repair_order_type/i18n/repair_order_type.pot +++ /dev/null @@ -1,139 +0,0 @@ -# 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 "" - diff --git a/repair_order_type/models/__init__.py b/repair_order_type/models/__init__.py deleted file mode 100644 index f887427..0000000 --- a/repair_order_type/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -from . import repair_order_type -from . import repair_order -from . import repair_line -from . import stock_location diff --git a/repair_order_type/models/repair_line.py b/repair_order_type/models/repair_line.py deleted file mode 100644 index 5f11ea4..0000000 --- a/repair_order_type/models/repair_line.py +++ /dev/null @@ -1,18 +0,0 @@ -# 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): - res = super().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 - return res diff --git a/repair_order_type/models/repair_order.py b/repair_order_type/models/repair_order.py deleted file mode 100644 index 6677811..0000000 --- a/repair_order_type/models/repair_order.py +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 2022 Berezi Amubieta - AvanzOSC -# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import api, fields, models - - -class RepairOrder(models.Model): - _inherit = "repair.order" - - def _get_order_type(self): - return self.env["repair.order.type"].search([], limit=1) - - name = fields.Char(default="/") - type_id = fields.Many2one( - comodel_name="repair.order.type", - string="Type", - default=_get_order_type, - required=True, - readonly=True, - states={"draft": [("readonly", False)]}, - ) - - @api.onchange("type_id") - def onchange_location_id(self): - if self.type_id and self.type_id.reparation_location_id: - self.location_id = self.type_id.reparation_location_id.id - - @api.model - def create(self, vals): - if vals.get("name", "/") == "/" and vals.get("type_id"): - repair_type = self.env["repair.order.type"].browse(vals["type_id"]) - if hasattr(repair_type, "sequence_id") and repair_type.sequence_id: - vals["name"] = repair_type.sequence_id.next_by_id() - return super().create(vals) - - def write(self, vals): - if vals.get("type_id"): - repair_type = self.env["repair.order.type"].browse(vals["type_id"]) - if repair_type.sequence_id: - for record in self: - if (record.state in {"draft"}) and ( - record.type_id.sequence_id != (repair_type.sequence_id) - ): - new_vals = vals.copy() - new_vals["name"] = repair_type.sequence_id.next_by_id() - super(RepairOrder, record).write(new_vals) - else: - super(RepairOrder, record).write(vals) - return True - return super().write(vals) diff --git a/repair_order_type/models/repair_order_type.py b/repair_order_type/models/repair_order_type.py deleted file mode 100644 index c517b4f..0000000 --- a/repair_order_type/models/repair_order_type.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2022 Berezi Amubieta - AvanzOSC -# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import api, fields, models - - -class RepairOrderType(models.Model): - _name = "repair.order.type" - _description = "Repair Order Type" - _order = "sequence" - - @api.model - def _get_domain_sequence_id(self): - seq_type = self.env.ref("repair.seq_repair") - return [("code", "=", seq_type.code)] - - name = fields.Char(required=True) - sequence = fields.Integer() - sequence_id = fields.Many2one( - comodel_name="ir.sequence", - string="Entry Sequence", - copy=False, - domain=_get_domain_sequence_id, - ) - reparation_location_id = fields.Many2one( - string="Reparation Location", comodel_name="stock.location" - ) - location_id = fields.Many2one( - string="Location Origin", comodel_name="stock.location" - ) - location_dest_id = fields.Many2one( - string="Destination Location", comodel_name="stock.location" - ) diff --git a/repair_order_type/models/stock_location.py b/repair_order_type/models/stock_location.py deleted file mode 100644 index b04f755..0000000 --- a/repair_order_type/models/stock_location.py +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2022 Berezi Amubieta - AvanzOSC -# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html -from odoo import fields, models - - -class StockLocation(models.Model): - _inherit = "stock.location" - - repair_eligible = fields.Boolean(string="Eligible in Repairs", default=False) diff --git a/repair_order_type/security/ir.model.access.csv b/repair_order_type/security/ir.model.access.csv deleted file mode 100644 index 33ed66e..0000000 --- a/repair_order_type/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_repair_order_type,repair.order.type,model_repair_order_type,stock.group_stock_user,1,1,1,1 diff --git a/repair_order_type/views/repair_order_type_view.xml b/repair_order_type/views/repair_order_type_view.xml deleted file mode 100644 index 52deada..0000000 --- a/repair_order_type/views/repair_order_type_view.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - repair.order.type.form.view - repair.order.type - -
- - -
-
-
- - - - - - - - - - -
-
-
-
- - - repair.order.type.tree.view - repair.order.type - - - - - - - - - - - - - - repair.order.type.search.view - repair.order.type - - - - - - - - - - - - - - - - - - - Repair Order Types - repair.order.type - form,tree - - -

Click to set a new type for repair order.

-
-
- - - - form - - - - - - - tree - - - - - - - - -
diff --git a/repair_order_type/views/repair_order_view.xml b/repair_order_type/views/repair_order_view.xml deleted file mode 100644 index 4db3c66..0000000 --- a/repair_order_type/views/repair_order_view.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - repair.order - - - - [('repair_eligible', '=', True)] - - - - - - [('repair_eligible', '=', True)] - - - [('repair_eligible', '=', True)] - - - - - - repair.order - - - - - - - - - - - diff --git a/repair_order_type/views/stock_location_view.xml b/repair_order_type/views/stock_location_view.xml deleted file mode 100644 index bbfbf7c..0000000 --- a/repair_order_type/views/stock_location_view.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - stock.location - - - - - - - - - - stock.location - - - - - - - - diff --git a/setup/repair_order_type/odoo/addons/repair_order_type b/setup/repair_order_type/odoo/addons/repair_order_type deleted file mode 120000 index 090063b..0000000 --- a/setup/repair_order_type/odoo/addons/repair_order_type +++ /dev/null @@ -1 +0,0 @@ -../../../../repair_order_type \ No newline at end of file diff --git a/setup/repair_order_type/setup.py b/setup/repair_order_type/setup.py deleted file mode 100644 index 28c57bb..0000000 --- a/setup/repair_order_type/setup.py +++ /dev/null @@ -1,6 +0,0 @@ -import setuptools - -setuptools.setup( - setup_requires=['setuptools-odoo'], - odoo_addon=True, -)