Skip to content

Commit

Permalink
Merge PR #65 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by LoisRForgeFlow
  • Loading branch information
OCA-git-bot committed Nov 26, 2024
2 parents b40101b + c5f40d9 commit 38742d3
Show file tree
Hide file tree
Showing 24 changed files with 1,235 additions and 0 deletions.
105 changes: 105 additions & 0 deletions repair_picking_after_done/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
=========================
Repair picking after done
=========================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f11fa65acd2414cbbab2c2c100e3d976b2147ad613787ffc494bc85e0242b0bd
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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/17.0/repair_picking_after_done
:alt: OCA/repair
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/repair-17-0/repair-17-0-repair_picking_after_done
: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=17.0
:alt: Try me on Runboat

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

This module adds the functionality to create transfer of repaired move
once repair order is done.

.. 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
=====

After repair order is done, You will be able to see button "Transfer" on
repair order's form view. You will be able to create internal transfer
between repair location to any destination location.

Known issues / Roadmap
======================



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_picking_after_done%0Aversion:%2017.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>`__:

- Dhaval Talpada <[email protected]>

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

- Patryk Pyczko <[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/17.0/repair_picking_after_done>`_ 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_picking_after_done/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import models
from . import wizards
from .hooks import post_load_hook
22 changes: 22 additions & 0 deletions repair_picking_after_done/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Repair picking after done",
"version": "17.0.1.0.0",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/repair",
"summary": "Transfer repaired move to another location directly from repair order",
"category": "Repair",
"depends": ["repair_type", "repair_stock"],
"data": [
"security/ir.model.access.csv",
"views/repair.xml",
"wizards/repair_move_transfer_views.xml",
],
"installable": True,
"development_status": "Alpha",
"license": "AGPL-3",
"application": False,
"post_load": "post_load_hook",
}
25 changes: 25 additions & 0 deletions repair_picking_after_done/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2024 Patryk Pyczko (APSL-Nagarro)<[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.repair.models.stock_move import StockMove


def post_load_hook():
"""
This hook modifies the stock move splitting logic to:
- Allow splitting stock moves related to repair
orders that are marked as "done", which is prevented
by the core Odoo logic.
- This change enables the creation of backorders for
these split stock moves when the associated repair is completed.
"""

def _split_for_repair_custom(self, qty, restrict_partner_id=False):
if self.repair_id and self.repair_id.state != "done":
return []

return super(StockMove, self)._split(qty, restrict_partner_id)

if not hasattr(StockMove, "_split_original"):
StockMove._split_original = StockMove._split
StockMove._split = _split_for_repair_custom
117 changes: 117 additions & 0 deletions repair_picking_after_done/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_picking_after_done
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-12-20 15:36+0000\n"
"Last-Translator: mymage <[email protected]>\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 4.17\n"

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Cancel"
msgstr "Annulla"

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.repair_type_form_inherit
msgid "Create Transfer"
msgstr "Crea trasferimento"

#. module: repair_picking_after_done
#: model:ir.model,name:repair_picking_after_done.model_repair_move_transfer
msgid "Create an internal transfer from repaired moves"
msgstr "Crea un trasferimento interno da movimenti di riparazione"

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Create transfer"
msgstr "Crea trasferimento"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__create_uid
msgid "Created by"
msgstr "Creato da"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__create_date
msgid "Created on"
msgstr "Creato il"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__location_dest_id
msgid "Destination location"
msgstr "Ubicazione di destinazione"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__display_name
msgid "Display Name"
msgstr "Nome visualizzato"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__id
msgid "ID"
msgstr "ID"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer____last_update
msgid "Last Modified on"
msgstr "Ultima modifica il"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__write_uid
msgid "Last Updated by"
msgstr "Ultimo aggiornamento di"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__write_date
msgid "Last Updated on"
msgstr "Ultimo aggiornamento il"

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__quantity
msgid "Quantity to transfer"
msgstr "Quantità da trasferire"

#. module: repair_picking_after_done
#. odoo-python
#: code:addons/repair_picking_after_done/wizards/repair_move_transfer.py:0
#, python-format
msgid "Quantity to transfer must be greater than 0."
msgstr "La quantità da trasferire deve essere maggiore di 0."

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_order__remaining_quantity
msgid "Remaining quantity to be transferred"
msgstr "Quantità rimanente da trasferire"

#. module: repair_picking_after_done
#: model:ir.model,name:repair_picking_after_done.model_repair_order
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__repair_order_id
msgid "Repair Order"
msgstr "Ordine di riparazione"

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Transfer Repaired Moves"
msgstr "Movimenti trasferimenti di riparazione"

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "or"
msgstr "o"

#~ msgid "<span class=\"o_stat_text\">Transfers</span>"
#~ msgstr "<span class=\"o_stat_text\">Trasferimenti</span>"

#, python-format
#~ msgid "Transfers"
#~ msgstr "Trasferimenti"
107 changes: 107 additions & 0 deletions repair_picking_after_done/i18n/repair_picking_after_done.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * repair_picking_after_done
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Cancel"
msgstr ""

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.repair_type_form_inherit
msgid "Create Transfer"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model,name:repair_picking_after_done.model_repair_move_transfer
msgid "Create an internal transfer from repaired moves"
msgstr ""

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Create transfer"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__create_uid
msgid "Created by"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__create_date
msgid "Created on"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__location_dest_id
msgid "Destination location"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__display_name
msgid "Display Name"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__id
msgid "ID"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer____last_update
msgid "Last Modified on"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__write_uid
msgid "Last Updated by"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__write_date
msgid "Last Updated on"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__quantity
msgid "Quantity to transfer"
msgstr ""

#. module: repair_picking_after_done
#. odoo-python
#: code:addons/repair_picking_after_done/wizards/repair_move_transfer.py:0
#, python-format
msgid "Quantity to transfer must be greater than 0."
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_order__remaining_quantity
msgid "Remaining quantity to be transferred"
msgstr ""

#. module: repair_picking_after_done
#: model:ir.model,name:repair_picking_after_done.model_repair_order
#: model:ir.model.fields,field_description:repair_picking_after_done.field_repair_move_transfer__repair_order_id
msgid "Repair Order"
msgstr ""

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "Transfer Repaired Moves"
msgstr ""

#. module: repair_picking_after_done
#: model_terms:ir.ui.view,arch_db:repair_picking_after_done.view_repair_move_transfer_wizard
msgid "or"
msgstr ""
1 change: 1 addition & 0 deletions repair_picking_after_done/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import repair
Loading

0 comments on commit 38742d3

Please sign in to comment.