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

[16.0][MIG] repair_type_refurbish: Migration to 16.0 #34

Merged
merged 6 commits into from
Mar 26, 2024
Merged
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
94 changes: 94 additions & 0 deletions repair_type_refurbish/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
=====================
Repair Type Refurbish
=====================

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

.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
:target: https://odoo-community.org/page/development-status
:alt: Alpha
.. |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/15.0/repair_type_refurbish
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-15-0/repair-15-0-repair_type_refurbish
: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=15.0
:alt: Try me on Runboat

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

Add the default refurbish locations to the repair type, same as repair type does with the standard location
fields.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Only for development or testing purpose, do not use in production.
`More details on development status <https://odoo-community.org/page/development-status>`_

**Table of contents**

.. contents::
:local:

Configuration
=============

No configuration needed for this module.

Usage
=====

Go to Configuration>Repair Types and add the refurbish 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_refurbish%0Aversion:%2015.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
~~~~~~~

* ForgeFlow

Contributors
~~~~~~~~~~~~

* `ForgeFlow <https://forgeflow.com>`_:

* Aaron Henriquez <[email protected]>

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.

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions repair_type_refurbish/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
18 changes: 18 additions & 0 deletions repair_type_refurbish/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2023 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

{
"name": "Repair Type Refurbish",
"version": "16.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/repair",
"summary": "Repair type",
"category": "Repair",
"depends": ["repair_type", "repair_refurbish"],
"data": [
"views/repair_type.xml",
],
"installable": True,
"development_status": "Alpha",
"license": "AGPL-3",
}
39 changes: 39 additions & 0 deletions repair_type_refurbish/i18n/repair_type_refurbish.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_type_refurbish
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.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_refurbish
#: model:ir.model.fields,field_description:repair_type_refurbish.field_repair_type__refurbish_location_dest_id
msgid "Refurbish destination Location"
msgstr ""

#. module: repair_type_refurbish
#: model:ir.model.fields,field_description:repair_type_refurbish.field_repair_order__refurbish_location_dest_id
msgid "Refurbished Delivery Location"
msgstr ""

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

#. module: repair_type_refurbish
#: model:ir.model,name:repair_type_refurbish.model_repair_type
msgid "Repair Type"
msgstr ""

#. module: repair_type_refurbish
#: model:ir.model.fields,help:repair_type_refurbish.field_repair_type__refurbish_location_dest_id
msgid "This is the location where the refurbished product will be send"
msgstr ""
2 changes: 2 additions & 0 deletions repair_type_refurbish/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import repair
from . import repair_type
20 changes: 20 additions & 0 deletions repair_type_refurbish/models/repair.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

from odoo import api, fields, models


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

refurbish_location_dest_id = fields.Many2one(
compute="_compute_refurbish_location_dest_id", store=True, readonly=False
)

@api.depends("repair_type_id")
def _compute_refurbish_location_dest_id(self):
for rec in self:
if rec.repair_type_id.refurbish_location_dest_id:
rec.refurbish_location_dest_id = (
rec.repair_type_id.refurbish_location_dest_id
)
14 changes: 14 additions & 0 deletions repair_type_refurbish/models/repair_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2023 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)

from odoo import fields, models


class RepairType(models.Model):
_inherit = "repair.type"

refurbish_location_dest_id = fields.Many2one(
"stock.location",
"Refurbish destination Location",
help="This is the location where the refurbished product will be send",
)
1 change: 1 addition & 0 deletions repair_type_refurbish/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
No configuration needed for this module.
3 changes: 3 additions & 0 deletions repair_type_refurbish/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `ForgeFlow <https://forgeflow.com>`_:

* Aaron Henriquez <[email protected]>
2 changes: 2 additions & 0 deletions repair_type_refurbish/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add the default refurbish locations to the repair type, same as repair type does with the standard location
fields.
1 change: 1 addition & 0 deletions repair_type_refurbish/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Go to Configuration>Repair Types and add the refurbish location.
Binary file added repair_type_refurbish/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading