diff --git a/account_invoice_repair_info/README.rst b/account_invoice_repair_info/README.rst new file mode 100644 index 0000000..a4d574d --- /dev/null +++ b/account_invoice_repair_info/README.rst @@ -0,0 +1,27 @@ +.. 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 + +=========================== +Account Invoice Repair Info +=========================== + +* In invoice new field "Repair Order". + +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 +------------ +* Alfredo de la Fuente +* Ana Juaristi + +Do not contact contributors directly about support or help with technical issues. diff --git a/account_invoice_repair_info/__init__.py b/account_invoice_repair_info/__init__.py new file mode 100644 index 0000000..0650744 --- /dev/null +++ b/account_invoice_repair_info/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_invoice_repair_info/__manifest__.py b/account_invoice_repair_info/__manifest__.py new file mode 100644 index 0000000..b802c32 --- /dev/null +++ b/account_invoice_repair_info/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +{ + "name": "Account Invoice Repair Info", + "version": "14.0.1.0.0", + "category": "Inventory/Inventory", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "https://github.com/avanzosc/mrp-repair-addons", + "depends": ["account", "repair"], + "data": [ + "report/account_invoice_report.xml", + "views/account_move_views.xml", + ], + "installable": True, +} diff --git a/account_invoice_repair_info/i18n/account_invoice_repair_info.pot b/account_invoice_repair_info/i18n/account_invoice_repair_info.pot new file mode 100644 index 0000000..930a56d --- /dev/null +++ b/account_invoice_repair_info/i18n/account_invoice_repair_info.pot @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_repair_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-27 12:00+0000\n" +"PO-Revision-Date: 2024-11-27 12:00+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: account_invoice_repair_info +#: model_terms:ir.ui.view,arch_db:account_invoice_repair_info.report_invoice_document +msgid "Repair Order Lot:" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__display_name +msgid "Display Name" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__id +msgid "ID" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model,name:account_invoice_repair_info.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_bank_statement_line__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_payment__repair_order_id +msgid "Repair Order" +msgstr "" diff --git a/account_invoice_repair_info/i18n/en_GB.po b/account_invoice_repair_info/i18n/en_GB.po new file mode 100644 index 0000000..930a56d --- /dev/null +++ b/account_invoice_repair_info/i18n/en_GB.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_repair_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-27 12:00+0000\n" +"PO-Revision-Date: 2024-11-27 12:00+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: account_invoice_repair_info +#: model_terms:ir.ui.view,arch_db:account_invoice_repair_info.report_invoice_document +msgid "Repair Order Lot:" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__display_name +msgid "Display Name" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__id +msgid "ID" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model,name:account_invoice_repair_info.model_account_move +msgid "Journal Entry" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_bank_statement_line__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_payment__repair_order_id +msgid "Repair Order" +msgstr "" diff --git a/account_invoice_repair_info/i18n/es.po b/account_invoice_repair_info/i18n/es.po new file mode 100644 index 0000000..e82f1a3 --- /dev/null +++ b/account_invoice_repair_info/i18n/es.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_invoice_repair_info +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2024-11-27 12:01+0000\n" +"PO-Revision-Date: 2024-11-27 12:01+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: account_invoice_repair_info +#: model_terms:ir.ui.view,arch_db:account_invoice_repair_info.report_invoice_document +msgid "Repair Order Lot:" +msgstr "Lote orden reparación:" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__display_name +msgid "Display Name" +msgstr "Nombre mostrado" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__id +msgid "ID" +msgstr "" + +#. module: account_invoice_repair_info +#: model:ir.model,name:account_invoice_repair_info.model_account_move +msgid "Journal Entry" +msgstr "Asiento contable" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move____last_update +msgid "Last Modified on" +msgstr "Última modificación en" + +#. module: account_invoice_repair_info +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_bank_statement_line__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_move__repair_order_id +#: model:ir.model.fields,field_description:account_invoice_repair_info.field_account_payment__repair_order_id +msgid "Repair Order" +msgstr "Orden reparación" diff --git a/account_invoice_repair_info/models/__init__.py b/account_invoice_repair_info/models/__init__.py new file mode 100644 index 0000000..9c0a421 --- /dev/null +++ b/account_invoice_repair_info/models/__init__.py @@ -0,0 +1 @@ +from . import account_move diff --git a/account_invoice_repair_info/models/account_move.py b/account_invoice_repair_info/models/account_move.py new file mode 100644 index 0000000..3546678 --- /dev/null +++ b/account_invoice_repair_info/models/account_move.py @@ -0,0 +1,23 @@ +# Copyright 2024 Alfredo de la Fuente - AvanzOSC +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import api, fields, models + + +class AccountMove(models.Model): + _inherit = "account.move" + + repair_order_id = fields.Many2one( + string="Repair Order", + comodel_name="repair.order", + compute="_compute_repair_order_id", + store=True, + ) + + @api.depends("repair_ids") + def _compute_repair_order_id(self): + for move in self: + repair_order_id = self.env["repair.order"] + for repair in move.repair_ids: + repair_order_id = repair.id + move.repair_order_id = repair_order_id diff --git a/account_invoice_repair_info/report/account_invoice_report.xml b/account_invoice_repair_info/report/account_invoice_report.xml new file mode 100644 index 0000000..7a3f5a4 --- /dev/null +++ b/account_invoice_repair_info/report/account_invoice_report.xml @@ -0,0 +1,15 @@ + + + + diff --git a/account_invoice_repair_info/views/account_move_views.xml b/account_invoice_repair_info/views/account_move_views.xml new file mode 100644 index 0000000..b8fb190 --- /dev/null +++ b/account_invoice_repair_info/views/account_move_views.xml @@ -0,0 +1,38 @@ + + + + account.move + + + + + + + + + + account.move + + + + + + + + + + account.move + + + + + + + + + + diff --git a/setup/account_invoice_repair_info/odoo/addons/account_invoice_repair_info b/setup/account_invoice_repair_info/odoo/addons/account_invoice_repair_info new file mode 120000 index 0000000..1755eb5 --- /dev/null +++ b/setup/account_invoice_repair_info/odoo/addons/account_invoice_repair_info @@ -0,0 +1 @@ +../../../../account_invoice_repair_info \ No newline at end of file diff --git a/setup/account_invoice_repair_info/setup.py b/setup/account_invoice_repair_info/setup.py new file mode 100644 index 0000000..28c57bb --- /dev/null +++ b/setup/account_invoice_repair_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)