Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] repair_type_product_destination: Migration to 18.0 #79

Open
wants to merge 7 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions repair_type_product_destination/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
=================================
Repair Type - Product Destination
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:841f2e7afbe4c6e48966faef1044973142b77bb7a11d8be86488044a4fd7cad5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Frepair-lightgray.png?logo=github
:target: https://github.com/OCA/repair/tree/18.0/repair_type_product_destination
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-18-0/repair-18-0-repair_type_product_destination
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/repair&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This is a technical module, and it does not provide any new
functionality on its own. Due to the way transfers of repaired products
work in Odoo, the following fields will not have any effect without
additional code modifications.

This module introduces a **Product Destination Location field** in the
repair order. The default value for this field is computed from the
**Default Product Destination Location field of the associated Operation
Type**.

This module essentially serves as a template, providing the groundwork
for further customization. To make use of the functionality it
introduces, extend this module to implement additional features in the
repair transfer workflow.

**Table of contents**

.. contents::
:local:

Usage
=====

The following fields are available in the Repair module:

1. **Product Destination Location**

- Repairs > Orders > Select or create an order > Miscellaneous > Product
Destination Location

2. **Default Product Destination Location**

- Repairs > Orders > Select or create an order > Miscellaneous >
Operation Type > Default Product Destination Location

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/repair/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/repair/issues/new?body=module:%20repair_type_product_destination%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* APSL-Nagarro

Contributors
------------

- `APSL-Nagarro <https://www.apsl.tech>`__:

- Patryk Pyczko <ppyczko@apsl.net>

- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ppyczko| image:: https://github.com/ppyczko.png?size=40px
:target: https://github.com/ppyczko
:alt: ppyczko

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ppyczko|

This module is part of the `OCA/repair <https://github.com/OCA/repair/tree/18.0/repair_type_product_destination>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions repair_type_product_destination/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
16 changes: 16 additions & 0 deletions repair_type_product_destination/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 Patryk Pyczko (APSL-Nagarro)<ppyczko@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Repair Type - Product Destination",
"version": "18.0.1.0.0",
"category": "Repair",
"website": "https://github.com/OCA/repair",
"author": "APSL-Nagarro, Odoo Community Association (OCA)",
"maintainers": ["ppyczko"],
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["repair"],
"data": ["views/repair_views.xml", "views/stock_picking_type_views.xml"],
}
51 changes: 51 additions & 0 deletions repair_type_product_destination/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_type_product_destination
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 13:39+0000\n"
"PO-Revision-Date: 2024-11-28 13:39+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid "Default Product Destination Location"
msgstr "Ubicació de destinació per defecte del producte"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipus de picking"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "Product Destination Location"
msgstr "Ubicació de destinació del producte"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_repair_order
msgid "Repair Order"
msgstr "Ordre de reparació"

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid ""
"This is the default product destination location where the repaired product "
"will be stored.."
msgstr ""
"Aquesta és la ubicació per defecte de destinació del producte on "
"s'emmagatzemarà el producte reparat."

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "This is the location where the repaired product will be stored."
msgstr "Aquesta és la ubicació on s'emmagatzemarà el producte reparat."
51 changes: 51 additions & 0 deletions repair_type_product_destination/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_type_product_destination
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-28 13:39+0000\n"
"PO-Revision-Date: 2024-11-28 13:39+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid "Default Product Destination Location"
msgstr "Ubicación de destino por defecto del producto"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipo de picking"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "Product Destination Location"
msgstr "Ubicación de destino del producto"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_repair_order
msgid "Repair Order"
msgstr "Orden de reparación"

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid ""
"This is the default product destination location where the repaired product "
"will be stored.."
msgstr ""
"Esta es la ubicación predeterminada de destino del producto donde se "
"almacenará el producto reparado."

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "This is the location where the repaired product will be stored."
msgstr "Esta es la ubicación donde se almacenará el producto reparado."
51 changes: 51 additions & 0 deletions repair_type_product_destination/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_type_product_destination
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-12-06 19:06+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid "Default Product Destination Location"
msgstr "Ubicazione predefinita destinazione prodotto"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_stock_picking_type
msgid "Picking Type"
msgstr "Tipo prelievo"

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "Product Destination Location"
msgstr "Ubicazione destinazione prodotto"

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_repair_order
msgid "Repair Order"
msgstr "Ordine di riparazione"

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid ""
"This is the default product destination location where the repaired product "
"will be stored.."
msgstr ""
"Questa è l'ubicazione di destinazione predefinita del prodotto in cui verrà "
"depositato il prodotto riparato."

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "This is the location where the repaired product will be stored."
msgstr "Questo è l'ubicazione in cui verrà depositato il prodotto riparato."
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_type_product_destination
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \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_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid "Default Product Destination Location"
msgstr ""

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_stock_picking_type
msgid "Picking Type"
msgstr ""

#. module: repair_type_product_destination
#: model:ir.model.fields,field_description:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "Product Destination Location"
msgstr ""

#. module: repair_type_product_destination
#: model:ir.model,name:repair_type_product_destination.model_repair_order
msgid "Repair Order"
msgstr ""

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_stock_picking_type__default_product_location_dest_id
msgid ""
"This is the default product destination location where the repaired product "
"will be stored.."
msgstr ""

#. module: repair_type_product_destination
#: model:ir.model.fields,help:repair_type_product_destination.field_repair_order__product_location_dest_id
msgid "This is the location where the repaired product will be stored."
msgstr ""
4 changes: 4 additions & 0 deletions repair_type_product_destination/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import repair
from . import stock_picking_type
27 changes: 27 additions & 0 deletions repair_type_product_destination/models/repair.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2024 Patryk Pyczko (APSL-Nagarro)<ppyczko@apsl.net>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class RepairOrder(models.Model):
_inherit = "repair.order"

product_location_dest_id = fields.Many2one(
"stock.location",
"Product Destination Location",
compute="_compute_product_location_dest_id",
store=True,
required=True,
precompute=True,
index=True,
check_company=True,
help="This is the location where the repaired product will be stored.",
)

@api.depends("picking_type_id")
def _compute_product_location_dest_id(self):
for repair in self:
repair.product_location_dest_id = (
repair.picking_type_id.default_product_location_dest_id
)
Loading
Loading